imon.c (6bda96447cef24fbf97a798b1ea664224d5fdc25) | imon.c (ca86674b8a93ea11c4bb6f4dd0113b1adf1fa841) |
---|---|
1/* 2 * imon.c: input and display driver for SoundGraph iMON IR/VFD/LCD 3 * 4 * Copyright(C) 2010 Jarod Wilson <jarod@wilsonet.com> 5 * Portions based on the original lirc_imon driver, 6 * Copyright(C) 2004 Venky Raju(dev@venky.ws) 7 * 8 * Huge thanks to R. Geoff Newbury for invaluable debugging on the --- 1132 unchanged lines hidden (view full) --- 1141 1142static u32 imon_remote_key_lookup(struct imon_context *ictx, u32 scancode) 1143{ 1144 u32 keycode; 1145 u32 release; 1146 bool is_release_code = false; 1147 1148 /* Look for the initial press of a button */ | 1/* 2 * imon.c: input and display driver for SoundGraph iMON IR/VFD/LCD 3 * 4 * Copyright(C) 2010 Jarod Wilson <jarod@wilsonet.com> 5 * Portions based on the original lirc_imon driver, 6 * Copyright(C) 2004 Venky Raju(dev@venky.ws) 7 * 8 * Huge thanks to R. Geoff Newbury for invaluable debugging on the --- 1132 unchanged lines hidden (view full) --- 1141 1142static u32 imon_remote_key_lookup(struct imon_context *ictx, u32 scancode) 1143{ 1144 u32 keycode; 1145 u32 release; 1146 bool is_release_code = false; 1147 1148 /* Look for the initial press of a button */ |
1149 keycode = ir_g_keycode_from_table(ictx->rdev, scancode); | 1149 keycode = rc_g_keycode_from_table(ictx->rdev, scancode); |
1150 ictx->rc_toggle = 0x0; 1151 ictx->rc_scancode = scancode; 1152 1153 /* Look for the release of a button */ 1154 if (keycode == KEY_RESERVED) { 1155 release = scancode & ~0x4000; | 1150 ictx->rc_toggle = 0x0; 1151 ictx->rc_scancode = scancode; 1152 1153 /* Look for the release of a button */ 1154 if (keycode == KEY_RESERVED) { 1155 release = scancode & ~0x4000; |
1156 keycode = ir_g_keycode_from_table(ictx->rdev, release); | 1156 keycode = rc_g_keycode_from_table(ictx->rdev, release); |
1157 if (keycode != KEY_RESERVED) 1158 is_release_code = true; 1159 } 1160 1161 ictx->release_code = is_release_code; 1162 1163 return keycode; 1164} --- 12 unchanged lines hidden (view full) --- 1177 * the table trim, we always or in the bits to look up 0x8000ff4xx, 1178 * but we can't or them into all codes, as some keys are decoded in 1179 * a different way w/o the same use of the toggle bit... 1180 */ 1181 if (scancode & 0x80000000) 1182 scancode = scancode | MCE_KEY_MASK | MCE_TOGGLE_BIT; 1183 1184 ictx->rc_scancode = scancode; | 1157 if (keycode != KEY_RESERVED) 1158 is_release_code = true; 1159 } 1160 1161 ictx->release_code = is_release_code; 1162 1163 return keycode; 1164} --- 12 unchanged lines hidden (view full) --- 1177 * the table trim, we always or in the bits to look up 0x8000ff4xx, 1178 * but we can't or them into all codes, as some keys are decoded in 1179 * a different way w/o the same use of the toggle bit... 1180 */ 1181 if (scancode & 0x80000000) 1182 scancode = scancode | MCE_KEY_MASK | MCE_TOGGLE_BIT; 1183 1184 ictx->rc_scancode = scancode; |
1185 keycode = ir_g_keycode_from_table(ictx->rdev, scancode); | 1185 keycode = rc_g_keycode_from_table(ictx->rdev, scancode); |
1186 1187 /* not used in mce mode, but make sure we know its false */ 1188 ictx->release_code = false; 1189 1190 return keycode; 1191} 1192 1193static u32 imon_panel_key_lookup(u64 code) --- 365 unchanged lines hidden (view full) --- 1559 1560 spin_lock_irqsave(&ictx->kc_lock, flags); 1561 if (ictx->kc == KEY_UNKNOWN) 1562 goto unknown_key; 1563 spin_unlock_irqrestore(&ictx->kc_lock, flags); 1564 1565 if (ktype != IMON_KEY_PANEL) { 1566 if (press_type == 0) | 1186 1187 /* not used in mce mode, but make sure we know its false */ 1188 ictx->release_code = false; 1189 1190 return keycode; 1191} 1192 1193static u32 imon_panel_key_lookup(u64 code) --- 365 unchanged lines hidden (view full) --- 1559 1560 spin_lock_irqsave(&ictx->kc_lock, flags); 1561 if (ictx->kc == KEY_UNKNOWN) 1562 goto unknown_key; 1563 spin_unlock_irqrestore(&ictx->kc_lock, flags); 1564 1565 if (ktype != IMON_KEY_PANEL) { 1566 if (press_type == 0) |
1567 ir_keyup(ictx->rdev); | 1567 rc_keyup(ictx->rdev); |
1568 else { | 1568 else { |
1569 ir_keydown(ictx->rdev, ictx->rc_scancode, ictx->rc_toggle); | 1569 rc_keydown(ictx->rdev, ictx->rc_scancode, ictx->rc_toggle); |
1570 spin_lock_irqsave(&ictx->kc_lock, flags); 1571 ictx->last_keycode = ictx->kc; 1572 spin_unlock_irqrestore(&ictx->kc_lock, flags); 1573 } 1574 return; 1575 } 1576 1577 /* Only panel type events left to process now */ --- 880 unchanged lines hidden --- | 1570 spin_lock_irqsave(&ictx->kc_lock, flags); 1571 ictx->last_keycode = ictx->kc; 1572 spin_unlock_irqrestore(&ictx->kc_lock, flags); 1573 } 1574 return; 1575 } 1576 1577 /* Only panel type events left to process now */ --- 880 unchanged lines hidden --- |