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>
This commit is contained in:
Christian Marangi 2024-06-26 18:00:15 +02:00 • committed by Lee Jones
commit c63580b27a
5 changed files with 29 additions and 41 deletions