diff options
| author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2016-12-02 20:48:51 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-12-02 20:51:31 -0500 |
| commit | b908d3cd812abe3f4a74d7550bbf0a8cbcfbe6ed (patch) | |
| tree | ee455c7a27dc2dbb32a0b5c6689998fc90597e1d /include/linux | |
| parent | e621132f934f5922e8a3968edd236f97cdad60cf (diff) | |
Input: synaptics-rmi4 - allow to add attention data
The HID implementation of RMI4 provides the data during
the interrupt (in the input report). We need to provide
a way for this transport driver to provide the attention
data while calling an IRQ.
We use a fifo in rmi_core to not lose any incoming event.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/rmi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/rmi.h b/include/linux/rmi.h index 7780e40a2573..1d4865621493 100644 --- a/include/linux/rmi.h +++ b/include/linux/rmi.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
| 14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
| 15 | #include <linux/input.h> | 15 | #include <linux/input.h> |
| 16 | #include <linux/kfifo.h> | ||
| 16 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
| 18 | #include <linux/types.h> | 19 | #include <linux/types.h> |
| @@ -331,6 +332,12 @@ struct rmi_device { | |||
| 331 | 332 | ||
| 332 | }; | 333 | }; |
| 333 | 334 | ||
| 335 | struct rmi4_attn_data { | ||
| 336 | unsigned long irq_status; | ||
| 337 | size_t size; | ||
| 338 | void *data; | ||
| 339 | }; | ||
| 340 | |||
| 334 | struct rmi_driver_data { | 341 | struct rmi_driver_data { |
| 335 | struct list_head function_list; | 342 | struct list_head function_list; |
| 336 | 343 | ||
| @@ -357,11 +364,15 @@ struct rmi_driver_data { | |||
| 357 | 364 | ||
| 358 | bool enabled; | 365 | bool enabled; |
| 359 | struct mutex enabled_mutex; | 366 | struct mutex enabled_mutex; |
| 367 | DECLARE_KFIFO(attn_fifo, struct rmi4_attn_data, 16); | ||
| 360 | }; | 368 | }; |
| 361 | 369 | ||
| 362 | int rmi_register_transport_device(struct rmi_transport_dev *xport); | 370 | int rmi_register_transport_device(struct rmi_transport_dev *xport); |
| 363 | void rmi_unregister_transport_device(struct rmi_transport_dev *xport); | 371 | void rmi_unregister_transport_device(struct rmi_transport_dev *xport); |
| 364 | 372 | ||
| 373 | void rmi_set_attn_data(struct rmi_device *rmi_dev, unsigned long irq_status, | ||
| 374 | void *data, size_t size); | ||
| 375 | |||
| 365 | int rmi_driver_suspend(struct rmi_device *rmi_dev, bool enable_wake); | 376 | int rmi_driver_suspend(struct rmi_device *rmi_dev, bool enable_wake); |
| 366 | int rmi_driver_resume(struct rmi_device *rmi_dev, bool clear_wake); | 377 | int rmi_driver_resume(struct rmi_device *rmi_dev, bool clear_wake); |
| 367 | #endif | 378 | #endif |
