login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
May
»
26
Re: [PATCH 1/2] mc13783: add LED support
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Richard Purdie
Subject:
Re: [PATCH 1/2] mc13783: add LED support
Date: Wednesday, May 26, 2010 - 5:01 am
On Mon, 2010-05-17 at 21:00 +0100, Mark Brown wrote:
quoted text
> On Mon, May 17, 2010 at 09:02:42PM +0200, Uwe Kleine-K?nig wrote: > > On Mon, May 17, 2010 at 06:40:22PM +0200, Philippe R?tornaz wrote: > > > > +static void mc13783_led_set(struct led_classdev *led_cdev, > > > + enum led_brightness value) > > > +{ > > > + struct mc13783_led *led; > > > + > > > + led = container_of(led_cdev, struct mc13783_led, cdev); > > > + led->new_brightness = value; > > > + schedule_work(&led->work); > > > +} > > > I wonder why you don't set the registers directly here, but use a work > > struct instead. > > The LED API allows clients to configure the LEDs from interrupt context > so for devices on blocking buses (like this) the driver needs to defer > the actual implementation of the change. > > It'd be nice to add helpers for this to the LED core, there's quite a > few drivers implementing this idiom now - a flag that does the deferring > of the set() for example.
Agreed, or a wrapper around the core which deferred implementations could just use. I'm open to patches :) Cheers, Richard --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/2] mc13783: LED support
, =?utf-8?q?Philippe=2 ...
, (Mon May 17, 9:40 am)
[PATCH 1/2] mc13783: add LED support
, =?utf-8?q?Philippe=2 ...
, (Mon May 17, 9:40 am)
Re: [PATCH 1/2] mc13783: add LED support
, Uwe Kleine-König
, (Mon May 17, 12:02 pm)
Re: [PATCH 1/2] mc13783: add LED support
, Mark Brown
, (Mon May 17, 1:00 pm)
Re: [PATCH 1/2] mc13783: add LED support
, Philippe =?iso-8859- ...
, (Tue May 18, 4:27 am)
Re: [PATCH 1/2] mc13783: add LED support
, Daniel Mack
, (Tue May 25, 7:57 am)
Re: [PATCH 1/2] mc13783: add LED support
, Philippe =?iso-8859- ...
, (Tue May 25, 8:06 am)
Re: [PATCH 1/2] mc13783: add LED support
, Richard Purdie
, (Wed May 26, 5:01 am)
Re: [PATCH 1/2] mc13783: add LED support
, Richard Purdie
, (Wed May 26, 5:03 am)
Re: [PATCH 1/2] mc13783: add LED support
, Mark Brown
, (Wed May 26, 8:58 am)
Navigation
Mailing list archives
Recent posts
Popular discussions