[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060824220535.GC21439@flint.arm.linux.org.uk>
Date: Thu, 24 Aug 2006 23:05:35 +0100
From: Russell King <rmk+lkml@....linux.org.uk>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: Krzysztof Halasa <khc@...waw.pl>,
David Woodhouse <dwmw2@...radead.org>,
Stuart MacDonald <stuartm@...necttech.com>,
linux-serial@...r.kernel.org, 'LKML' <linux-kernel@...r.kernel.org>
Subject: Re: Serial custom speed deprecated?
On Thu, Aug 24, 2006 at 06:41:33PM +0100, Alan Cox wrote:
> We would need a driver ->set_speed method for the cases where
> - ioctl is called to set specific board rate
> - OR termios values for tty speed change
> - While we are at it we might want to make ->set_termios also allowed to
> fail
That's a little dodgy, from my reading of POSIX. ISTR POSIX prefers
a behaviour of "set what you can" from this, and when you read back
the termios settings, you get the actual settings in use.
So, eg, if you don't support CS5 but the previous setting was CS8,
tcsetattr should not return an error. The device itself should set
the other changed parameters but remain at CS8 and tcgetattr should
report CS8.
stty already knows about this, and issues warnings when you attempt
to set stuff which aren't supportted by the driver (assuming you have
a correctly behaving driver in this respect.) I've been a little
scared to push the implementation for these in the serial drivers.
> Anyone got any problems with this before I go and implement it ?
Only as long as we can end up with a numeric baud rate at the end of
the day (which is what serial has always been after.)
This represents a major improvement to the tty interface, thanks for
looking in to making it happen.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists