diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2024-06-26 18:00:18 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-06-26 17:08:31 +0100 |
commit | e35bc5d8a023a55a5f895d6648a455ed83dc0db2 (patch) | |
tree | 5b94c619c384c513a8b00d08c58ed2f1c4f23f9e /drivers/leds/leds-lp8501.c | |
parent | 01e0290d17b2fb9717ee80fed512b32e0460b14c (diff) |
leds: leds-lp55xx: Generalize turn_off_channels function
Generalize turn_off_channels function as the implementation is the same for
most of the lp55xx based LED driver.
Suggested-by: Lee Jones <lee@kernel.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://lore.kernel.org/r/20240626160027.19703-14-ansuelsmth@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds/leds-lp8501.c')
-rw-r--r-- | drivers/leds/leds-lp8501.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/leds/leds-lp8501.c b/drivers/leds/leds-lp8501.c index d924572e4533..1fb876f64cb7 100644 --- a/drivers/leds/leds-lp8501.c +++ b/drivers/leds/leds-lp8501.c @@ -110,20 +110,12 @@ static int lp8501_post_init_device(struct lp55xx_chip *chip) LP8501_PWR_CONFIG_M, chip->pdata->pwr_sel); } -static void lp8501_turn_off_channels(struct lp55xx_chip *chip) -{ - int i; - - for (i = 0; i < LP8501_MAX_LEDS; i++) - lp55xx_write(chip, LP8501_REG_LED_PWM_BASE + i, 0); -} - static void lp8501_run_engine(struct lp55xx_chip *chip, bool start) { /* stop engine */ if (!start) { lp55xx_stop_all_engine(chip); - lp8501_turn_off_channels(chip); + lp55xx_turn_off_channels(chip); return; } |