> > +static irqreturn_t lp8788_irq_handler(int irq, void *ptr)
> > +{
> > + struct lp8788_irq_data *irqd = ptr;
> > + unsigned long delay = msecs_to_jiffies(DEBOUNCE_MSEC);
> > +
> > + queue_delayed_work(irqd->thread, >work, delay);
> > +
> > + return IRQ_HANDLED;
> > +}
>
> Why a delayed
+static irqreturn_t lp8788_irq_handler(int irq, void *ptr)
+{
+ struct lp8788_irq_data *irqd = ptr;
+ unsigned long delay = msecs_to_jiffies(DEBOUNCE_MSEC);
+
+ queue_delayed_work(irqd-thread, irqd-work, delay);
+
+ return IRQ_HANDLED;
+}
Why a delayed work? That's
> > +struct lp8788_irq_data {
> > + struct lp8788 *lp;
> > + struct irq_domain *irqdm;
> > + struct mutex irq_lock;
> > + struct delayed_work work;
> > + struct workqueue_struct *thread;
> > + int enabled[LP8788_INT_MAX];
> > + int irq;
> > + int irq_base;
> > +};
>
> Can you use
+struct lp8788_irq_data {
+ struct lp8788 *lp;
+ struct irq_domain *irqdm;
+ struct mutex irq_lock;
+ struct delayed_work work;
+ struct workqueue_struct *thread;
+ int enabled[LP8788_INT_MAX];
+ int irq;
+ int irq_base;
+};
Can you use regmap-irq? If not
On Wed, Jul 18, 2012 at 02:32:40PM +, Kim, Milo wrote:
> +struct lp8788_irq_data {
> + struct lp8788 *lp;
> + struct irq_domain *irqdm;
> + struct mutex irq_lock;
> + struct delayed_work work;
> + struct workqueue_struct *thread;
> + int enabled[LP8788_INT_MAX];
> +
TI LP8788 PMU supports regulators, battery charger, RTC, backlight driver and
current sinks.
Registers are controlled via the I2C with the regmap-i2c interface.
LP8788 irq domains are defined and used for handling interrupts.
Signed-off-by: Milo(Woogyom) Kim
---
drivers/mfd/Kconfig
TI LP8788 PMU supports regulators, battery charger, RTC, backlight driver and
current sinks.
Registers are controlled via the I2C with the regmap-i2c interface.
LP8788 irq domains are defined and used for handling interrupts.
Signed-off-by: Milo(Woogyom) Kim milo@ti.com
---
On Wed, Jul 18, 2012 at 02:32:40PM +, Kim, Milo wrote:
+struct lp8788_irq_data {
+ struct lp8788 *lp;
+ struct irq_domain *irqdm;
+ struct mutex irq_lock;
+ struct delayed_work work;
+ struct workqueue_struct *thread;
+ int enabled[LP8788_INT_MAX];
+ int
8 matches
Mail list logo