]> Git Repo - J-u-boot.git/blobdiff - include/twl4030.h
Merge patch series "boot: fdt: Change type of env_get_bootm_low() to phys_addr_t"
[J-u-boot.git] / include / twl4030.h
index c27ad615eebf9cca9c01ec02f433566e2ac5457b..ee80bb1f6b9bcdfd4771e9f76e39c78084d1f280 100644 (file)
@@ -11,7 +11,6 @@
 #ifndef TWL4030_H
 #define TWL4030_H
 
-#include <common.h>
 #include <i2c.h>
 
 /* I2C chip addresses */
  *   examples are TWL4030_PM_RECEIVER_VMMC1_DEV_GRP and
  *   TWL4030_LED_LEDEN.
  */
-#ifndef CONFIG_DM_I2C
+#if !CONFIG_IS_ENABLED(DM_I2C)
 static inline int twl4030_i2c_write_u8(u8 chip_no, u8 reg, u8 val)
 {
        return i2c_write(chip_no, reg, 1, &val, 1);
 }
 
-static inline int twl4030_i2c_read_u8(u8 chip_no, u8 reg, u8 *val)
+static inline int twl4030_i2c_read(u8 chip_no, u8 reg, u8 *val, int len)
 {
-       return i2c_read(chip_no, reg, 1, val, 1);
+       return i2c_read(chip_no, reg, 1, val, len);
 }
 #else
 int twl4030_i2c_write_u8(u8 chip_no, u8 reg, u8 val);
-int twl4030_i2c_read_u8(u8 chip_no, u8 reg, u8 *val);
+int twl4030_i2c_read(u8 chip_no, u8 reg, u8 *val, int len);
 #endif
+
+static inline int twl4030_i2c_read_u8(u8 chip_no, u8 reg, u8 *val)
+{
+       return twl4030_i2c_read(chip_no, reg, val, 1);
+}
+
 /*
  * Power
  */
This page took 0.026573 seconds and 4 git commands to generate.