Re: [PATCH RFC leds-next] leds: initial support for Turris Omnia LEDs

Pavel Machek
2020-04-06T21:08:06Z

[-- Attachment #1: Type: text/plain, Size: 1883 bytes --]

Hi!

> > I decided to abandon the microcontroller driver path.
> > But nonetheless there is still one thing I would like to solve.
> >
> > The front button on Omnia is used to control the global brightness of
> > the RGB LEDs, so that user can change it if the LEDs glow too much.
> > The microcontroller does this as such: there is another PWM on top of
> > all the LED PWMs, and this value can be manipulated via the same i2c
> > interface as the LEDs, but via another command.
> >
> > The thing is that I would like to somehow export this global brightness
> > setting to userspace, because otherwise it gets reset after reboot, and
> > I want the user to be able to set this global brightness by software,
> > so that they won't have to change it after every reboot manually by
> > pressing the front button.
> >
> > I am wondering how to do this. Last year I proposed this by adding a
> > sysfs attribute file to the device which is parent to the LEDs, but you
> > did not agree :(

This is really special feature, with button interaction. I don't
expect to see it elsewhere. Can you put it into /sys somewhere close
to the other controls for your platform? I have /proc/acpi/ibm on this
machine. It should not be /proc in new code, but you get the idea...

> I already proposed adding a "luma" LED class device for similar
> case [0], but didn't here any feedback from Pavel so far.

I dislike that. Luma is not really a color. Plus, this is different
case AFAICT, as global brightness affects all the LEDs at the same
time.

> [0]
> https://lore.kernel.org/linux-leds/1583502010-16210-1-git-send-email-nbelin@baylibre.com/T/#mf52c8d4f68260a445223c26957c61e6267e0932d

Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]