public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Thomas Tuttle <thinkinginbinary@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Problems porting asus_acpi to LED subsystem
Date: Wed, 5 Jul 2006 00:44:14 +0200	[thread overview]
Message-ID: <20060704224414.GA27265@elf.ucw.cz> (raw)
In-Reply-To: <20060704085022.GB1755@elf.ucw.cz>

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

      parent reply	other threads:[~2006-07-04 22:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-03 20:39 Problems porting asus_acpi to LED subsystem Thomas Tuttle
2006-07-04  8:50 ` Pavel Machek
     [not found]   ` <20060704145040.GA3611@phoenix>
2006-07-04 18:37     ` Pavel Machek
2006-07-04 22:44   ` Pavel Machek [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=20060704224414.GA27265@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thinkinginbinary@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