mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Bowler <jbowler@acm.org>
To: "'LKML'" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 0/12] LED Class, Triggers and Drivers
Date: Sun, 5 Feb 2006 12:10:27 -0800	[thread overview]
Message-ID: <001001c62a90$35171440$1001a8c0@kalmiopsis> (raw)
In-Reply-To: <1139154718.6438.78.camel@localhost.localdomain>

From: Richard Purdie [mailto:rpurdie@rpsys.net]
>This is an updated version of the LED class/subsystem. The main change
>is the renamed API - I've settled on led_device -> led_classdev. Other
>minor issues like the error cases in the timer trigger were also fixed.

In the previous version 'frequency' for the timer trigger was actually
half the period of the oscillation - the time in ms between each (on/off)
state transition.

In this version 'frequency' is the frequency of the oscillation in Hz.

That creates a big problem for me because the value is parsed as an
integer and I can no longer achieve slow flash rates (<1Hz).  Since I
have to be able to do this I made a fairly crude patch to store the
frequency in mHz, not Hz, and to handle a decimal point in the value.

Possible fixes:

1) Use 'period' not 'frequency' and accept a value in ms (as before,
   but with the off-by-2 error corrected.)
2) Use 'mark' and 'space' or 'time_on', 'time_off' or something similar
   and remove 'duty' (I *do* need flashing with duty cycle != 0.5)
3) Accept fractional frequency (as in my patch).
4) Provide both period and frequency as integers and accept that
   long period flashs will come out as frequency '1' (but the period
   would still need to be in ms, because periods about 1500ms are of
   significant utility.)

John Bowler <jbowler@acm.org>


  reply	other threads:[~2006-02-05 20:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-05 15:51 Richard Purdie
2006-02-05 20:10 ` John Bowler [this message]
2006-02-08  2:45   ` [PATCH 4/12] LED: Add LED Timer Trigger Richard Purdie
2006-02-05 21:51 ` [PATCH 0/12] LED Class, Triggers and Drivers Pavel Machek
2006-02-06 11:34 ` Jiri Slaby

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='001001c62a90$35171440$1001a8c0@kalmiopsis' \
    --to=jbowler@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®