summaryrefslogtreecommitdiff
path: root/include/twl4030.h
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2018-12-07 16:50:46 +0300
committerHeiko Schocher <hs@denx.de>2018-12-10 08:17:30 +0300
commitfb1b7712ad3f375f83e74629f03236c300b0b896 (patch)
treecc21eacc979ff5f7d2f5a7c2f336a4fcb8561e75 /include/twl4030.h
parent2b30b38b269e87cbd727862a08ae99843c3ab29e (diff)
downloadu-boot-fb1b7712ad3f375f83e74629f03236c300b0b896.tar.xz
power: make most tps drivers and the twl4030 driver compatible with DM_I2C
Those driver are not DM drivers per se (not using the PMIC/regulator framework) and are using the legacy I2C API. Make them compatible with the DM_I2C API. This impacts the following drivers: - palmas (used by am57xx/dra7xx evms) - tps65218 (used by am43xx evms) - tps65217 and tps65910 (used by am335x evms and am335x boneblack vboot) - twl4030 (used by omap3_logicpd) - tps65217 (used by brppt1) - twl6030 Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include/twl4030.h')
-rw-r--r--include/twl4030.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/twl4030.h b/include/twl4030.h
index 46a9306246..c27ad615ee 100644
--- a/include/twl4030.h
+++ b/include/twl4030.h
@@ -648,6 +648,7 @@
* examples are TWL4030_PM_RECEIVER_VMMC1_DEV_GRP and
* TWL4030_LED_LEDEN.
*/
+#ifndef CONFIG_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);
@@ -657,7 +658,10 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 reg, u8 *val)
{
return i2c_read(chip_no, reg, 1, val, 1);
}
-
+#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);
+#endif
/*
* Power
*/