• Dmitry Torokhov's avatar
    Input: tsc2005 - add open/close · 0b950d3d
    Dmitry Torokhov authored
    Introduce open and close methods for the input device to keep the device
    powered down when it is not in use. Also rework interaction between
    interrupt thread and starting/shutting off/resetting the device: instead
    of taking a mutex in the intterrupt thread and elsewhere disable interrupts
    before transitioning the device in a new state.
    
    The ESD handling is also separated from the IRQ thread; we poll regularly
    at a given interval and simply skip reads if we see that valid interrupt
    happened not so long ago. This allows us not cancel and reschedule ESD
    work from interrupt context all the time.
    Tested-by: default avatarAaro Koskinen <aaro.koskinen@nokia.com>
    Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
    0b950d3d
tsc2005.c 19.1 KB