Skip to content
Snippets Groups Projects
Commit e0758281 authored by mario.six@gdsys.cc's avatar mario.six@gdsys.cc Committed by Heiko Schocher
Browse files

i2c: mvtwsi: Use 'uint' instead of 'unsigned int'


Since some additional parameters will be added in the course of this
patch series (especially with the addition of DM support), we replace
the longer "unsigned int" declarations with "uint" declarations to keep
the parameter lists more readable.

Signed-off-by: default avatarMario Six <mario.six@gdsys.cc>
Reviewed-by: default avatarStefan Roese <sr@denx.de>
parent 059fce9f
No related branches found
No related tags found
No related merge requests found
...@@ -314,7 +314,7 @@ static int twsi_stop(struct i2c_adapter *adap) ...@@ -314,7 +314,7 @@ static int twsi_stop(struct i2c_adapter *adap)
return status; return status;
} }
static unsigned int twsi_calc_freq(const int n, const int m) static uint twsi_calc_freq(const int n, const int m)
{ {
#ifdef CONFIG_SUNXI #ifdef CONFIG_SUNXI
return CONFIG_SYS_TCLK / (10 * (m + 1) * (1 << n)); return CONFIG_SYS_TCLK / (10 * (m + 1) * (1 << n));
...@@ -341,12 +341,12 @@ static void twsi_reset(struct i2c_adapter *adap) ...@@ -341,12 +341,12 @@ static void twsi_reset(struct i2c_adapter *adap)
/* /*
* Sets baud to the highest possible value not exceeding the requested one. * Sets baud to the highest possible value not exceeding the requested one.
*/ */
static unsigned int twsi_i2c_set_bus_speed(struct i2c_adapter *adap, static uint twsi_i2c_set_bus_speed(struct i2c_adapter *adap,
unsigned int requested_speed) uint requested_speed)
{ {
struct mvtwsi_registers *twsi = twsi_get_base(adap); struct mvtwsi_registers *twsi = twsi_get_base(adap);
unsigned int tmp_speed, highest_speed, n, m; uint tmp_speed, highest_speed, n, m;
unsigned int baud = 0x44; /* Baud rate after controller reset */ uint baud = 0x44; /* Baud rate after controller reset */
highest_speed = 0; highest_speed = 0;
/* Successively try m, n combinations, and use the combination /* Successively try m, n combinations, and use the combination
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment