Lines Matching defs:zhenhua
69 struct zhenhua {
91 static void zhenhua_process_packet(struct zhenhua *zhenhua)
93 struct input_dev *dev = zhenhua->dev;
94 unsigned char *data = zhenhua->data;
112 struct zhenhua *zhenhua = serio_get_drvdata(serio);
119 zhenhua->idx = 0; /* this byte starts a new packet */
120 else if (zhenhua->idx == 0)
123 if (zhenhua->idx < ZHENHUA_MAX_LENGTH)
124 zhenhua->data[zhenhua->idx++] = zhenhua_bitreverse(data);
126 if (zhenhua->idx == ZHENHUA_MAX_LENGTH) {
127 zhenhua_process_packet(zhenhua);
128 zhenhua->idx = 0;
140 struct zhenhua *zhenhua = serio_get_drvdata(serio);
144 input_unregister_device(zhenhua->dev);
145 kfree(zhenhua);
156 struct zhenhua *zhenhua;
160 zhenhua = kzalloc(sizeof(struct zhenhua), GFP_KERNEL);
162 if (!zhenhua || !input_dev)
165 zhenhua->dev = input_dev;
166 snprintf(zhenhua->phys, sizeof(zhenhua->phys), "%s/input0", serio->phys);
169 input_dev->phys = zhenhua->phys;
182 serio_set_drvdata(serio, zhenhua);
188 err = input_register_device(zhenhua->dev);
197 kfree(zhenhua);
219 .name = "zhenhua",