lkml.org 
[lkml]   [2009]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] input: misc: add twl4030-pwrbutton driver
On Fri, 27 Feb 2009 21:28:02 +0200
Felipe Balbi <me@felipebalbi.com> wrote:

> +static irqreturn_t powerbutton_irq(int irq, void *dev_id)
> +{
> + int err;
> + u8 value;
> +
> +#ifdef CONFIG_LOCKDEP
> + /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
> + * we don't want and can't tolerate. Although it might be
> + * friendlier not to borrow this thread context...
> + */
> + local_irq_enable();
> +#endif
> +
> + err = twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value,
> + STS_HW_CONDITIONS);
> + if (!err) {
> + input_report_key(powerbutton_dev, KEY_POWER,
> + value & PWR_PWRON_IRQ);
> + } else {
> + dev_err(dbg_dev, "twl4030: i2c error %d while reading TWL4030"
> + " PM_MASTER STS_HW_CONDITIONS register\n", err);
> + }
> +
> + return IRQ_HANDLED;
> +}

Tell us some more about this lockdep thing ;)


\
 
 \ /
  Last update: 2009-02-27 21:37    [W:0.160 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site