Input: synaptics-rmi4 - move IRQ handling to rmi_driver

The attn IRQ is related to the chip, rather than the transport, so move
all handling of interrupts to the core driver. This also makes sure that
there are no races between interrupts and availability of the resources
used by the core driver.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Bjorn Andersson 2016-11-08 16:34:57 -08:00 committed by Dmitry Torokhov
parent 8029a283c4
commit 3aeed5b573
4 changed files with 83 additions and 143 deletions

View file

@ -204,9 +204,11 @@ struct rmi_device_platform_data_spi {
* @reset_delay_ms - after issuing a reset command to the touch sensor, the
* driver waits a few milliseconds to give the firmware a chance to
* to re-initialize. You can override the default wait period here.
* @irq: irq associated with the attn gpio line, or negative
*/
struct rmi_device_platform_data {
int reset_delay_ms;
int irq;
struct rmi_device_platform_data_spi spi_data;
@ -352,8 +354,7 @@ struct rmi_driver_data {
int rmi_register_transport_device(struct rmi_transport_dev *xport);
void rmi_unregister_transport_device(struct rmi_transport_dev *xport);
int rmi_process_interrupt_requests(struct rmi_device *rmi_dev);
int rmi_driver_suspend(struct rmi_device *rmi_dev);
int rmi_driver_resume(struct rmi_device *rmi_dev);
int rmi_driver_suspend(struct rmi_device *rmi_dev, bool enable_wake);
int rmi_driver_resume(struct rmi_device *rmi_dev, bool clear_wake);
#endif