mbox series

[v5,0/2] leds: Add a driver for the BD2606MVV

Message ID 20230416211550.903240-1-andreas@kemnade.info
Headers show
Series leds: Add a driver for the BD2606MVV | expand

Message

Andreas Kemnade April 16, 2023, 9:15 p.m. UTC
Add the binding description and the corresponding driver for
the BD2606.

Changes in V5:
- remove "driver" from the binding subject line
- avoid presenting shared brightness to the userspace
  by allowing only on/off in such cases.

Changes in V4:
- minor tuning of description in bindings
 
Changes in V3:
- binding cleanup
- move active variable from long-living struct onto stack

Changes in V2:
- Add Datasheet link
- use fwnode api
- remove childnode count check, that will bail out
  anyways later.
- add enable-gpios to binding but not to driver due to lack of
  testing ability

Andreas Kemnade (2):
  dt-bindings: leds: Add ROHM BD2606MVV LED
  leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver

 .../bindings/leds/rohm,bd2606mvv.yaml         |  81 +++++++++
 drivers/leds/Kconfig                          |  11 ++
 drivers/leds/Makefile                         |   1 +
 drivers/leds/leds-bd2606mvv.c                 | 156 ++++++++++++++++++
 4 files changed, 249 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
 create mode 100644 drivers/leds/leds-bd2606mvv.c

Comments

Pavel Machek April 17, 2023, 12:22 p.m. UTC | #1
Hi!

> The device provides 6 channels which can be individually
> turned off and on but groups of two channels share a common brightness
> register.
> 
> Limitation: The GPIO to enable the device is not used yet.

(I'd expect some explanation how you dealt with the brigthness pairing
here. I can figure it out from the fcode, but... I guess you should
state it at the begining of driver in a comment at least.).

> +++ b/drivers/leds/Kconfig
> @@ -551,6 +551,17 @@ config LEDS_REGULATOR
>  	help
>  	  This option enables support for regulator driven LEDs.
>  
> +config LEDS_BD2606MVV
> +	tristate "LED driver for BD2606MVV"
> +	depends on LEDS_CLASS
> +	depends on I2C
> +	select REGMAP_I2C
> +	help
> +	  This option enables support for BD2606MVV LED driver chips
> +	  accessed via the I2C bus. It supports setting brightness, with
> +	  the limitiation that there are groups of two channels sharing
> +	  a brightness setting, but not the on/off setting.

Add the usual note about modules here.

Rest looks ok.

With that fixed:

Acked-by: Pavel Machek <pavel@ucw.cz>

BR,
								Pavel
Rob Herring (Arm) April 18, 2023, 10:29 p.m. UTC | #2
On Sun, 16 Apr 2023 23:15:49 +0200, Andreas Kemnade wrote:
> Document ROHM BD2606MVV LED driver devicetree bindings.
> 
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
> ---
>  .../bindings/leds/rohm,bd2606mvv.yaml         | 81 +++++++++++++++++++
>  1 file changed, 81 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>