Lines Matching refs:nkbd
60 struct nkbd {
70 struct nkbd *nkbd = serio_get_drvdata(serio);
73 if (nkbd->keycode[data & NKBD_KEY]) {
74 input_report_key(nkbd->dev, nkbd->keycode[data & NKBD_KEY], data & NKBD_PRESS);
75 input_sync(nkbd->dev);
79 printk(KERN_INFO "input: %s on %s\n", nkbd->dev->name, serio->phys);
86 struct nkbd *nkbd;
91 nkbd = kzalloc(sizeof(struct nkbd), GFP_KERNEL);
93 if (!nkbd || !input_dev)
96 nkbd->serio = serio;
97 nkbd->dev = input_dev;
98 snprintf(nkbd->phys, sizeof(nkbd->phys), "%s/input0", serio->phys);
99 memcpy(nkbd->keycode, nkbd_keycode, sizeof(nkbd->keycode));
102 input_dev->phys = nkbd->phys;
110 input_dev->keycode = nkbd->keycode;
114 set_bit(nkbd->keycode[i], input_dev->keybit);
117 serio_set_drvdata(serio, nkbd);
123 err = input_register_device(nkbd->dev);
132 kfree(nkbd);
138 struct nkbd *nkbd = serio_get_drvdata(serio);
142 input_unregister_device(nkbd->dev);
143 kfree(nkbd);