]> git.ipfire.org Git - thirdparty/linux.git/commit
leds: leds-lp55xx: Generalize led_brightness function
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 26 Jun 2024 16:00:15 +0000 (18:00 +0200)
committerLee Jones <lee@kernel.org>
Wed, 26 Jun 2024 16:08:31 +0000 (17:08 +0100)
commitc63580b27a2c638cbae2fc26484b0bf29f303134
tree2c08eae93689cff746021a5f6c6a33cba8201772
parenta3df1906fb9aa9ff45149e0a3c6434b2cef4f6e7
leds: leds-lp55xx: Generalize led_brightness function

Generalize led_brightness function as the implementation is the same for
most of the lp55xx based LED driver.

Introduce a new option in device_config, reg_led_pwm_base since the reg
value is not the same for every LED chip.

Suggested-by: Lee Jones <lee@kernel.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://lore.kernel.org/r/20240626160027.19703-11-ansuelsmth@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-lp5521.c
drivers/leds/leds-lp5523.c
drivers/leds/leds-lp55xx-common.c
drivers/leds/leds-lp55xx-common.h
drivers/leds/leds-lp8501.c