Lines Matching refs:serport
34 struct serport {
49 struct serport *serport = serio->port_data;
50 return -(serport->tty->ops->write(serport->tty, &data, 1) != 1);
55 struct serport *serport = serio->port_data;
58 spin_lock_irqsave(&serport->lock, flags);
59 set_bit(SERPORT_ACTIVE, &serport->flags);
60 spin_unlock_irqrestore(&serport->lock, flags);
68 struct serport *serport = serio->port_data;
71 spin_lock_irqsave(&serport->lock, flags);
72 clear_bit(SERPORT_ACTIVE, &serport->flags);
73 set_bit(SERPORT_DEAD, &serport->flags);
74 spin_unlock_irqrestore(&serport->lock, flags);
76 wake_up_interruptible(&serport->wait);
86 struct serport *serport;
91 serport = kzalloc(sizeof(struct serport), GFP_KERNEL);
92 if (!serport)
95 serport->tty = tty;
96 spin_lock_init(&serport->lock);
97 init_waitqueue_head(&serport->wait);
99 tty->disc_data = serport;
112 struct serport *serport = (struct serport *) tty->disc_data;
114 kfree(serport);
125 struct serport *serport = (struct serport*) tty->disc_data;
129 spin_lock_irqsave(&serport->lock, flags);
131 if (!test_bit(SERPORT_ACTIVE, &serport->flags))
135 serio_interrupt(serport->serio, cp[i], 0);
138 spin_unlock_irqrestore(&serport->lock, flags);
149 struct serport *serport = (struct serport*) tty->disc_data;
153 if (test_and_set_bit(SERPORT_BUSY, &serport->flags))
156 serport->serio = serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
162 serio->id = serport->id;
167 serio->port_data = serport;
169 serio_register_port(serport->serio);
172 wait_event_interruptible(serport->wait, test_bit(SERPORT_DEAD, &serport->flags));
173 serio_unregister_port(serport->serio);
174 serport->serio = NULL;
176 clear_bit(SERPORT_DEAD, &serport->flags);
177 clear_bit(SERPORT_BUSY, &serport->flags);
188 struct serport *serport = (struct serport*) tty->disc_data;
195 serport->id.proto = type & 0x000000ff;
196 serport->id.id = (type & 0x0000ff00) >> 8;
197 serport->id.extra = (type & 0x00ff0000) >> 16;
207 struct serport *serport = (struct serport *) tty->disc_data;
210 spin_lock_irqsave(&serport->lock, flags);
211 if (test_bit(SERPORT_ACTIVE, &serport->flags))
212 serio_drv_write_wakeup(serport->serio);
213 spin_unlock_irqrestore(&serport->lock, flags);
240 printk(KERN_ERR "serport.c: Error registering line discipline.\n");