Lines Matching refs:fsia6b

55 struct fsia6b {  struct
65 struct fsia6b *fsia6b = serio_get_drvdata(serio); in fsia6b_serio_irq() argument
70 fsia6b->packet.ibuf = (data << 8) | ((fsia6b->packet.ibuf >> 8) & 0xFF); in fsia6b_serio_irq()
72 switch (fsia6b->packet.state) { in fsia6b_serio_irq()
74 if (fsia6b->packet.ibuf == 0x4020) in fsia6b_serio_irq()
75 fsia6b->packet.state = COLLECT; in fsia6b_serio_irq()
79 fsia6b->packet.state = PROCESS; in fsia6b_serio_irq()
83 fsia6b->packet.channel[fsia6b->packet.offset] = in fsia6b_serio_irq()
84 fsia6b->packet.ibuf; in fsia6b_serio_irq()
85 fsia6b->packet.offset++; in fsia6b_serio_irq()
87 if (fsia6b->packet.offset == IBUS_SERVO_COUNT) { in fsia6b_serio_irq()
88 fsia6b->packet.offset = 0; in fsia6b_serio_irq()
89 fsia6b->packet.state = SYNC; in fsia6b_serio_irq()
91 input_report_abs(fsia6b->dev, fsia6b_axes[i], in fsia6b_serio_irq()
92 fsia6b->packet.channel[i]); in fsia6b_serio_irq()
95 if (fsia6b->packet.channel[i] > 1900) in fsia6b_serio_irq()
97 else if (fsia6b->packet.channel[i] < 1100) in fsia6b_serio_irq()
102 input_report_key(fsia6b->dev, in fsia6b_serio_irq()
107 input_report_key(fsia6b->dev, in fsia6b_serio_irq()
112 input_report_key(fsia6b->dev, in fsia6b_serio_irq()
117 input_sync(fsia6b->dev); in fsia6b_serio_irq()
119 fsia6b->packet.state = COLLECT; in fsia6b_serio_irq()
129 struct fsia6b *fsia6b; in fsia6b_serio_connect() local
135 fsia6b = kzalloc(sizeof(*fsia6b), GFP_KERNEL); in fsia6b_serio_connect()
136 if (!fsia6b) in fsia6b_serio_connect()
139 fsia6b->packet.ibuf = 0; in fsia6b_serio_connect()
140 fsia6b->packet.offset = 0; in fsia6b_serio_connect()
141 fsia6b->packet.state = SYNC; in fsia6b_serio_connect()
143 serio_set_drvdata(serio, fsia6b); in fsia6b_serio_connect()
150 fsia6b->dev = input_dev; in fsia6b_serio_connect()
152 snprintf(fsia6b->phys, sizeof(fsia6b->phys), "%s/input0", serio->phys); in fsia6b_serio_connect()
155 input_dev->phys = fsia6b->phys; in fsia6b_serio_connect()
169 dev_err(&fsia6b->dev->dev, in fsia6b_serio_connect()
185 err = input_register_device(fsia6b->dev); in fsia6b_serio_connect()
194 kfree(fsia6b); in fsia6b_serio_connect()
200 struct fsia6b *fsia6b = serio_get_drvdata(serio); in fsia6b_serio_disconnect() local
204 input_unregister_device(fsia6b->dev); in fsia6b_serio_disconnect()
205 kfree(fsia6b); in fsia6b_serio_disconnect()