Re: [PATCH/RFC v8 02/14] Documentation: leds: Add description of LED Flash class extension

Pavel Machek
2014-12-10T13:32:32Z

Hi!

> >>both sides: LED Flash class core and a LED Flash class driver.
> >>In the former the sysfs attribute write permissions would have
> >>to be decided in the runtime and in the latter caching mechanism
> >
> >Write attributes at runtime? Why? We can emulate sane and consistent
> >behaviour for all the controllers: read gives you list of faults,
> >write clears it. We can do it for all the controllers.
>
> I don't like the idea of listing the faults in the form of strings.
> I'd like to see the third opinion :)

Well, I see that you don't like to change existing code. But "I hacked
it this way and I'm going to ask n-th opinion so that I don't have to
touch it" is not a way to design interfaces.

> >Only cost is few lines of code in the drivers where hardware clears
> >faults at read.
>
> As above - the third opinion would be appreciated.

Just email Greg if he likes /sys files with sideffects on read.

Or just think. You never do grep in /sys?

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