Hi Samuel, On 04/15/2016 11:48 PM, Samuel Thibault wrote: > Hello, > > Any news on this? > > Samuel > > Samuel Thibault, on Sun 06 Mar 2016 18:45:57 +0100, wrote: >> Greg, on Sat 05 Mar 2016 11:14:59 -0800, wrote: >>> There is a way to talk to any serial port from within the kernel, I >>> thought the serio layer did it, or maybe it was bluetooth, but I can't >>> find it at the moment, sorry. Try digging around a bit, it's there >>> somewhere... >> >> I guess you mean linux/drivers/input/serio/serport.c? >> >> It is apparently using a tty line discipline (N_MOUSE), yes. That was >> one of the ways we were considering for speakup indeed. >> >> The question is: how does speakup set the line discipline from kernel >> land? One of the goals of speakup is to be available before userland >> works (otherwise we could as well just move the drivers to userland), so >> we don't have any userland helper to set the line disciline up. Can you help me understand why "one of the goals of speakup is to be available before userland"? Regards, Peter Hurley >> And even before setting up the line discipline, how can speakup open >> the port? We don't have a process context or /dev/, so we can't just >> use sys_open and alike. What we could use is some function which takes >> a minor/major pair or a device name, and returns a filp, then we can >> tty_set_ldisc(N_SPEAKUP) on file_tty(filp), but I don't know if such >> thing exists? That would probably be building a struct inode (getting >> inspired from fs/ramfs/), then just open it? Something like: >> >> struct inode *inode = new_inode(sb); >> >> init_special_inode(inode, S_IFCHR, MKDEV(major, minor)); >> filp = get_empty_filp(); >> do_dentry_open(filp, inode, NULL, NULL); >> struct tty_struct *tty = file_tty(filp); >> tty_set_ldisc(tty, N_SPEAKUP); >> >> Samuel > -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html