@@ -20,6 +20,7 @@
#include <linux/kfifo.h>
#include <linux/time.h>
#include <linux/timer.h>
+#include <linux/list.h>
#include <media/rc-map.h>
extern int rc_core_debug;
@@ -35,6 +36,16 @@ enum rc_driver_type {
};
/**
+ * struct rc_wakeup_scancode - represents a single IR code sample
+ * @value: scan code value
+ * @list: linked list pointer
+ */
+struct rc_wakeup_scancode {
+ u8 value;
+ struct list_head list_item;
+};
+
+/**
* struct rc_dev - represents a remote control device
* @dev: driver model's view of this device
* @input_name: name of the input child device
@@ -84,6 +95,7 @@ enum rc_driver_type {
* device doesn't interrupt host until it sees IR pulses
* @s_learning_mode: enable wide band receiver used for learning
* @s_carrier_report: enable carrier reports
+ * @s_wakeup_scancodes: set/get IR scancode to wake hardware from sleep states
*/
struct rc_dev {
struct device dev;
@@ -127,6 +139,7 @@ struct rc_dev {
void (*s_idle)(struct rc_dev *dev, bool enable);
int (*s_learning_mode)(struct rc_dev *dev, int enable);
int (*s_carrier_report) (struct rc_dev *dev, int enable);
+ int (*s_wakeup_scancodes) (struct rc_dev *dev, struct list_head *scancode_list, int write);
};
#define to_rc_dev(d) container_of(d, struct rc_dev, dev)
Introduce a list for wake scancode values and add callback for sysfs reads/writes. Signed-off-by: Antti Seppälä <a.seppala@gmail.com> --- include/media/rc-core.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)