Lines Matching refs:kbd
81 static void dc_scan_kbd(struct dc_kbd *kbd) in dc_scan_kbd() argument
83 struct input_dev *dev = kbd->dev; in dc_scan_kbd()
90 keycode = kbd->keycode[code]; in dc_scan_kbd()
92 input_report_key(dev, keycode, (kbd->new[0] >> i) & 1); in dc_scan_kbd()
96 ptr = memchr(kbd->new + 2, kbd->old[i], 6); in dc_scan_kbd()
97 code = kbd->old[i]; in dc_scan_kbd()
99 keycode = kbd->keycode[code]; in dc_scan_kbd()
108 ptr = memchr(kbd->old + 2, kbd->new[i], 6); in dc_scan_kbd()
109 code = kbd->new[i]; in dc_scan_kbd()
111 keycode = kbd->keycode[code]; in dc_scan_kbd()
122 memcpy(kbd->old, kbd->new, 8); in dc_scan_kbd()
128 struct dc_kbd *kbd = maple_get_drvdata(mapledev); in dc_kbd_callback() local
138 memcpy(kbd->new, buf + 2, 8); in dc_kbd_callback()
139 dc_scan_kbd(kbd); in dc_kbd_callback()
151 struct dc_kbd *kbd; in probe_maple_kbd() local
157 kbd = kzalloc(sizeof(struct dc_kbd), GFP_KERNEL); in probe_maple_kbd()
158 if (!kbd) { in probe_maple_kbd()
169 kbd->dev = idev; in probe_maple_kbd()
170 memcpy(kbd->keycode, dc_kbd_keycode, sizeof(kbd->keycode)); in probe_maple_kbd()
174 idev->keycode = kbd->keycode; in probe_maple_kbd()
176 idev->keycodemax = ARRAY_SIZE(kbd->keycode); in probe_maple_kbd()
196 maple_set_drvdata(mdev, kbd); in probe_maple_kbd()
204 kfree(kbd); in probe_maple_kbd()
212 struct dc_kbd *kbd = maple_get_drvdata(mdev); in remove_maple_kbd() local
216 input_unregister_device(kbd->dev); in remove_maple_kbd()
217 kfree(kbd); in remove_maple_kbd()