[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E2CAE7F7B064EA49B5CE7EE9A4BB167D151BB713DB@KCINPUNHJCMS01.kpit.com>
Date: Mon, 9 May 2011 16:03:41 +0530
From: Ashish Jangam <Ashish.Jangam@...tcummins.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC: "sameo@...nedhand.com" <sameo@...nedhand.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dajun Chen <Dajun.Chen@...semi.com>
Subject: RE: [PATCHv2 -next] MFD: MFD module of DA9052 PMIC driver
> -----Original Message-----
> From: Mark Brown [mailto:broonie@...nsource.wolfsonmicro.com]
> Sent: Tuesday, May 03, 2011 8:15 PM
> To: Ashish Jangam
> Cc: sameo@...nedhand.com; linux-kernel@...r.kernel.org; Dajun Chen
> Subject: Re: [PATCHv2 -next] MFD: MFD module of DA9052 PMIC driver
>
> On Tue, May 03, 2011 at 07:30:54PM +0530, Ashish Jangam wrote:
>
> > +int da9052_unmask_events(struct da9052 *da9052, unsigned int events)
> > +{
> > + uint8_t v[4];
> > +
> > + da9052->events_mask &= ~events;
> > +
> > + v[0] = (da9052->events_mask & 0xff);
> > + v[1] = (da9052->events_mask >> 8) & 0xff;
> > + v[2] = (da9052->events_mask >> 16) & 0xff;
> > + v[3] = (da9052->events_mask >> 24) & 0xff;
> > +
> > + return da9052_group_write(da9052, DA9052_IRQ_MASK_A_REG, 4, v);
> > +}
> > +
> > +int da9052_mask_events(struct da9052 *da9052, unsigned int events)
> > +{
> > + uint8_t v[4];
> > +
> > + da9052->events_mask |= events;
> > +
> > + v[0] = (da9052->events_mask & 0xff);
> > + v[1] = (da9052->events_mask >> 8) & 0xff;
> > + v[2] = (da9052->events_mask >> 16) & 0xff;
> > + v[3] = (da9052->events_mask >> 24) & 0xff;
> > +
> > + return da9052_group_write(da9052, DA9052_IRQ_MASK_A_REG, 4, v);
> > +}
>
> My previous queries about why this is here and not in the IRQ code still
> stand.
>
> > +static void da9052_irq_sync_unlock(struct irq_data *data)
> > +{
> > + struct da9052 *da9052 = irq_data_get_irq_chip_data(data);
> > + struct da9052_irq_data *irq_data = irq_to_da9052_irq(da9052,
> > + data->irq);
> > +
> > + da9052_mask_events(da9052, irq_data->event);
> > + mutex_unlock(&da9052->irq_lock);
>
> What happens if an event was enabled while the bus was locked?
Event stays in the hardware till it's not explicitly cleared. Hence there won't be any event loss.
Powered by blists - more mailing lists