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

Marek Behun
2020-03-28T12:36:32Z

> This was only RFC, please do not merge.

Jacek, Pavel,

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 :(

Marek