Lines Matching +full:phase +full:- +full:locked

1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Porting to 2.6 Copyright (c) Adrian McMenamin, 2007 - 2009
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()
104 dev_dbg(&dev->dev, 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()
116 dev_dbg(&dev->dev, in dc_scan_kbd()
122 memcpy(kbd->old, kbd->new, 8); in dc_scan_kbd()
127 struct maple_device *mapledev = mq->dev; in dc_kbd_callback()
129 unsigned long *buf = (unsigned long *)(mq->recvbuf->buf); in dc_kbd_callback()
133 * time it may be locked is if the driver is in the cleanup phase. in dc_kbd_callback()
137 if (buf[1] == mapledev->function) { in dc_kbd_callback()
138 memcpy(kbd->new, buf + 2, 8); in dc_kbd_callback()
155 mdrv = to_maple_driver(dev->driver); in probe_maple_kbd()
159 error = -ENOMEM; in probe_maple_kbd()
165 error = -ENOMEM; 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()
172 idev->name = mdev->product_name; in probe_maple_kbd()
173 idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); in probe_maple_kbd()
174 idev->keycode = kbd->keycode; in probe_maple_kbd()
175 idev->keycodesize = sizeof(unsigned short); in probe_maple_kbd()
176 idev->keycodemax = ARRAY_SIZE(kbd->keycode); in probe_maple_kbd()
177 idev->id.bustype = BUS_HOST; in probe_maple_kbd()
178 idev->dev.parent = &mdev->dev; in probe_maple_kbd()
181 __set_bit(dc_kbd_keycode[i], idev->keybit); in probe_maple_kbd()
182 __clear_bit(KEY_RESERVED, idev->keybit); in probe_maple_kbd()
190 /* Maple polling is locked to VBLANK - which may be just 50/s */ in probe_maple_kbd()
194 mdev->driver = mdrv; in probe_maple_kbd()
216 input_unregister_device(kbd->dev); in remove_maple_kbd()