Lines Matching +full:leds +full:- +full:lp55xx

1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/leds.h>
16 #include <linux/platform_data/leds-lp55xx.h>
18 #include <dt-bindings/leds/leds-lp55xx.h>
20 #include "leds-lp55xx-common.h"
142 chip->engine_idx = i; in lp5569_init_program_engine()
147 pattern[i - 1][j]); in lp5569_init_program_engine()
161 dev_err(&chip->cl->dev, in lp5569_init_program_engine()
164 ret = -EINVAL; in lp5569_init_program_engine()
178 val |= FIELD_PREP(LP5569_CP_MODE_MASK, chip->pdata->charge_pump_mode); in lp5569_post_init_device()
183 if (chip->pdata->clock_mode == LP55XX_CLOCK_INT) { in lp5569_post_init_device()
211 struct lp55xx_chip *chip = led->chip; in lp5569_led_open_test()
212 struct lp55xx_platform_data *pdata = chip->pdata; in lp5569_led_open_test()
248 for (i = 0; i < pdata->num_channels; i++) { in lp5569_led_open_test()
249 ret = lp55xx_write(chip, LP5569_REG_LED_PWM_BASE + led_tmp->chan_nr, in lp5569_led_open_test()
278 for (i = 0; i < pdata->num_channels; i++) { in lp5569_led_open_test()
279 if (leds_fault[led_tmp->chan_nr]) in lp5569_led_open_test()
281 led_tmp->chan_nr); in lp5569_led_open_test()
293 for (i = 0; i < pdata->num_channels; i++) { in lp5569_led_open_test()
294 lp55xx_write(chip, LP5569_REG_LED_PWM_BASE + led_tmp->chan_nr, 0); in lp5569_led_open_test()
304 struct lp55xx_chip *chip = led->chip; in lp5569_led_short_test()
305 struct lp55xx_platform_data *pdata = chip->pdata; in lp5569_led_short_test()
327 for (i = 0; i < pdata->num_channels; i++) { in lp5569_led_short_test()
328 ret = lp55xx_write(chip, LP5569_REG_LED_PWM_BASE + led_tmp->chan_nr, in lp5569_led_short_test()
333 ret = lp55xx_write(chip, LP5569_REG_LED_CURRENT_BASE + led_tmp->chan_nr, in lp5569_led_short_test()
376 for (i = 0; i < pdata->num_channels; i++) { in lp5569_led_short_test()
377 if (leds_fault[led_tmp->chan_nr]) in lp5569_led_short_test()
379 led_tmp->chan_nr); in lp5569_led_short_test()
391 for (i = 0; i < pdata->num_channels; i++) { in lp5569_led_short_test()
392 lp55xx_write(chip, LP5569_REG_LED_PWM_BASE + led_tmp->chan_nr, 0); in lp5569_led_short_test()
405 struct lp55xx_chip *chip = led->chip; in lp5569_selftest()
408 guard(mutex)(&chip->lock); in lp5569_selftest()
420 for (i = 0; i < chip->pdata->num_channels; i++) { in lp5569_selftest()
422 lp55xx_write(chip, LP5569_REG_LED_CURRENT_BASE + led->chan_nr, in lp5569_selftest()
423 led->led_current); in lp5569_selftest()
426 lp55xx_write(chip, LP5569_REG_LED_PWM_BASE + led->chan_nr, in lp5569_selftest()
427 led->brightness); in lp5569_selftest()