Lines Matching refs:xtkbd
37 struct xtkbd { struct
47 struct xtkbd *xtkbd = serio_get_drvdata(serio); in xtkbd_interrupt() argument
55 if (xtkbd->keycode[data & XTKBD_KEY]) { in xtkbd_interrupt()
56 input_report_key(xtkbd->dev, xtkbd->keycode[data & XTKBD_KEY], !(data & XTKBD_RELEASE)); in xtkbd_interrupt()
57 input_sync(xtkbd->dev); in xtkbd_interrupt()
68 struct xtkbd *xtkbd; in xtkbd_connect() local
73 xtkbd = kmalloc(sizeof(*xtkbd), GFP_KERNEL); in xtkbd_connect()
75 if (!xtkbd || !input_dev) in xtkbd_connect()
78 xtkbd->serio = serio; in xtkbd_connect()
79 xtkbd->dev = input_dev; in xtkbd_connect()
80 snprintf(xtkbd->phys, sizeof(xtkbd->phys), "%s/input0", serio->phys); in xtkbd_connect()
81 memcpy(xtkbd->keycode, xtkbd_keycode, sizeof(xtkbd->keycode)); in xtkbd_connect()
84 input_dev->phys = xtkbd->phys; in xtkbd_connect()
92 input_dev->keycode = xtkbd->keycode; in xtkbd_connect()
97 set_bit(xtkbd->keycode[i], input_dev->keybit); in xtkbd_connect()
100 serio_set_drvdata(serio, xtkbd); in xtkbd_connect()
106 err = input_register_device(xtkbd->dev); in xtkbd_connect()
115 kfree(xtkbd); in xtkbd_connect()
121 struct xtkbd *xtkbd = serio_get_drvdata(serio); in xtkbd_disconnect() local
125 input_unregister_device(xtkbd->dev); in xtkbd_disconnect()
126 kfree(xtkbd); in xtkbd_disconnect()