[media] redrat3: make hardware timeout configurable

Instead of hardcoding a timeout, let userspace change it dynamically
by adding a s_timeout ops.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Sean Young
2016-07-10 13:34:38 -03:00
committed by Mauro Carvalho Chehab
parent 25da661a14
commit 4f253cecf8
3 changed files with 41 additions and 1 deletions

View File

@@ -119,6 +119,7 @@ enum rc_filter_type {
* @s_carrier_report: enable carrier reports
* @s_filter: set the scancode filter
* @s_wakeup_filter: set the wakeup scancode filter
* @s_timeout: set hardware timeout in ns
*/
struct rc_dev {
struct device dev;
@@ -174,6 +175,8 @@ struct rc_dev {
struct rc_scancode_filter *filter);
int (*s_wakeup_filter)(struct rc_dev *dev,
struct rc_scancode_filter *filter);
int (*s_timeout)(struct rc_dev *dev,
unsigned int timeout);
};
#define to_rc_dev(d) container_of(d, struct rc_dev, dev)