lkml.org 
[lkml]   [2013]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: how to represent sequence of brightnesses in /sys (was Re: [PATCH] Add the LED burst trigger)
Hi!

> > Idea would be "sequence of brigtnesses" (one file) and "delay between
> > changes" (second file).
>
> Ick.
>
> > Reason to do it in kernel is that some machines actually have
> > "coprocessor" on i2c that can do it while main CPU is suspended. (For
> > more reasons, see beggining of thread).
>
> Ick ick.
>
> > Binary attribute with array of bytes should be acceptable, rights?
>
> Not at all.
>
> > (IOW write(..., buf, size) )
> >
> > Ascii array of decimal integers -- no so, right?
> >
> > (IOW printf("%d %d ..", buf[0], buf[1]) )
>
> Use an ioctl with a structure to get things correct as a character
> device. As odds are, you aren't going to be able to create a "generic"
> format for all of this for all types of devices that support such a
> "co-processor".

Well, we already do have hw-specific driver in the tree,
drivers/leds/leds-lp55xx-common.c . But the interface is
"interesting" and I believe we should have generic interface and it
should use existing trigger framework -- array of brightnesses does
not seem too complicated.

Do you have suggestion how to pass the brightnesses over sysfs?

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


\
 
 \ /
  Last update: 2013-12-29 12:41    [W:0.062 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site