[Gta04-owner] 3.2-rc6-gta04 - another week, another rc.

NeilBrown neilb at suse.de
Tue Dec 20 23:04:50 CET 2011

On Tue, 20 Dec 2011 19:32:01 +0100 Denis 'GNUto' Carikli <GNUtoo at no-log.org>

> On Tue, 2011-12-20 at 15:21 +0100, Dr. Michael Lauer wrote:
> > >> D-AUX, D-PWR - The LEDS.  The controller itself is on 1V8 and presumably
> > >>       cannot be turned off.
> > >>       So turning all the leds off will remove any current drain here.
> > > 
> > > yes - unless you want to have one LED flashing to indicate a suspend state.
> > > I think the average power drain is low if the duty cycle is e.g. 1:256
> > 
> > That would be pretty cool if there was a simple way to configure that from userland.
> > (sysfs?)
> like /sys/class/leds/*/trigger?

to be precise:

cd /sys/class/leds/gta04:red:aux
modprobe ledtrig-timer
echo timer > trigger
echo 64 > delay_on
echo 32640 > delay_off

Only don't  try it with my current kernel as there are bugs in the leds
driver :-(   Next release will fix it.

The  numbers are in milliseconds and should be the sum of two numbers from
the list:

	0, 64, 128, 192, 256, 384, 512, 768,
	1024, 1536, 2048, 3072, 4096, 5760, 8128, 16320

If you provide a delay that is within 12.5% of a sum, the delay will be
'rounded' to the closest sum.  If there isn't anything close enough it will
use software blinking and won't work in suspend.

The two delays which sum to the number you give are used for a 'fade' and a
'hold' value with the smaller one being for 'fade'.  I would like to make it
possible to choose which is for 'fade' but there is no clean way.
I might arrange that if the delay is even, then the shorter time is fade, and
if the delay is odd, the longer time is for fade...

So the above example is actually on for a lot longer than 64msec as it fades
off for 16seconds.

To get a low duty cycle,  64, 16320 is best.

Some combinations aren't possible as they are hidden by others.
e.g. if you ask for 1 second, you will get 0.512 seconds fade and 0.512
seconds hold.  You cannot get 1024 seconds of just one as there is no way to
ask for it.  I might be able to do another hack so if the request is below
the sum that is found, prefer a small difference, and if it is above, prefer
a large difference.
So 1022 gets you 512/512 while 1026 gets you 1024/0 and 1025 gets 0/1024.

Very hackish...

I've just pushed out a new
with fixed for the leds driver, but without that last hack.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20111221/22217f49/attachment.bin>

More information about the Gta04-owner mailing list