Lines Matching +full:xor +full:- +full:v2

1 // SPDX-License-Identifier: GPL-2.0-only
43 /* PTD1 */ KEY_CAPSLOCK, KEY_MACRO, KEY_LEFTCTRL, 0, KEY_ESC, KEY_KP5, 0, 0, /* 1 -> 8 */
44 KEY_F1, KEY_F2, KEY_F3, KEY_F8, KEY_F7, KEY_F6, KEY_F4, KEY_F5, /* 9 -> 16 */
45 /* PTD5 */ KEY_SLASH, KEY_APOSTROPHE, KEY_ENTER, 0, KEY_Z, 0, 0, 0, /* 17 -> 24 */
46 KEY_X, KEY_C, KEY_V, KEY_DOT, KEY_COMMA, KEY_M, KEY_B, KEY_N, /* 25 -> 32 */
47 /* PTD7 */ KEY_KP2, KEY_KP6, KEY_KP3, 0, 0, 0, 0, 0, /* 33 -> 40 */
48 …KEY_F10, KEY_RO, KEY_F9, KEY_KP4, KEY_NUMLOCK, KEY_SCROLLLOCK, KEY_LEFTALT, KEY_HANJA, /* 41 -> 4…
49 /* PTE0 */ KEY_KATAKANA, KEY_KP0, KEY_GRAVE, 0, KEY_FINANCE, 0, 0, 0, /* 49 -> 56 */
50 KEY_KPMINUS, KEY_HIRAGANA, KEY_SPACE, KEY_KPDOT, KEY_VOLUMEUP, 249, 0, 0, /* 57 -> 64 */
51 /* PTE1 */ KEY_SEMICOLON, KEY_RIGHTBRACE, KEY_BACKSLASH, 0, KEY_A, 0, 0, 0, /* 65 -> 72 */
52 KEY_S, KEY_D, KEY_F, KEY_L, KEY_K, KEY_J, KEY_G, KEY_H, /* 73 -> 80 */
53 /* PTE3 */ KEY_KP8, KEY_LEFTMETA, KEY_RIGHTSHIFT, 0, KEY_TAB, 0, 0, 0, /* 81 -> 88 */
54 0, KEY_LEFTSHIFT, KEY_KP7, KEY_KP9, KEY_KP1, KEY_F11, KEY_KPPLUS, KEY_KPASTERISK, /* 89 -> 96 */
55 /* PTE6 */ KEY_P, KEY_LEFTBRACE, KEY_BACKSPACE, 0, KEY_Q, 0, 0, 0, /* 97 -> 104 */
56 KEY_W, KEY_E, KEY_R, KEY_O, KEY_I, KEY_U, KEY_T, KEY_Y, /* 105 -> 112 */
57 /* PTE7 */ KEY_0, KEY_MINUS, KEY_EQUAL, 0, KEY_1, 0, 0, 0, /* 113 -> 120 */
58 KEY_2, KEY_3, KEY_4, KEY_9, KEY_8, KEY_7, KEY_5, KEY_6, /* 121 -> 128 */
75 struct input_dev *input_dev = jornadakbd->input; in jornada_parse_kbd()
76 unsigned short *keymap = jornadakbd->keymap; in jornada_parse_kbd()
81 unsigned char new = jornadakbd->new_scan[i]; in jornada_parse_kbd()
82 unsigned char old = jornadakbd->old_scan[i]; in jornada_parse_kbd()
83 unsigned int xor = new ^ old; in jornada_parse_kbd() local
85 if (xor == 0) in jornada_parse_kbd()
90 if (xor & bit) { in jornada_parse_kbd()
173 jornada_scan_keyb(jornadakbd->new_scan); in jornadakbd680_poll()
175 memcpy(jornadakbd->old_scan, jornadakbd->new_scan, JORNADA_SCAN_SIZE); in jornadakbd680_poll()
184 jornadakbd = devm_kzalloc(&pdev->dev, sizeof(struct jornadakbd), in jornada680kbd_probe()
187 return -ENOMEM; in jornada680kbd_probe()
189 input_dev = devm_input_allocate_device(&pdev->dev); in jornada680kbd_probe()
191 dev_err(&pdev->dev, "failed to allocate input device\n"); in jornada680kbd_probe()
192 return -ENOMEM; in jornada680kbd_probe()
195 jornadakbd->input = input_dev; in jornada680kbd_probe()
197 memcpy(jornadakbd->keymap, jornada_scancodes, in jornada680kbd_probe()
198 sizeof(jornadakbd->keymap)); in jornada680kbd_probe()
201 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); in jornada680kbd_probe()
202 input_dev->name = "HP Jornada 680 keyboard"; in jornada680kbd_probe()
203 input_dev->phys = "jornadakbd/input0"; in jornada680kbd_probe()
204 input_dev->keycode = jornadakbd->keymap; in jornada680kbd_probe()
205 input_dev->keycodesize = sizeof(unsigned short); in jornada680kbd_probe()
206 input_dev->keycodemax = ARRAY_SIZE(jornada_scancodes); in jornada680kbd_probe()
207 input_dev->id.bustype = BUS_HOST; in jornada680kbd_probe()
210 if (jornadakbd->keymap[i]) in jornada680kbd_probe()
211 __set_bit(jornadakbd->keymap[i], input_dev->keybit); in jornada680kbd_probe()
212 __clear_bit(KEY_RESERVED, input_dev->keybit); in jornada680kbd_probe()
218 dev_err(&pdev->dev, "failed to set up polling\n"); in jornada680kbd_probe()
226 dev_err(&pdev->dev, "failed to register input device\n"); in jornada680kbd_probe()
243 MODULE_LICENSE("GPL v2");