* heartbeat for leds on i2c bus
@ 2007-12-03 10:35 Rodolfo Giometti
2007-12-03 13:45 ` Atsushi Nemoto
0 siblings, 1 reply; 2+ messages in thread
From: Rodolfo Giometti @ 2007-12-03 10:35 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-kernel
Hello,
on my custom board I have some leds mapped on a dedicated chip
connected via i2c bus.
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?
Thanks in advance,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@gnudd.com
Embedded Systems giometti@linux.it
UNIX programming phone: +39 349 2432127
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: heartbeat for leds on i2c bus
2007-12-03 10:35 heartbeat for leds on i2c bus Rodolfo Giometti
@ 2007-12-03 13:45 ` Atsushi Nemoto
0 siblings, 0 replies; 2+ messages in thread
From: Atsushi Nemoto @ 2007-12-03 13:45 UTC (permalink / raw)
To: giometti; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-03 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-03 10:35 heartbeat for leds on i2c bus Rodolfo Giometti
2007-12-03 13:45 ` Atsushi Nemoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).