• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/input/joystick/

Lines Matching refs:spaceball

2  * $Id: spaceball.c,v 1.1.1.1 2007/08/03 18:52:33 Exp $
72 struct spaceball {
85 static void spaceball_process_packet(struct spaceball* spaceball)
87 struct input_dev *dev = spaceball->dev;
88 unsigned char *data = spaceball->data;
91 if (spaceball->idx < 2) return;
93 switch (spaceball->data[0]) {
96 if (spaceball->idx != 15) return;
103 if (spaceball->idx != 3) return;
115 if (spaceball->idx != 3) return;
132 spaceball->data[spaceball->idx - 1] = 0;
133 printk(KERN_ERR "spaceball: Device error. [%s]\n", spaceball->data + 1);
137 spaceball->data[spaceball->idx - 1] = 0;
138 printk(KERN_ERR "spaceball: Bad command. [%s]\n", spaceball->data + 1);
154 struct spaceball *spaceball = serio_get_drvdata(serio);
158 spaceball_process_packet(spaceball);
159 spaceball->idx = 0;
160 spaceball->escape = 0;
163 if (!spaceball->escape) {
164 spaceball->escape = 1;
167 spaceball->escape = 0;
171 if (spaceball->escape) {
172 spaceball->escape = 0;
176 if (spaceball->escape)
177 spaceball->escape = 0;
178 if (spaceball->idx < SPACEBALL_MAX_LENGTH)
179 spaceball->data[spaceball->idx++] = data;
191 struct spaceball* spaceball = serio_get_drvdata(serio);
195 input_unregister_device(spaceball->dev);
196 kfree(spaceball);
207 struct spaceball *spaceball;
215 spaceball = kmalloc(sizeof(struct spaceball), GFP_KERNEL);
217 if (!spaceball || !input_dev)
220 spaceball->dev = input_dev;
221 snprintf(spaceball->phys, sizeof(spaceball->phys), "%s/input0", serio->phys);
224 input_dev->phys = spaceball->phys;
250 serio_set_drvdata(serio, spaceball);
256 err = input_register_device(spaceball->dev);
265 kfree(spaceball);
287 .name = "spaceball",