Lines Matching full:color
95 enum led_colors color; member
109 enum led_colors color) in bd2802_is_rgb_off() argument
111 switch (color) { in bd2802_is_rgb_off()
119 dev_err(&led->client->dev, "%s: Invalid color\n", __func__); in bd2802_is_rgb_off()
143 static inline u8 bd2802_get_base_offset(enum led_ids id, enum led_colors color) in bd2802_get_base_offset() argument
145 return id * BD2802_LED_OFFSET + color * BD2802_COLOR_OFFSET; in bd2802_get_base_offset()
148 static inline u8 bd2802_get_reg_addr(enum led_ids id, enum led_colors color, in bd2802_get_reg_addr() argument
151 return reg_offset + bd2802_get_base_offset(id, color); in bd2802_get_reg_addr()
172 enum led_colors color, enum led_bits led_bit) in bd2802_update_state() argument
179 switch (color) { in bd2802_update_state()
191 "%s: Invalid color\n", __func__); in bd2802_update_state()
250 enum led_colors color) in bd2802_set_on() argument
257 reg = bd2802_get_reg_addr(id, color, BD2802_REG_CURRENT1SETUP); in bd2802_set_on()
259 reg = bd2802_get_reg_addr(id, color, BD2802_REG_CURRENT2SETUP); in bd2802_set_on()
261 reg = bd2802_get_reg_addr(id, color, BD2802_REG_WAVEPATTERN); in bd2802_set_on()
265 bd2802_update_state(led, id, color, BD2802_ON); in bd2802_set_on()
269 enum led_colors color) in bd2802_set_blink() argument
276 reg = bd2802_get_reg_addr(id, color, BD2802_REG_CURRENT1SETUP); in bd2802_set_blink()
278 reg = bd2802_get_reg_addr(id, color, BD2802_REG_CURRENT2SETUP); in bd2802_set_blink()
280 reg = bd2802_get_reg_addr(id, color, BD2802_REG_WAVEPATTERN); in bd2802_set_blink()
284 bd2802_update_state(led, id, color, BD2802_BLINK); in bd2802_set_blink()
288 enum led_colors color, enum led_bits led_bit) in bd2802_turn_on() argument
297 bd2802_set_blink(led, id, color); in bd2802_turn_on()
299 bd2802_set_on(led, id, color); in bd2802_turn_on()
303 enum led_colors color) in bd2802_turn_off() argument
307 if (bd2802_is_rgb_off(led, id, color)) in bd2802_turn_off()
310 reg = bd2802_get_reg_addr(id, color, BD2802_REG_CURRENT1SETUP); in bd2802_turn_off()
312 reg = bd2802_get_reg_addr(id, color, BD2802_REG_CURRENT2SETUP); in bd2802_turn_off()
315 bd2802_update_state(led, id, color, BD2802_OFF); in bd2802_turn_off()
524 led->color = clr; \
527 bd2802_turn_off(led, led->led_id, led->color); \
530 bd2802_turn_on(led, led->led_id, led->color, BD2802_ON);\
542 led->color = clr; \
544 bd2802_turn_on(led, led->led_id, led->color, BD2802_BLINK); \