Re: Problems porting asus_acpi to LED subsystem
From: Pavel Machek
Date: Tue Jul 04 2006 - 18:42:45 EST
On Tue 2006-07-04 10:50:22, Pavel Machek wrote:
> Hi!
>
> > Summary:
> >
> > I'm trying to link asus_acpi into the LED subsystem. My set_brightness
> > callback evaluates an ACPI method to set the LED state. It works fine
> > manually changing the brightness, but when the callback is called by a
> > timer (using the timer or ide-disk triggers), it eventually causes an
> > Oops. I can post my code or the Oops if it would help. I'm new at
> > kernel coding, and I'm not on the list, so please CC me on any reply.
> > Sorry if this isn't appropriate on the list.
>
> I _guess_ the LED subsystem can be called from interrupt, and ACPI
> does not like that. So you probably need to use workqueue to defer
> setting a bit.
I guess
schedule_delayed_work(&sharpsl_bat, msecs_to_jiffies(500));
is one of the ways how to move to process context from potentially
interrupt context. see sharpsl_pm.c for example usage.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/