Linux LED subsystem development
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Bollinger, Seth" <Seth.Bollinger@digi.com>
Cc: "linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
	Dan Murphy <dmurphy@ti.com>, Seth Bollinger <seth.boll@gmail.com>
Subject: Re: Strange timer LED behavior
Date: Sat, 24 Oct 2020 09:45:17 +0200	[thread overview]
Message-ID: <20201024074516.GA32500@amd> (raw)
In-Reply-To: <6C8DDBC1-FCAF-411A-AA38-108CEE58EC9C@digi.com>

[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]

On Thu 2020-10-22 11:34:34, Bollinger, Seth wrote:
> 
> >>> Yeah. Don't do that! :-). For solid on/solid off, just turn the
> >>> trigger off. For blinking, use timer trigger.
> >> 
> >> If I want to go from on or off to flashing, I need to set the timer trigger, which results in a 500 ms flash rate until the real rates are set.  This results in a noticeably different first blink.  I guess we’re looking for smooth control of the LED.
> >> 
> > 
> > Okay, that's fair requirement, I guess.
> > 
> > If you have proposals how to solve this in a nice way, go ahead.
> > 
> > As a hack...
> > 
> > I believe you can go from on to off like this:
> > 
> > on:9999,off:0 -> on:9999,off:1 -> on:1,off:9999 -> on:0,off:9999.
> > 
> > (And I believe we should document this somewhere).
> 
> 
> I hate to respond to this, because it makes me look stupid, but…  :)
> 
> The problem turned out to be that the original author was using buffered IO to do the sysfs writes (which I didn’t notice until yesterday).  When I switched to a different method, the writes were ordered correctly and didn’t glitch.
> 
> Apologies for bothering you all, and great thanks for your assistance!

Hehe, okay. Good that it is solved.

(And yes, such bugs happen, forgetting about buffered i/o is quite
common).

Best regards,
								Pavel

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2020-10-24  7:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 13:08 Strange timer LED behavior Bollinger, Seth
2020-10-19 14:06 ` Pavel Machek
2020-10-19 14:16   ` Bollinger, Seth
2020-10-20 12:04     ` Bollinger, Seth
2020-10-20 12:21       ` Pavel Machek
2020-10-20 12:31         ` Bollinger, Seth
2020-10-20 18:08           ` Pavel Machek
2020-10-20 18:28             ` Bollinger, Seth
2020-10-20 18:33               ` Pavel Machek
2020-10-20 18:35                 ` Bollinger, Seth
2020-10-20 18:40                   ` Pavel Machek
2020-10-20 18:51                     ` Bollinger, Seth
2020-10-22 10:06                       ` Pavel Machek
2020-10-22 11:34                         ` Bollinger, Seth
2020-10-24  7:45                           ` Pavel Machek [this message]
2020-10-21 20:23                   ` Jacek Anaszewski
2020-10-22 11:35                     ` Bollinger, Seth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201024074516.GA32500@amd \
    --to=pavel@ucw.cz \
    --cc=Seth.Bollinger@digi.com \
    --cc=dmurphy@ti.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=seth.boll@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox