serial: prepare for 9bit data
Subsystems (2)
PATCH 1/1 serial: prepare for 9bit data
This patch adds 9bit data possibility for serial_core. Please confirm that I did it right way at right place. I'll make atmel_serial driver for 9bit data later.
--- drivers/tty/serial/serial_core.c | 4 ++++ include/uapi/asm-generic/termbits.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/tty/serial/serial_core.c +4 -0
@@ -283,9 +283,13 @@ uart_update_timeout(struct uart_port *port, unsigned int cflag,case CS7 : bits =9 ;break ; +case CS8 :default : bits =10 ;break ;/* CS8 */ +case CS9 : + bits =11 ; +break ; }if (cflag &CSTOPB )
include/uapi/asm-generic/termbits.h +2 -1
@@ -128,7 +128,7 @@ struct ktermios {#define B38400 0000017#define EXTA B19200#define EXTB B38400 -#define CSIZE 0000060 +#define CSIZE 004000000060#define CS5 0000000#define CS6 0000020#define CS7 0000040
@@ -157,6 +157,7 @@ struct ktermios {#define B3500000 0010016#define B4000000 0010017#define CIBAUD 002003600000/* input baud rate */ +#define CS9 004000000000/* 9bit data */ #define CMSPAR 010000000000/* mark or space (stick) parity */ #define CRTSCTS 020000000000/* flow control */
Signature · 1 line
1.7.9.5
Greg KH
maintainerPATCH 1/1 serial: prepare for 9bit data
Quoted 1 line · Jiri Prchal
This patch adds 9bit data possibility for
serial_core. Please confirm that I did it right way at right place. I'll makeatmel_serialdriver for 9bit data later.
Please wrap your lines properly.
I'd rather wait to add this type of patch _after_ you have tested it and verified that your driver works, and take that patch at the same time.
Otherwise, this is just added cruft that no one is using, and I'd have to remove it :)
thanks,
greg k-h
PATCH 1/1 serial: prepare for 9bit data
Dne 27.9.2013 00:47, Greg KH napsal(a):
Quoted 10 lines · Jiri Prchal
Quoted 1 line
This patch adds 9bit data possibility for
serial_core. Please confirm that I did it right way at right place. I'll makeatmel_serialdriver for 9bit data later.Please wrap your lines properly.
I'd rather wait to add this type of patch _after_ you have tested it and verified that your driver works, and take that patch at the same time.
Otherwise, this is just added cruft that no one is using, and I'd have to remove it :)
No one is using it because it is NOT implemented.
Try to search internet for "9bit serial" to see how many people like to use it. But I probably not bother to do it and I'll try some tricks with parity. As many others.
Best regard
Jiri
Greg KH
maintainerPATCH 1/1 serial: prepare for 9bit data
Quoted 6 lines · Ji?? Prchal
Dne 27.9.2013 00:47, Greg KH napsal(a):
Quoted 3 lines · Jiri Prchal
Quoted 1 line
This patch adds 9bit data possibility for
serial_core. Please confirm that I did it right way at right place. I'll makeatmel_serialdriver for 9bit data later.
Quoted 8 lines
Quoted 7 lines
Please wrap your lines properly.
I'd rather wait to add this type of patch _after_ you have tested it and verified that your driver works, and take that patch at the same time.
Otherwise, this is just added cruft that no one is using, and I'd have to remove it :)
No one is using it because it is NOT implemented.
Then implement it.
Quoted 1 line
Try to search internet for "9bit serial" to see how many people like to use it.
Again, then implement it, I can't add code to the kernel that no one uses, that would be cruft and be deleted, right?
Quoted 2 lines
But I probably not bother to do it and I'll try some tricks with parity. As many others.
Why not just implement it, then it can stay, right?
thanks,
greg k-h