aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2014-04-03 19:31:30 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-23 20:50:48 -0400
commit120703f9eb32033f0e39bdc552c0273c8ab45f33 (patch)
tree427e55aad9dcfcb91e99b98d508e6fb407e8f600 /include/media
parentaf3a4a9bbeb00df3e42e77240b4cdac5479812f9 (diff)
[media] rc-core: document the protocol type
Right now the protocol information is not preserved, rc-core gets handed a scancode but has no idea which protocol it corresponds to. This patch (which required reading through the source/keymap for all drivers, not fun) makes the protocol information explicit which is important documentation and makes it easier to e.g. support multiple protocols with one decoder (think rc5 and rc-streamzap). The information isn't used yet so there should be no functional changes. [m.chehab@samsung.com: rebased, added cxusb and removed bad whitespacing] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/rc-core.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index fde142e5f25a..00811c9e22b0 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -89,6 +89,7 @@ enum rc_filter_type {
89 * @keyup_jiffies: time (in jiffies) when the current keypress should be released 89 * @keyup_jiffies: time (in jiffies) when the current keypress should be released
90 * @timer_keyup: timer for releasing a keypress 90 * @timer_keyup: timer for releasing a keypress
91 * @last_keycode: keycode of last keypress 91 * @last_keycode: keycode of last keypress
92 * @last_protocol: protocol of last keypress
92 * @last_scancode: scancode of last keypress 93 * @last_scancode: scancode of last keypress
93 * @last_toggle: toggle value of last command 94 * @last_toggle: toggle value of last command
94 * @timeout: optional time after which device stops sending data 95 * @timeout: optional time after which device stops sending data
@@ -113,7 +114,7 @@ enum rc_filter_type {
113 * device doesn't interrupt host until it sees IR pulses 114 * device doesn't interrupt host until it sees IR pulses
114 * @s_learning_mode: enable wide band receiver used for learning 115 * @s_learning_mode: enable wide band receiver used for learning
115 * @s_carrier_report: enable carrier reports 116 * @s_carrier_report: enable carrier reports
116 * @s_filter: set the scancode filter 117 * @s_filter: set the scancode filter
117 * @s_wakeup_filter: set the wakeup scancode filter 118 * @s_wakeup_filter: set the wakeup scancode filter
118 */ 119 */
119struct rc_dev { 120struct rc_dev {
@@ -141,6 +142,7 @@ struct rc_dev {
141 unsigned long keyup_jiffies; 142 unsigned long keyup_jiffies;
142 struct timer_list timer_keyup; 143 struct timer_list timer_keyup;
143 u32 last_keycode; 144 u32 last_keycode;
145 enum rc_type last_protocol;
144 u32 last_scancode; 146 u32 last_scancode;
145 u8 last_toggle; 147 u8 last_toggle;
146 u32 timeout; 148 u32 timeout;
@@ -221,8 +223,8 @@ int rc_open(struct rc_dev *rdev);
221void rc_close(struct rc_dev *rdev); 223void rc_close(struct rc_dev *rdev);
222 224
223void rc_repeat(struct rc_dev *dev); 225void rc_repeat(struct rc_dev *dev);
224void rc_keydown(struct rc_dev *dev, int scancode, u8 toggle); 226void rc_keydown(struct rc_dev *dev, enum rc_type protocol, u32 scancode, u8 toggle);
225void rc_keydown_notimeout(struct rc_dev *dev, int scancode, u8 toggle); 227void rc_keydown_notimeout(struct rc_dev *dev, enum rc_type protocol, u32 scancode, u8 toggle);
226void rc_keyup(struct rc_dev *dev); 228void rc_keyup(struct rc_dev *dev);
227u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode); 229u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode);
228 230