diff options
Diffstat (limited to 'driver/led')
-rw-r--r-- | driver/led/lm3509.c | 4 | ||||
-rw-r--r-- | driver/led/lm3509.h | 2 | ||||
-rw-r--r-- | driver/led/lm3630a.c | 6 | ||||
-rw-r--r-- | driver/led/lp5562.c | 6 | ||||
-rw-r--r-- | driver/led/max695x.h | 4 | ||||
-rw-r--r-- | driver/led/oz554.c | 6 |
6 files changed, 14 insertions, 14 deletions
diff --git a/driver/led/lm3509.c b/driver/led/lm3509.c index c940dd69e2..7c20c43ac2 100644 --- a/driver/led/lm3509.c +++ b/driver/led/lm3509.c @@ -12,13 +12,13 @@ static inline int lm3509_write(uint8_t reg, uint8_t val) { - return i2c_write8__7bf(I2C_PORT_KBLIGHT, LM3509_I2C_ADDR__7bf, + return i2c_write8(I2C_PORT_KBLIGHT, LM3509_I2C_ADDR_FLAGS, reg, val); } static inline int lm3509_read(uint8_t reg, int *val) { - return i2c_read8__7bf(I2C_PORT_KBLIGHT, LM3509_I2C_ADDR__7bf, + return i2c_read8(I2C_PORT_KBLIGHT, LM3509_I2C_ADDR_FLAGS, reg, val); } diff --git a/driver/led/lm3509.h b/driver/led/lm3509.h index fce0c993dc..a7defe1fb7 100644 --- a/driver/led/lm3509.h +++ b/driver/led/lm3509.h @@ -8,7 +8,7 @@ #ifndef __CROS_EC_LM3509_H #define __CROS_EC_LM3509_H -#define LM3509_I2C_ADDR__7bf 0x36 +#define LM3509_I2C_ADDR_FLAGS 0x36 /* * General purpose register diff --git a/driver/led/lm3630a.c b/driver/led/lm3630a.c index 10f850b09d..a2c4aaa74c 100644 --- a/driver/led/lm3630a.c +++ b/driver/led/lm3630a.c @@ -12,17 +12,17 @@ /* I2C address */ -#define LM3630A_I2C_ADDR__7bf 0x36 +#define LM3630A_I2C_ADDR_FLAGS 0x36 static inline int lm3630a_write(uint8_t reg, uint8_t val) { - return i2c_write8__7bf(I2C_PORT_KBLIGHT, LM3630A_I2C_ADDR__7bf, + return i2c_write8(I2C_PORT_KBLIGHT, LM3630A_I2C_ADDR_FLAGS, reg, val); } static inline int lm3630a_read(uint8_t reg, int *val) { - return i2c_read8__7bf(I2C_PORT_KBLIGHT, LM3630A_I2C_ADDR__7bf, + return i2c_read8(I2C_PORT_KBLIGHT, LM3630A_I2C_ADDR_FLAGS, reg, val); } diff --git a/driver/led/lp5562.c b/driver/led/lp5562.c index 966aff5e58..e0758a8b91 100644 --- a/driver/led/lp5562.c +++ b/driver/led/lp5562.c @@ -12,16 +12,16 @@ #include "util.h" /* I2C address */ -#define LP5562_I2C_ADDR__7bf (0x30) +#define LP5562_I2C_ADDR_FLAGS 0x30 inline int lp5562_write(uint8_t reg, uint8_t val) { - return i2c_write8(I2C_PORT_MASTER, LP5562_I2C_ADDR, reg, val); + return i2c_write8(I2C_PORT_MASTER, LP5562_I2C_ADDR_FLAGS, reg, val); } inline int lp5562_read(uint8_t reg, int *val) { - return i2c_read8(I2C_PORT_MASTER, LP5562_I2C_ADDR, reg, val); + return i2c_read8(I2C_PORT_MASTER, LP5562_I2C_ADDR_FLAGS, reg, val); } int lp5562_set_color(uint32_t rgb) diff --git a/driver/led/max695x.h b/driver/led/max695x.h index 4bead04194..5ed5d91e2f 100644 --- a/driver/led/max695x.h +++ b/driver/led/max695x.h @@ -9,8 +9,8 @@ #define __CROS_EC_MAX656X_H /* I2C interface */ -#define MAX695X_I2C_ADDR1__7bf (0x38) -#define MAX695X_I2C_ADDR2__7bf (0x39) +#define MAX695X_I2C_ADDR1_FLAGS 0x38 +#define MAX695X_I2C_ADDR2_FLAGS 0x39 /* Decode mode register */ #define MAX695X_REG_DECODE_MODE 0x01 diff --git a/driver/led/oz554.c b/driver/led/oz554.c index 6369e064a3..fcbbee46ce 100644 --- a/driver/led/oz554.c +++ b/driver/led/oz554.c @@ -16,7 +16,7 @@ #define CPRINTS(format, args...) cprints(CC_I2C, format, ## args) #define CPRINTF(format, args...) cprintf(CC_I2C, format, ## args) -#define I2C_ADDR_OZ554__7bf 0x31 +#define I2C_ADDR_OZ554_FLAGS 0x31 struct oz554_value { uint8_t offset; @@ -80,8 +80,8 @@ static void set_oz554_reg(void) int i; for (i = 0; i < oz554_conf_size; ++i) { - int rv = i2c_write8__7bf(I2C_PORT_BACKLIGHT, - I2C_ADDR_OZ554__7bf, + int rv = i2c_write8(I2C_PORT_BACKLIGHT, + I2C_ADDR_OZ554_FLAGS, oz554_conf[i].offset, oz554_conf[i].data); if (rv) { CPRINTS("Write OZ554 register %d failed rv=%d" , i, rv); |