Lines Matching refs:serio
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()
88 dev_dbg(&serio->dev, in ps2mult_serio_write()
101 static int ps2mult_serio_start(struct serio *serio) in ps2mult_serio_start() argument
103 struct ps2mult *psm = serio_get_drvdata(serio->parent); in ps2mult_serio_start()
104 struct ps2mult_port *port = serio->port_data; in ps2mult_serio_start()
114 static void ps2mult_serio_stop(struct serio *serio) in ps2mult_serio_stop() argument
116 struct ps2mult *psm = serio_get_drvdata(serio->parent); in ps2mult_serio_stop()
117 struct ps2mult_port *port = serio->port_data; in ps2mult_serio_stop()
127 struct serio *mx_serio = psm->mx_serio; in ps2mult_create_port()
128 struct serio *serio; in ps2mult_create_port() local
130 serio = kzalloc(sizeof(struct serio), GFP_KERNEL); in ps2mult_create_port()
131 if (!serio) in ps2mult_create_port()
134 strlcpy(serio->name, "TQC PS/2 Multiplexer", sizeof(serio->name)); in ps2mult_create_port()
135 snprintf(serio->phys, sizeof(serio->phys), in ps2mult_create_port()
137 serio->id.type = SERIO_8042; in ps2mult_create_port()
138 serio->write = ps2mult_serio_write; in ps2mult_create_port()
139 serio->start = ps2mult_serio_start; in ps2mult_create_port()
140 serio->stop = ps2mult_serio_stop; in ps2mult_create_port()
141 serio->parent = psm->mx_serio; in ps2mult_create_port()
142 serio->port_data = &psm->ports[i]; in ps2mult_create_port()
144 psm->ports[i].serio = serio; in ps2mult_create_port()
163 static int ps2mult_connect(struct serio *serio, struct serio_driver *drv) in ps2mult_connect() argument
169 if (!serio->write) in ps2mult_connect()
177 psm->mx_serio = serio; in ps2mult_connect()
188 serio_set_drvdata(serio, psm); in ps2mult_connect()
189 error = serio_open(serio, drv); in ps2mult_connect()
196 struct serio *s = psm->ports[i].serio; in ps2mult_connect()
198 dev_info(&serio->dev, "%s port at %s\n", s->name, serio->phys); in ps2mult_connect()
206 kfree(psm->ports[i].serio); in ps2mult_connect()
211 static void ps2mult_disconnect(struct serio *serio) in ps2mult_disconnect() argument
213 struct ps2mult *psm = serio_get_drvdata(serio); in ps2mult_disconnect()
216 serio_write(serio, PS2MULT_SESSION_END); in ps2mult_disconnect()
217 serio_close(serio); in ps2mult_disconnect()
220 serio_set_drvdata(serio, NULL); in ps2mult_disconnect()
223 static int ps2mult_reconnect(struct serio *serio) in ps2mult_reconnect() argument
225 struct ps2mult *psm = serio_get_drvdata(serio); in ps2mult_reconnect()
232 static irqreturn_t ps2mult_interrupt(struct serio *serio, in ps2mult_interrupt() argument
235 struct ps2mult *psm = serio_get_drvdata(serio); in ps2mult_interrupt()
239 dev_dbg(&serio->dev, "Received %02x flags %02x\n", data, dfl); in ps2mult_interrupt()
247 serio_interrupt(in_port->serio, data, dfl); in ps2mult_interrupt()
253 dev_dbg(&serio->dev, "ESCAPE\n"); in ps2mult_interrupt()
258 dev_dbg(&serio->dev, "BSYNC\n"); in ps2mult_interrupt()
263 dev_dbg(&serio->dev, "SS\n"); in ps2mult_interrupt()
267 dev_dbg(&serio->dev, "SE\n"); in ps2mult_interrupt()
271 dev_dbg(&serio->dev, "KB\n"); in ps2mult_interrupt()
276 dev_dbg(&serio->dev, "MS\n"); in ps2mult_interrupt()
283 serio_interrupt(in_port->serio, data, dfl); in ps2mult_interrupt()