| /linux/drivers/media/rc/ |
| H A D | ir-rc5-decoder.c | 44 u32 scancode; in ir_rc5_decode() local 124 scancode = system << 16 | command << 8 | xdata; in ir_rc5_decode() 138 scancode = system << 8 | command; in ir_rc5_decode() 151 scancode = system << 6 | command; in ir_rc5_decode() 157 dev_dbg(&dev->dev, "RC5(x/sz) scancode 0x%06x (p: %u, t: %u)\n", in ir_rc5_decode() 158 scancode, protocol, toggle); in ir_rc5_decode() 160 rc_keydown(dev, protocol, scancode, toggle); in ir_rc5_decode() 197 * ir_rc5_encode() - Encode a scancode as a stream of raw events 200 * @scancode: scancode to encode 207 * -EINVAL if the scancode is ambiguous or invalid. [all …]
|
| H A D | ir-nec-decoder.c | 42 u32 scancode; in ir_nec_decode() local 147 scancode = ir_nec_bytes_to_scancode(address, in ir_nec_decode() 156 rc_keydown(dev, rc_proto, scancode, 0); in ir_nec_decode() 172 * ir_nec_scancode_to_raw() - encode an NEC scancode ready for modulation. 174 * @scancode: a single NEC scancode. 176 static u32 ir_nec_scancode_to_raw(enum rc_proto protocol, u32 scancode) in ir_nec_scancode_to_raw() argument 180 data = scancode & 0xff; in ir_nec_scancode_to_raw() 185 addr_inv = (scancode >> 24) & 0xff; in ir_nec_scancode_to_raw() 186 addr = (scancode >> 16) & 0xff; in ir_nec_scancode_to_raw() 187 data_inv = (scancode >> 8) & 0xff; in ir_nec_scancode_to_raw() [all …]
|
| H A D | ir-sony-decoder.c | 38 u32 scancode; in ir_sony_decode() local 148 scancode = device << 16 | subdevice << 8 | function; in ir_sony_decode() 149 dev_dbg(&dev->dev, "Sony(%u) scancode 0x%05x\n", data->count, in ir_sony_decode() 150 scancode); in ir_sony_decode() 151 rc_keydown(dev, protocol, scancode, 0); in ir_sony_decode() 176 * ir_sony_encode() - Encode a scancode as a stream of raw events 179 * @scancode: scancode to encode 187 static int ir_sony_encode(enum rc_proto protocol, u32 scancode, in ir_sony_encode() argument 195 raw = (scancode & 0x7f) | ((scancode & 0x1f0000) >> 9); in ir_sony_encode() 198 raw = (scancode & 0x7f) | ((scancode & 0xff0000) >> 9); in ir_sony_encode() [all …]
|
| H A D | ir-mce_kbd-decoder.c | 149 static void ir_mce_kbd_process_keyboard_data(struct rc_dev *dev, u32 scancode) in ir_mce_kbd_process_keyboard_data() argument 151 u8 keydata1 = (scancode >> 8) & 0xff; in ir_mce_kbd_process_keyboard_data() 152 u8 keydata2 = (scancode >> 16) & 0xff; in ir_mce_kbd_process_keyboard_data() 153 u8 shiftmask = scancode & 0xff; in ir_mce_kbd_process_keyboard_data() 180 static void ir_mce_kbd_process_mouse_data(struct rc_dev *dev, u32 scancode) in ir_mce_kbd_process_mouse_data() argument 183 u8 xdata = (scancode >> 7) & 0x7f; in ir_mce_kbd_process_mouse_data() 184 u8 ydata = (scancode >> 14) & 0x7f; in ir_mce_kbd_process_mouse_data() 187 bool right = scancode & 0x40; in ir_mce_kbd_process_mouse_data() 188 bool left = scancode & 0x20; in ir_mce_kbd_process_mouse_data() 220 u32 scancode; in ir_mce_kbd_decode() local [all …]
|
| H A D | ir-rc6-decoder.c | 83 u32 scancode; in ir_rc6_decode() local 214 scancode = data->body; in ir_rc6_decode() 217 dev_dbg(&dev->dev, "RC6(0) scancode 0x%04x (toggle: %u)\n", in ir_rc6_decode() 218 scancode, toggle); in ir_rc6_decode() 228 scancode = data->body; in ir_rc6_decode() 239 switch (scancode & RC6_6A_LCC_MASK) { in ir_rc6_decode() 244 toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK); in ir_rc6_decode() 245 scancode &= ~RC6_6A_MCE_TOGGLE_MASK; in ir_rc6_decode() 258 dev_dbg(&dev->dev, "RC6(6A) proto 0x%04x, scancode 0x%08x (toggle: %u)\n", in ir_rc6_decode() 259 protocol, scancode, toggle); in ir_rc6_decode() [all …]
|
| H A D | ir-sanyo-decoder.c | 49 u32 scancode; in ir_sanyo_decode() local 153 scancode = address << 8 | command; in ir_sanyo_decode() 154 dev_dbg(&dev->dev, "SANYO scancode: 0x%06x\n", scancode); in ir_sanyo_decode() 155 rc_keydown(dev, RC_PROTO_SANYO, scancode, 0); in ir_sanyo_decode() 178 * ir_sanyo_encode() - Encode a scancode as a stream of raw events 181 * @scancode: scancode to encode 189 static int ir_sanyo_encode(enum rc_proto protocol, u32 scancode, in ir_sanyo_encode() argument 196 raw = ((u64)(bitrev16(scancode >> 8) & 0xfff8) << (8 + 8 + 13 - 3)) | in ir_sanyo_encode() 197 ((u64)(bitrev16(~scancode >> 8) & 0xfff8) << (8 + 8 + 0 - 3)) | in ir_sanyo_encode() 198 ((bitrev8(scancode) & 0xff) << 8) | in ir_sanyo_encode() [all …]
|
| H A D | ir-sharp-decoder.c | 43 u32 msg, echo, address, command, scancode; in ir_sharp_decode() local 155 scancode = address << 8 | command; in ir_sharp_decode() 156 dev_dbg(&dev->dev, "Sharp scancode 0x%04x\n", scancode); in ir_sharp_decode() 158 rc_keydown(dev, RC_PROTO_SHARP, scancode, 0); in ir_sharp_decode() 181 * ir_sharp_encode() - Encode a scancode as a stream of raw events 184 * @scancode: scancode to encode 192 static int ir_sharp_encode(enum rc_proto protocol, u32 scancode, in ir_sharp_encode() argument 199 raw = (((bitrev8(scancode >> 8) >> 3) << 8) & 0x1f00) | in ir_sharp_encode() 200 bitrev8(scancode); in ir_sharp_encode() 208 raw = (((bitrev8(scancode >> 8) >> 3) << 8) & 0x1f00) | in ir_sharp_encode() [all …]
|
| H A D | ir-jvc-decoder.c | 128 u32 scancode; in ir_jvc_decode() local 129 scancode = (bitrev8((data->bits >> 8) & 0xff) << 8) | in ir_jvc_decode() 131 dev_dbg(&dev->dev, "JVC scancode 0x%04x\n", scancode); in ir_jvc_decode() 132 rc_keydown(dev, RC_PROTO_JVC, scancode, data->toggle); in ir_jvc_decode() 177 * ir_jvc_encode() - Encode a scancode as a stream of raw events 180 * @scancode: scancode to encode 188 static int ir_jvc_encode(enum rc_proto protocol, u32 scancode, in ir_jvc_encode() argument 193 u32 raw = (bitrev8((scancode >> 8) & 0xff) << 8) | in ir_jvc_encode() 194 (bitrev8((scancode >> 0) & 0xff) << 0); in ir_jvc_encode()
|
| H A D | ir-rcmm-decoder.c | 62 u32 scancode; in ir_rcmm_decode() local 152 scancode = data->bits & ~0x8000; in ir_rcmm_decode() 155 scancode = data->bits; in ir_rcmm_decode() 159 rc_keydown(dev, RC_PROTO_RCMM32, scancode, toggle); in ir_rcmm_decode() 201 static int ir_rcmm_encode(enum rc_proto protocol, u32 scancode, in ir_rcmm_encode() argument 209 ret = ir_rcmm_rawencoder(&e, max, 32, scancode); in ir_rcmm_encode() 212 ret = ir_rcmm_rawencoder(&e, max, 24, scancode); in ir_rcmm_encode() 215 ret = ir_rcmm_rawencoder(&e, max, 12, scancode); in ir_rcmm_encode()
|
| H A D | ir-imon-decoder.c | 110 * aren't parsed as a scancode made up of less bits. in ir_imon_decode() 113 * the scancode with about 12ms between them. So, make sure in ir_imon_decode() 115 * we're at a new scancode. in ir_imon_decode() 179 * ir_imon_encode() - Encode a scancode as a stream of raw events 182 * @scancode: scancode to encode 190 static int ir_imon_encode(enum rc_proto protocol, u32 scancode, in ir_imon_encode() argument 202 pulse = !(scancode & (BIT(i) | BIT(i + 1))); in ir_imon_encode() 214 pulse = !(scancode & BIT(i)); in ir_imon_encode()
|
| /linux/Documentation/userspace-api/media/rc/ |
| H A D | rc-protos.rst | 14 Therefore out the output of the IR decoder is a scancode; a single u32 35 The scancode encoding is *not* consistent with the lirc daemon (lircd) rc5 38 .. flat-table:: rc5 bits scancode mapping 43 - scancode bit 80 schemes. This bit is stored in bit 6 of the scancode, inverted. This is 85 This is much like rc-5 but one bit longer. The scancode is encoded 88 .. flat-table:: rc-5-sz bits scancode mapping 93 - scancode bit 133 .. flat-table:: rc-5x-20 bits scancode mapping 138 - scancode bit [all …]
|
| H A D | keytable.c.rst | 39 printf("scancode 0x%04x = %s (0x%02x)\\n", codes[0], p->name, codes[1]); 45 printf("scancode %d = '%c' (0x%02x)\\n", codes[0], codes[1], codes[1]); 47 printf("scancode %d = 0x%02x\\n", codes[0], codes[1]); 70 " %s <device> <scancode> <keycode>\\n" 105 char *scancode, *keycode, s[2048]; 123 scancode=strtok(s,"\\n\\t =:"); 124 if (!scancode) { 125 perror ("parsing input file scancode"); 128 if (!strcasecmp(scancode, "scancode")) { 129 scancode = strtok(NULL,"\\n\\t =:"); [all …]
|
| H A D | lirc-dev-intro.rst | 52 .. _lirc-mode-scancode: 53 .. _lirc-scancode-flag-toggle: 54 .. _lirc-scancode-flag-repeat: 61 the desired scancode set in the ``scancode`` member, :c:type:`rc_proto` 66 The ``scancode`` field is set to the received scancode and the 68 :c:type:`rc_proto`. If the scancode maps to a valid key code, this is set 77 repeating the entire scancode, the remote sends a shorter message with 78 no scancode, which just means button is held, a "repeat". When this is 79 received, the ``LIRC_SCANCODE_FLAG_REPEAT`` is set and the scancode and 88 (in ``CLOCK_MONOTONIC``) when the scancode was decoded. [all …]
|
| H A D | lirc-write.rst | 55 When in :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` mode, one 57 ``EINVAL`` is returned. Set the desired scancode in the ``scancode`` member, 61 for the protocol or the scancode is not valid for the specified protocol, 62 ``EINVAL`` is returned. The write function blocks until the scancode
|
| /linux/tools/testing/selftests/ir/ |
| H A D | ir_loopback.c | 118 ksft_exit_fail_msg("failed to set scancode rec mode %s: %m\n", in main() 123 ksft_exit_fail_msg("failed to set scancode send mode %s: %m\n", in main() 143 unsigned int scancode = rand() & protocols[i].mask; in main() local 147 scancode |= 0x800f0000; in main() 150 (((scancode >> 16) ^ ~(scancode >> 8)) & 0xff) == 0) in main() 154 (((scancode >> 8) ^ ~scancode) & 0xff) == 0) in main() 158 (scancode & 0x000c0000) != 0x000c0000 && in main() 159 scancode & 0x00008000) in main() 164 .scancode = scancode in main() 167 printf("Testing scancode:%x\n", scancode); in main() [all …]
|
| /linux/arch/m68k/atari/ |
| H A D | atakeyb.c | 137 int scancode; in atari_keyboard_interrupt() local 153 scancode = acia.key_data; in atari_keyboard_interrupt() 157 else if (IS_SYNC_CODE(scancode)) { in atari_keyboard_interrupt() 159 * single scancode */ in atari_keyboard_interrupt() 172 scancode = acia.key_data; /* get it or reset the ACIA, I'll get it! */ in atari_keyboard_interrupt() 176 switch (scancode) { in atari_keyboard_interrupt() 188 kb_state.buf[0] = scancode; in atari_keyboard_interrupt() 200 kb_state.buf[0] = scancode; in atari_keyboard_interrupt() 213 break_flag = scancode & BREAK_MASK; in atari_keyboard_interrupt() 214 scancode &= ~BREAK_MASK; in atari_keyboard_interrupt() [all …]
|
| /linux/drivers/platform/x86/dell/ |
| H A D | dell-wmi-aio.c | 78 unsigned int scancode = 0; in dell_wmi_aio_notify() local 82 /* Most All-In-One correctly return integer scancode */ in dell_wmi_aio_notify() 83 scancode = obj->integer.value; in dell_wmi_aio_notify() 85 scancode, 1, true); in dell_wmi_aio_notify() 92 scancode = event->event[0]; in dell_wmi_aio_notify() 94 /* Broken machines return the scancode in a in dell_wmi_aio_notify() 98 scancode = obj->buffer.pointer[0]; in dell_wmi_aio_notify() 100 if (scancode) in dell_wmi_aio_notify() 103 scancode, 1, true); in dell_wmi_aio_notify()
|
| /linux/drivers/input/keyboard/ |
| H A D | amikbd.c | 169 unsigned char scancode, down; in amikbd_interrupt() local 171 scancode = ~ciaa.sdr; /* get and invert scancode (keyboard is active low) */ in amikbd_interrupt() 176 down = !(scancode & 1); /* lowest bit is release bit */ in amikbd_interrupt() 177 scancode >>= 1; in amikbd_interrupt() 179 if (scancode < 0x78) { /* scancodes < 0x78 are keys */ in amikbd_interrupt() 180 if (scancode == 98) { /* CapsLock is a toggle switch key on Amiga */ in amikbd_interrupt() 181 input_report_key(dev, scancode, 1); in amikbd_interrupt() 182 input_report_key(dev, scancode, 0); in amikbd_interrupt() 184 input_report_key(dev, scancode, down); in amikbd_interrupt() 189 printk(amikbd_messages[scancode - 0x78]); in amikbd_interrupt()
|
| /linux/drivers/media/rc/img-ir/ |
| H A D | img-ir-hw.h | 128 #define IMG_IR_SCANCODE 0 /* new scancode */ 132 * struct img_ir_scancode_req - Scancode request data. 135 * @scancode: Scan code of received message (must be written by 141 u32 scancode; member 155 * @scancode: Pointer to function to convert the IR data into a scancode (it 157 * Returns IMG_IR_SCANCODE to emit new scancode. 160 * @filter: Pointer to function to convert scancode filter to raw hardware 174 /* scancode logic */ 175 int (*scancode)(int len, u64 raw, u64 enabled_protocols, member 225 * @filters: HW filters (derived from scancode filters).
|
| H A D | img-ir-rc6.c | 10 /* Convert RC6 data to a scancode */ 30 * The start bit is not important to recover the scancode. in img_ir_rc6_scancode() 54 request->scancode = addr << 8 | cmd; in img_ir_rc6_scancode() 59 /* Convert RC6 scancode to RC6 data filter */ 110 /* scancode logic */ 111 .scancode = img_ir_rc6_scancode,
|
| H A D | img-ir-nec.c | 12 /* Convert NEC data to a scancode */ 30 request->scancode = bitrev8(addr) << 24 | in img_ir_nec_scancode() 38 request->scancode = addr << 16 | in img_ir_nec_scancode() 45 request->scancode = addr << 8 | in img_ir_nec_scancode() 52 /* Convert NEC scancode to NEC data filter */ 67 * normal filters, guess the protocol from the scancode. in img_ir_nec_filter() 170 /* scancode logic */ 171 .scancode = img_ir_nec_scancode,
|
| H A D | img-ir-rc5.c | 10 /* Convert RC5 data to a scancode */ 33 request->scancode = addr << 8 | cmd; in img_ir_rc5_scancode() 38 /* Convert RC5 scancode to RC5 data filter */ 81 /* scancode logic */ 82 .scancode = img_ir_rc5_scancode,
|
| H A D | img-ir-jvc.c | 10 /* Convert JVC data to a scancode */ 23 request->scancode = cust << 8 | data; in img_ir_jvc_scancode() 27 /* Convert JVC scancode to JVC data filter */ 81 /* scancode logic */ 82 .scancode = img_ir_jvc_scancode,
|
| /linux/drivers/input/serio/ |
| H A D | pcips2.c | 61 unsigned char status, scancode; in pcips2_interrupt() local 71 scancode = inb(ps2if->base + PS2_DATA); in pcips2_interrupt() 72 if (status == 0xff && scancode == 0xff) in pcips2_interrupt() 77 if (hweight8(scancode) & 1) in pcips2_interrupt() 80 serio_interrupt(ps2if->io, scancode, flag); in pcips2_interrupt() 87 unsigned char status, scancode; in pcips2_flush_input() local 93 scancode = inb(ps2if->base + PS2_DATA); in pcips2_flush_input() 94 if (status == 0xff && scancode == 0xff) in pcips2_flush_input()
|
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-class-rc | 48 Sets the scancode filter expected value. 63 Sets the scancode filter mask of bits to compare. 65 of the scancode which should be compared against the expected 106 Sets the scancode wakeup filter expected value. 125 Sets the scancode wakeup filter mask of bits to compare. 128 the bits of the scancode which should be compared against the
|