On 12/14/2018 02:17 AM, Dmitry Torokhov wrote: > On Thu, Dec 13, 2018 at 4:44 PM Marek Vasut <marex@xxxxxxx> wrote: >> >> On 12/13/2018 08:08 PM, Dmitry Torokhov wrote: >>> On Thu, Dec 13, 2018 at 7:15 AM Marek Vasut <marex@xxxxxxx> wrote: >>>> >>>> Get rid of the workqueue, just spawn a threaded IRQ and handle >>>> all the touchscreen readouts in the handler thread. >>> >>> So we reliably get interrupt on release? >> >> What am I missing here , can you elaborate a bit ? > > If I'm reading the old code correctly it would be OK even if interrupt > was only delivered on initial touch, and then we'd be simply polling > the device... Sure, although that's not how the controller behaves, so do we care about retaining that behavior ? >> >>> Also this probably means that clients have to use level interrupts.... >> >> The interrupt line of the ILI2511 is indeed level triggered (pen/finger >> down means IRQ line goes down, pen/finger up means it goes up). > > So what happens when pen goes up just as you are leaving the ISR? The > controller would clear interrupt, but you already reported touch and > would not report release. The controller needs to make sure that it > keeps the line low even after you removed pen/finger, until you read > controller state once again so you can reliably report touch release. > > Does this make sense? Yeah, that makes sense, so we probably want to retain the workqueue afterall ? Or is there a better option ? -- Best regards, Marek Vasut