lkml.org 
[lkml]   [2011]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v2 3/4] platform: (TS-5500) add LED support
On Fri, Aug 26, 2011 at 07:40:26PM -0400, Vivien Didelot wrote:

> +static void ts5500_led_work(struct work_struct *work)
> +{
> + struct ts5500_led *led = container_of(work, struct ts5500_led, work);
> + u8 val = led->new_brightness ? led->bit : 0;
> +
> + outb(val, led->ioaddr);
> +}

Can you not do outb() from atomic context? The reason lots of LED
drivers update the hardware in a workqueue is that they communicate with
the hardware over buses that can't be used in atomic context like I2C or
SPI but if that's not an issue then the workqueue is not required and
the code can be simplified.


\
 
 \ /
  Last update: 2011-08-30 00:19    [W:0.063 / U:2.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site