Lines Matching refs:magellan
38 struct magellan { struct
66 static void magellan_process_packet(struct magellan* magellan) in magellan_process_packet() argument
68 struct input_dev *dev = magellan->dev; in magellan_process_packet()
69 unsigned char *data = magellan->data; in magellan_process_packet()
72 if (!magellan->idx) return; in magellan_process_packet()
74 switch (magellan->data[0]) { in magellan_process_packet()
77 if (magellan->idx != 25) return; in magellan_process_packet()
86 if (magellan->idx != 4) return; in magellan_process_packet()
99 struct magellan* magellan = serio_get_drvdata(serio); in magellan_interrupt() local
102 magellan_process_packet(magellan); in magellan_interrupt()
103 magellan->idx = 0; in magellan_interrupt()
105 if (magellan->idx < MAGELLAN_MAX_LENGTH) in magellan_interrupt()
106 magellan->data[magellan->idx++] = data; in magellan_interrupt()
117 struct magellan* magellan = serio_get_drvdata(serio); in magellan_disconnect() local
121 input_unregister_device(magellan->dev); in magellan_disconnect()
122 kfree(magellan); in magellan_disconnect()
133 struct magellan *magellan; in magellan_connect() local
138 magellan = kzalloc(sizeof(struct magellan), GFP_KERNEL); in magellan_connect()
140 if (!magellan || !input_dev) in magellan_connect()
143 magellan->dev = input_dev; in magellan_connect()
144 snprintf(magellan->phys, sizeof(magellan->phys), "%s/input0", serio->phys); in magellan_connect()
147 input_dev->phys = magellan->phys; in magellan_connect()
162 serio_set_drvdata(serio, magellan); in magellan_connect()
168 err = input_register_device(magellan->dev); in magellan_connect()
177 kfree(magellan); in magellan_connect()