Re: [PATCH 3/3] input: touchscreen: mxs-lradc: Add support for touchscreen

From: Dmitry Torokhov
Date: Wed Jun 01 2016 - 14:29:58 EST


On Sat, May 28, 2016 at 07:46:07PM +0200, Ksenija StanojeviÄ wrote:
> On Sat, Apr 30, 2016 at 1:36 AM, Dmitry Torokhov
> <dmitry.torokhov@xxxxxxxxx> wrote:
> > Hi Ksenija,
> >
> > On Fri, Apr 29, 2016 at 01:49:11PM +0200, Ksenija Stanojevic wrote:
> >> +
> >> + mxs_lradc_ts_hw_init(ts);
> >> + for (i = 0; i < lradc->irq_count; i++) {
> >> + ret = devm_request_irq(dev, lradc->irq[i],
> >> + mxs_lradc_ts_handle_irq,
> >
> > Hmm, if you have several interrupts handled by the same interrupt
> > handler you'd need some locking there.
>
> same interrupt handler can run concurrently only on multi cores, so
> why do we need locking?

We do not necessarily need it on single core (unless someone will turn
it int threaded IRQ down the road), but adding it costs almost nothing
and will ensure that the driver will continue working even if block is
moved to multi-core SOC in the future...

Thanks.

--
Dmitry