
Hello Vipin,
Vipin KUMAR wrote:
Signed-off-by: Vipin vipin.kumar@st.com
drivers/i2c/Makefile | 1 + drivers/i2c/spr_i2c.c | 340 ++++++++++++++++++++++++++++++++++ include/asm-arm/arch-spear/spr_i2c.h | 146 +++++++++++++++ include/configs/spear.h | 11 + 4 files changed, 498 insertions(+), 0 deletions(-) mode change 100644 => 100755 drivers/i2c/Makefile create mode 100755 drivers/i2c/spr_i2c.c create mode 100755 include/asm-arm/arch-spear/spr_i2c.h
[...]
diff --git a/drivers/i2c/spr_i2c.c b/drivers/i2c/spr_i2c.c new file mode 100755 index 0000000..497ca47 --- /dev/null +++ b/drivers/i2c/spr_i2c.c
[...]
+/*
- i2c_set_bus_speed - Set the i2c speed
- @speed: required i2c speed
- Set the i2c speed.
- */
+void i2c_set_bus_speed(int speed) +{
- if (speed >= I2C_MAX_SPEED) {
set_speed(IC_SPEED_MODE_MAX);
No brackets for single statement, please,
blank line not needed here.
- } else if (speed >= I2C_FAST_SPEED) {
set_speed(IC_SPEED_MODE_FAST);
same as above.
- } else {
set_speed(IC_SPEED_MODE_STANDARD);
- }
+}
+/*
- i2c_get_bus_speed - Gets the i2c speed
- Gets the i2c speed.
- */
+int i2c_get_bus_speed(void) +{
- u32 cntl;
- cntl = (readl(&i2c_regs_p->ic_con) & IC_CON_SPD_MSK);
- if (cntl == IC_CON_SPD_HS) {
return I2C_MAX_SPEED;
here too, please fix globally.
[...]
If you fix this small Coding Style issues, you get my:
Acked-by: Heiko Schocherhs@denx.de
thanks!
bye Heiko