Re: Strange timer LED behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> >>>> Yep. It allows hardware to provide different values if it can only
> >>>> blink at fixed rate.
> >>> 
> >>> Ok, I understand how hardware might make a different choice, but in this scenario we’re using software to blink, so everything is handled by the kernel.  Also, if the interface is hardware enabled, isn’t the path at line 177 used (which returns before the default is set)?
> >> 
> >> Why should software blink need to select a default rate since it should be able to handle all requests (even 0, 0)?
> >> 
> > 
> > How can software blink at "0, 0"?
> 
> This would mean, don’t blink.  :).

Can't change that now.

> Since we’re using sysfs, we need to update those values in 2 FS writes.  It appears that the sysfs is reordering the writes, so we can’t control what value is written when, so it glitches for us.  We change off first, then on, but the order of the calls in the kernel is on first (with off already 0), the kernel changes values to default, then the off is written, leaving on with a value of 500 (we set it to 0) and off with the value we wanted.
>

Aha, okay, so races are bad and patch to fix them would be probably accepted.

> Is there a way to avoid this?  Even if we write the on value twice,
>  it will flash for 500ms at least once…

There should be. Can you simply write new values to on and off,
without writing zeros there?

If not, can you use 1 instead of zero?

> 
> I tried setting the trigger to none, but of course this disabled the display settings and setting the trigger to timer ends up flashing at the default rate, which is also what we don’t want.
>

If there's no reasonable value to change the frequency, we'll need to
fix that.

Best regards,
							Pavel

-- 
http://www.livejournal.com/~pavelmachek

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux