Re: [PATCH v9 9/9] leds: max77705: Add LEDs support
From: Krzysztof Kozlowski
Date: Mon Dec 02 2024 - 05:30:10 EST
On 02/12/2024 10:48, Dzmitry Sankouski wrote:
> This adds basic support for LEDs for the max77705 PMIC.
>
> Signed-off-by: Dzmitry Sankouski <dsankouski@xxxxxxxxx>
>
> ---
> Changes for v8:
> - join line where possible to fit in 100 chars
Coding style asks for 80. checkpatch is not a coding style, unless this
came from maintainer's review.
> - change comment style C++ -> C
>
> Changes for v6:
> - change compatible suffix to 'rgb'
> - remove I2C dependency in Kconfig
> - remove copyright and author from 'based on' header statement
> - replace MFD abbreviation with PMIC
> - MAINTAINERS: alphabetic order
> - max77705_rgb_blink: replace ternary operators with if..else if sequence
> - max77705_rgb_blink: move hardcoded numbers to constants
> - max77705_led_brightness_set: move ret to the bottom
> - s/map/regmap
> - replace device_for_each_child_node with scoped version
> - s/rv/ret
> Changes for v5:
> - use same hardware name in Kconfig and module descriptions
> - remove copyrighter owner from module authors
>
> Changes in v4:
> - inline BLINK_(ON|OFF) macro
> - remove camel case
> - drop backwards compatibility(new driver)
> - drop module alias
> ---
> MAINTAINERS | 1 +
> drivers/leds/Kconfig | 6 ++++++
> drivers/leds/Makefile | 1 +
> drivers/leds/leds-max77705.c | 167 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> include/linux/mfd/max77705-private.h | 18 ++++++++++++++++
> 5 files changed, 193 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
...
> diff --git a/include/linux/mfd/max77705-private.h b/include/linux/mfd/max77705-private.h
> index be781a0f9802..2140693ce747 100644
> --- a/include/linux/mfd/max77705-private.h
> +++ b/include/linux/mfd/max77705-private.h
> @@ -35,6 +35,24 @@
> #define MAX77705_SYSTEM_IRQ_SYSOVLO_INT BIT(5)
> #define MAX77705_SYSTEM_IRQ_TSHDN_INT BIT(6)
> #define MAX77705_SYSTEM_IRQ_TM_INT BIT(7)
> +/* MAX77705_RGBLED_REG_LEDEN register */
> +#define MAX77705_RGBLED_EN_WIDTH 2
> +/* MAX77705_RGBLED_REG_LEDBLNK register */
> +#define MAX77705_RGB_DELAY_100_STEP_LIM 500
> +#define MAX77705_RGB_DELAY_100_STEP_COUNT 4
> +#define MAX77705_RGB_DELAY_100_STEP 100
> +#define MAX77705_RGB_DELAY_250_STEP_LIM 3250
> +#define MAX77705_RGB_DELAY_250_STEP 250
> +#define MAX77705_RGB_DELAY_500_STEP 500
> +#define MAX77705_RGB_DELAY_500_STEP_COUNT 10
> +#define MAX77705_RGB_DELAY_500_STEP_LIM 5000
> +#define MAX77705_RGB_DELAY_1000_STEP_LIM 8000
> +#define MAX77705_RGB_DELAY_1000_STEP_COUNT 13
> +#define MAX77705_RGB_DELAY_1000_STEP 1000
> +#define MAX77705_RGB_DELAY_2000_STEP 2000
> +#define MAX77705_RGB_DELAY_2000_STEP_COUNT 13
> +#define MAX77705_RGB_DELAY_2000_STEP_LIM 12000
> +
>
No need for multiple line breaks.
Best regards,
Krzysztof