Re: [PATCH] iio: adc: exynos: do not rely on 'users' counter in ISR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 05, 2020 at 09:00:10PM +0200, Michał Mirosław wrote:
> On Mon, Oct 05, 2020 at 10:36:36AM -0700, dmitry.torokhov@xxxxxxxxx wrote:
> > Hi Michał,
> > 
> > On Mon, Oct 05, 2020 at 01:09:08PM +0200, Michał Mirosław wrote:
> > > and breaking the loop will desync touch
> > > state (I would guess this would be noticable by next user).
> > Upon next open driver will service the interrupt and provide new set of
> > touch coordinates. Userspace is supposed to query current state of
> > device when opening it before starting processing events. Or you are
> > concerned about some other state?
> 
> From the code I would expect that there is a slight window, wher when the
> user releases the touch between close() and open(), the client that open()s
> will see a 'pressed' state until the ISR runs again (probably immediately
> because of pending interrupt). OTOH, maybe the app should be prepared
> for that anyway?

I think users should be prepared for it. There could be many users, so
anyone opening interface device (evdev or similar) can not expect that
the hardware device is in a quiesce state; it could just happen that
finger was on the surface and will be released as someone is opening the
device anyway.

Thanks.

-- 
Dmitry



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux