Home
last modified time | relevance | path

Searched full:scancode (Results 1 – 25 of 250) sorted by relevance

12345678910

/kernel/linux/linux-5.10/kernel/debug/kdb/
Dkdb_keyboard.c37 int scancode, scanstatus; in kdb_get_kbd_char() local
54 * Fetch the scancode in kdb_get_kbd_char()
56 scancode = inb(KBD_DATA_REG); in kdb_get_kbd_char()
72 if (((scancode&0x7f) == 0x2a) || ((scancode&0x7f) == 0x36)) { in kdb_get_kbd_char()
76 if ((scancode & 0x80) == 0) in kdb_get_kbd_char()
83 if ((scancode&0x7f) == 0x1d) { in kdb_get_kbd_char()
87 if ((scancode & 0x80) == 0) in kdb_get_kbd_char()
94 if ((scancode & 0x80) != 0) { in kdb_get_kbd_char()
95 if (scancode == 0x9c) in kdb_get_kbd_char()
100 scancode &= 0x7f; in kdb_get_kbd_char()
[all …]
/kernel/linux/linux-6.6/kernel/debug/kdb/
Dkdb_keyboard.c38 int scancode, scanstatus; in kdb_get_kbd_char() local
55 * Fetch the scancode in kdb_get_kbd_char()
57 scancode = inb(KBD_DATA_REG); in kdb_get_kbd_char()
73 if (((scancode&0x7f) == 0x2a) || ((scancode&0x7f) == 0x36)) { in kdb_get_kbd_char()
77 if ((scancode & 0x80) == 0) in kdb_get_kbd_char()
84 if ((scancode&0x7f) == 0x1d) { in kdb_get_kbd_char()
88 if ((scancode & 0x80) == 0) in kdb_get_kbd_char()
95 if ((scancode & 0x80) != 0) { in kdb_get_kbd_char()
96 if (scancode == 0x9c) in kdb_get_kbd_char()
101 scancode &= 0x7f; in kdb_get_kbd_char()
[all …]
/kernel/linux/linux-6.6/drivers/media/rc/
Dir-rc5-decoder.c44 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 …]
Drc-main.c167 * scancode_to_u64() - converts scancode in &struct input_keymap_entry
168 * @ke: keymap entry containing scancode to be converted.
169 * @scancode: pointer to the location where converted scancode should
175 static int scancode_to_u64(const struct input_keymap_entry *ke, u64 *scancode) in scancode_to_u64() argument
179 *scancode = *((u8 *)ke->scancode); in scancode_to_u64()
183 *scancode = *((u16 *)ke->scancode); in scancode_to_u64()
187 *scancode = *((u32 *)ke->scancode); in scancode_to_u64()
191 *scancode = *((u64 *)ke->scancode); in scancode_to_u64()
202 * ir_create_table() - initializes a scancode table
236 * ir_free_table() - frees memory allocated by a scancode table
[all …]
Dir-nec-decoder.c42 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 …]
Dir-sony-decoder.c38 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 …]
Dir-mce_kbd-decoder.c148 static void ir_mce_kbd_process_keyboard_data(struct rc_dev *dev, u32 scancode) in ir_mce_kbd_process_keyboard_data() argument
150 u8 keydata1 = (scancode >> 8) & 0xff; in ir_mce_kbd_process_keyboard_data()
151 u8 keydata2 = (scancode >> 16) & 0xff; in ir_mce_kbd_process_keyboard_data()
152 u8 shiftmask = scancode & 0xff; in ir_mce_kbd_process_keyboard_data()
179 static void ir_mce_kbd_process_mouse_data(struct rc_dev *dev, u32 scancode) in ir_mce_kbd_process_mouse_data() argument
182 u8 xdata = (scancode >> 7) & 0x7f; in ir_mce_kbd_process_mouse_data()
183 u8 ydata = (scancode >> 14) & 0x7f; in ir_mce_kbd_process_mouse_data()
186 bool right = scancode & 0x40; in ir_mce_kbd_process_mouse_data()
187 bool left = scancode & 0x20; in ir_mce_kbd_process_mouse_data()
219 u32 scancode; in ir_mce_kbd_decode() local
[all …]
Dir-rc6-decoder.c83 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 …]
Dir-sanyo-decoder.c49 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 …]
Dir-sharp-decoder.c43 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 …]
/kernel/linux/linux-5.10/drivers/media/rc/
Dir-rc5-decoder.c44 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 …]
Drc-main.c167 * scancode_to_u64() - converts scancode in &struct input_keymap_entry
168 * @ke: keymap entry containing scancode to be converted.
169 * @scancode: pointer to the location where converted scancode should
175 static int scancode_to_u64(const struct input_keymap_entry *ke, u64 *scancode) in scancode_to_u64() argument
179 *scancode = *((u8 *)ke->scancode); in scancode_to_u64()
183 *scancode = *((u16 *)ke->scancode); in scancode_to_u64()
187 *scancode = *((u32 *)ke->scancode); in scancode_to_u64()
191 *scancode = *((u64 *)ke->scancode); in scancode_to_u64()
202 * ir_create_table() - initializes a scancode table
236 * ir_free_table() - frees memory allocated by a scancode table
[all …]
Dir-nec-decoder.c42 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 …]
Dir-sony-decoder.c38 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 …]
Dir-mce_kbd-decoder.c148 static void ir_mce_kbd_process_keyboard_data(struct rc_dev *dev, u32 scancode) in ir_mce_kbd_process_keyboard_data() argument
150 u8 keydata1 = (scancode >> 8) & 0xff; in ir_mce_kbd_process_keyboard_data()
151 u8 keydata2 = (scancode >> 16) & 0xff; in ir_mce_kbd_process_keyboard_data()
152 u8 shiftmask = scancode & 0xff; in ir_mce_kbd_process_keyboard_data()
179 static void ir_mce_kbd_process_mouse_data(struct rc_dev *dev, u32 scancode) in ir_mce_kbd_process_mouse_data() argument
182 u8 xdata = (scancode >> 7) & 0x7f; in ir_mce_kbd_process_mouse_data()
183 u8 ydata = (scancode >> 14) & 0x7f; in ir_mce_kbd_process_mouse_data()
186 bool right = scancode & 0x40; in ir_mce_kbd_process_mouse_data()
187 bool left = scancode & 0x20; in ir_mce_kbd_process_mouse_data()
219 u32 scancode; in ir_mce_kbd_decode() local
[all …]
Dir-rc6-decoder.c83 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 …]
/kernel/linux/linux-5.10/Documentation/userspace-api/media/rc/
Drc-protos.rst14 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 …]
Dkeytable.c.rst39 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 …]
Dlirc-dev-intro.rst52 .. _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 …]
/kernel/linux/linux-6.6/Documentation/userspace-api/media/rc/
Drc-protos.rst14 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 …]
Dkeytable.c.rst39 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 …]
/kernel/linux/linux-5.10/tools/testing/selftests/ir/
Dir_loopback.c109 ksft_exit_fail_msg("failed to set scancode rec mode %s: %m\n", in main()
114 ksft_exit_fail_msg("failed to set scancode send mode %s: %m\n", in main()
134 unsigned int scancode = rand() & protocols[i].mask; in main() local
138 scancode |= 0x800f0000; in main()
141 (((scancode >> 16) ^ ~(scancode >> 8)) & 0xff) == 0) in main()
145 (((scancode >> 8) ^ ~scancode) & 0xff) == 0) in main()
149 (scancode & 0x000c0000) != 0x000c0000 && in main()
150 scancode & 0x00008000) in main()
155 .scancode = scancode in main()
158 printf("Testing scancode:%x\n", scancode); in main()
[all …]
/kernel/linux/linux-6.6/tools/testing/selftests/ir/
Dir_loopback.c118 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 …]
/kernel/linux/linux-5.10/include/media/
Drc-core.h21 * @RC_DRIVER_SCANCODE: Driver or hardware generates a scancode.
35 * @data: Scancode data to match.
36 * @mask: Mask of bits of scancode to compare.
109 * @scancode_filter: scancode filter
110 * @scancode_wakeup_filter: scancode wakeup filters
112 * scancode to the application. As this is a hardware limit, we can't do
126 * @last_scancode: scancode of last keypress
156 * @s_filter: set the scancode filter
157 * @s_wakeup_filter: set the wakeup scancode filter. If the mask is zero
287 void rc_keydown(struct rc_dev *dev, enum rc_proto protocol, u64 scancode,
[all …]
/kernel/linux/linux-6.6/include/media/
Drc-core.h21 * @RC_DRIVER_SCANCODE: Driver or hardware generates a scancode.
35 * @data: Scancode data to match.
36 * @mask: Mask of bits of scancode to compare.
107 * @scancode_filter: scancode filter
108 * @scancode_wakeup_filter: scancode wakeup filters
110 * scancode to the application. As this is a hardware limit, we can't do
124 * @last_scancode: scancode of last keypress
152 * @s_filter: set the scancode filter
153 * @s_wakeup_filter: set the wakeup scancode filter. If the mask is zero
281 void rc_keydown(struct rc_dev *dev, enum rc_proto protocol, u64 scancode,
[all …]

12345678910