mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: giometti@enneenne.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: heartbeat for leds on i2c bus
Date: Mon, 03 Dec 2007 22:45:46 +0900 (JST)	[thread overview]
Message-ID: <20071203.224546.35471256.anemo@mba.ocn.ne.jp> (raw)
In-Reply-To: <20071203103557.GT10305@enneenne.com>

On Mon, 3 Dec 2007 11:35:57 +0100, Rodolfo Giometti <giometti@enneenne.com> wrote:
> If I try to use the heartbeat trigger I hang the system... I suppose
> it is due the fact the led_set_brightness() function is called inside
> a kernel timer.
> 
> How I can solve this problem? I thought to modify the trigger adding a
> kernel thread who manage the led which in turn is controlled by the
> kernel timer. It could be the right solution?

Yes, the heartbeat trigger driver assumes brightness_set() routine can
be called from timer.  Other led-triggers also have this assumption.

So I'd suggest using workqueue for your led driver, as like as the
leds-gpio driver.  Or you can just use the leds-gpio driver and
implement the gpio interface (gpio_set_value_cansleep) instead of the
led interface.

---
Atsushi Nemoto

      reply	other threads:[~2007-12-03 13:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03 10:35 Rodolfo Giometti
2007-12-03 13:45 ` Atsushi Nemoto [this message]

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=20071203.224546.35471256.anemo@mba.ocn.ne.jp \
    --to=anemo@mba.ocn.ne.jp \
    --cc=giometti@enneenne.com \
    --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®