Lines Matching full:serio

12 #include <linux/serio.h>
26 struct serio *serio; member
36 struct serio *mx_serio;
62 MODULE_DEVICE_TABLE(serio, ps2mult_serio_ids);
66 struct serio *mx_serio = psm->mx_serio; in ps2mult_select_port()
73 static int ps2mult_serio_write(struct serio *serio, unsigned char data) in ps2mult_serio_write() argument
75 struct serio *mx_port = serio->parent; in ps2mult_serio_write()
77 struct ps2mult_port *port = serio->port_data; in ps2mult_serio_write()
87 dev_dbg(&serio->dev, in ps2mult_serio_write()
98 static int ps2mult_serio_start(struct serio *serio) in ps2mult_serio_start() argument
100 struct ps2mult *psm = serio_get_drvdata(serio->parent); in ps2mult_serio_start()
101 struct ps2mult_port *port = serio->port_data; in ps2mult_serio_start()
110 static void ps2mult_serio_stop(struct serio *serio) in ps2mult_serio_stop() argument
112 struct ps2mult *psm = serio_get_drvdata(serio->parent); in ps2mult_serio_stop()
113 struct ps2mult_port *port = serio->port_data; in ps2mult_serio_stop()
122 struct serio *mx_serio = psm->mx_serio; in ps2mult_create_port()
123 struct serio *serio; in ps2mult_create_port() local
125 serio = kzalloc(sizeof(*serio), GFP_KERNEL); in ps2mult_create_port()
126 if (!serio) in ps2mult_create_port()
129 strscpy(serio->name, "TQC PS/2 Multiplexer", sizeof(serio->name)); in ps2mult_create_port()
130 snprintf(serio->phys, sizeof(serio->phys), in ps2mult_create_port()
132 serio->id.type = SERIO_8042; in ps2mult_create_port()
133 serio->write = ps2mult_serio_write; in ps2mult_create_port()
134 serio->start = ps2mult_serio_start; in ps2mult_create_port()
135 serio->stop = ps2mult_serio_stop; in ps2mult_create_port()
136 serio->parent = psm->mx_serio; in ps2mult_create_port()
137 serio->port_data = &psm->ports[i]; in ps2mult_create_port()
139 psm->ports[i].serio = serio; in ps2mult_create_port()
154 static int ps2mult_connect(struct serio *serio, struct serio_driver *drv) in ps2mult_connect() argument
160 if (!serio->write) in ps2mult_connect()
168 psm->mx_serio = serio; in ps2mult_connect()
179 serio_set_drvdata(serio, psm); in ps2mult_connect()
180 error = serio_open(serio, drv); in ps2mult_connect()
187 struct serio *s = psm->ports[i].serio; in ps2mult_connect()
189 dev_info(&serio->dev, "%s port at %s\n", s->name, serio->phys); in ps2mult_connect()
197 kfree(psm->ports[i].serio); in ps2mult_connect()
202 static void ps2mult_disconnect(struct serio *serio) in ps2mult_disconnect() argument
204 struct ps2mult *psm = serio_get_drvdata(serio); in ps2mult_disconnect()
206 /* Note that serio core already take care of children ports */ in ps2mult_disconnect()
207 serio_write(serio, PS2MULT_SESSION_END); in ps2mult_disconnect()
208 serio_close(serio); in ps2mult_disconnect()
211 serio_set_drvdata(serio, NULL); in ps2mult_disconnect()
214 static int ps2mult_reconnect(struct serio *serio) in ps2mult_reconnect() argument
216 struct ps2mult *psm = serio_get_drvdata(serio); in ps2mult_reconnect()
223 static irqreturn_t ps2mult_interrupt(struct serio *serio, in ps2mult_interrupt() argument
226 struct ps2mult *psm = serio_get_drvdata(serio); in ps2mult_interrupt()
229 dev_dbg(&serio->dev, "Received %02x flags %02x\n", data, dfl); in ps2mult_interrupt()
237 serio_interrupt(in_port->serio, data, dfl); in ps2mult_interrupt()
243 dev_dbg(&serio->dev, "ESCAPE\n"); in ps2mult_interrupt()
248 dev_dbg(&serio->dev, "BSYNC\n"); in ps2mult_interrupt()
253 dev_dbg(&serio->dev, "SS\n"); in ps2mult_interrupt()
257 dev_dbg(&serio->dev, "SE\n"); in ps2mult_interrupt()
261 dev_dbg(&serio->dev, "KB\n"); in ps2mult_interrupt()
266 dev_dbg(&serio->dev, "MS\n"); in ps2mult_interrupt()
273 serio_interrupt(in_port->serio, data, dfl); in ps2mult_interrupt()