X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Ftwl4030.h;h=0a6d85a7c1c945faf9cad1c97a11ed14d40388de;hb=6786ce1ce14feb4d02854a0c04bc0cce505be46e;hp=c27ad615eebf9cca9c01ec02f433566e2ac5457b;hpb=8bf3c2442b59aedd1e58b7013fc12180cab0b541;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/twl4030.h b/include/twl4030.h index c27ad61..0a6d85a 100644 --- a/include/twl4030.h +++ b/include/twl4030.h @@ -648,20 +648,26 @@ * 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 */