
commit 21144298 (power: twl6035: add palmas PMIC support) introduced twl6035_i2c_[read|write]_u8 Then, commit dd23e59d (omap5: pbias ldo9 turn on) introduced palmas_[read|write]_u8 for precisely the same access function. TWL6035 belongs to the palmas family, so instead of having an palmas API, we could use twl6035 API instead (which is used elsewhere as well). The original intent of introducing palmas_[read|write]_u8 was to stay consistent with u-boot's i2c accessors.
Since we have cleaned up twl6035_i2c_[read|write]_u8 with the same objective, we can drop the redundant function.
Reported-by: Ruchika Kharwar ruchika@ti.com Signed-off-by: Nishanth Menon nm@ti.com --- V1: http://patchwork.ozlabs.org/patch/227112/ drivers/power/twl6035.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/power/twl6035.c b/drivers/power/twl6035.c index 0c2cdfe..8561db8 100644 --- a/drivers/power/twl6035.c +++ b/drivers/power/twl6035.c @@ -23,17 +23,6 @@ #include <config.h> #include <twl6035.h>
-/* To align with i2c mw/mr address, reg, val command syntax */ -static inline int palmas_write_u8(u8 chip_no, u8 reg, u8 val) -{ - return i2c_write(chip_no, reg, 1, &val, 1); -} - -static inline int palmas_read_u8(u8 chip_no, u8 reg, u8 *val) -{ - return i2c_read(chip_no, reg, 1, val, 1); -} - void twl6035_init_settings(void) { return; @@ -46,7 +35,7 @@ int twl6035_mmc1_poweron_ldo(void) /* set LDO9 TWL6035 to 3V */ val = 0x2b; /* (3 -.9)*28 +1 */
- if (palmas_write_u8(0x48, LDO9_VOLTAGE, val)) { + if (twl6035_i2c_write_u8(0x48, LDO9_VOLTAGE, val)) { printf("twl6035: could not set LDO9 voltage.\n"); return 1; } @@ -54,7 +43,7 @@ int twl6035_mmc1_poweron_ldo(void) /* TURN ON LDO9 */ val = LDO_ON | LDO_MODE_SLEEP | LDO_MODE_ACTIVE;
- if (palmas_write_u8(0x48, LDO9_CTRL, val)) { + if (twl6035_i2c_write_u8(0x48, LDO9_CTRL, val)) { printf("twl6035: could not turn on LDO9.\n"); return 1; }