[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZDpZvhWX/Vx9jVUT@amd.ucw.cz>
Date: Sat, 15 Apr 2023 10:01:02 +0200
From: Pavel Machek <pavel@....cz>
To: Andreas Kemnade <andreas@...nade.info>
Cc: lee@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, linux-leds@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Matti Vaittinen <mazziesaccount@...il.com>
Subject: Re: [PATCH v4 2/2] leds: bd2606mvv: Driver for the Rohm 6 Channel
i2c LED driver
Hi!
> > > The device provides 6 channels which can be individually
> > > turned off and on but groups of two channels share a common brightness
> > > register.
> >
> > Yeah, well.. Turn it into 3-channel controller with brightness or
> > 6-channel on/off one... You can't really share brightness.
> >
> No, I cannot change the hardware, so it is a 6-channel with limitations.
> And the devicetree has to describe the hardware and not the driver.
Device tree is okay, I commented on the driver.
> What is discussable is just how the driver should deal with that:
>
> I see 5 possibilities.
> a) ignore the shared brightness problem (status quo)
> b) never set a brightness other than full on/off
> c) ignore one led of each pair (not register it at all{
> d) couple also the on/off of the pairs, so present to
> userspace only max. 3 leds.
> e) allow full brightness control where independently possible,
> if LEDs are defined where that leads to conflicts,
> register them with max_brightness=1 and use them
> in on/off mode.
>
> My preference were a) or e), the most possible usages.
> e) has a cleaner interface to the userspace.
b) c) e) are acceptable to me. So I guess e) is preffered.
BR, Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists