Re: serial: custom baud rate

2018-05-14 Thread Andy Shevchenko
On Thu, May 3, 2018 at 8:54 PM, Theodore Y. Ts'o wrote: > On Thu, May 03, 2018 at 06:09:13PM +0530, Muni Sekhar wrote: > See the setserial man page:t > > https://linux.die.net/man/8/setserial > > Not all serial devices support the spd_cust and divisor, however. In >

Re: serial: custom baud rate

2018-05-14 Thread Andy Shevchenko
On Thu, May 3, 2018 at 8:54 PM, Theodore Y. Ts'o wrote: > On Thu, May 03, 2018 at 06:09:13PM +0530, Muni Sekhar wrote: > See the setserial man page:t > > https://linux.die.net/man/8/setserial > > Not all serial devices support the spd_cust and divisor, however. In > general Oh, please,

Re: serial: custom baud rate

2018-05-14 Thread Grant Edwards
On 2018-05-13, Alan Cox wrote: > On Thu, 3 May 2018 18:27:14 + (UTC) > Grant Edwards wrote: > >> On 2018-05-03, Muni Sekhar wrote: >> >> > If I need to set a custom baud rates(e.g. 14400, 128000, 256000), does

Re: serial: custom baud rate

2018-05-14 Thread Grant Edwards
On 2018-05-13, Alan Cox wrote: > On Thu, 3 May 2018 18:27:14 + (UTC) > Grant Edwards wrote: > >> On 2018-05-03, Muni Sekhar wrote: >> >> > If I need to set a custom baud rates(e.g. 14400, 128000, 256000), does >> > Linux serial framework has any supporting method? >> >> Sure, use the

Re: serial: custom baud rate

2018-05-13 Thread Alan Cox
On Thu, 3 May 2018 18:27:14 + (UTC) Grant Edwards wrote: > On 2018-05-03, Muni Sekhar wrote: > > > If I need to set a custom baud rates(e.g. 14400, 128000, 256000), does > > Linux serial framework has any supporting method? > > Sure,

Re: serial: custom baud rate

2018-05-13 Thread Alan Cox
On Thu, 3 May 2018 18:27:14 + (UTC) Grant Edwards wrote: > On 2018-05-03, Muni Sekhar wrote: > > > If I need to set a custom baud rates(e.g. 14400, 128000, 256000), does > > Linux serial framework has any supporting method? > > Sure, use the termios2 structure instead of the termios

Re: serial: custom baud rate

2018-05-04 Thread Theodore Y. Ts'o
On Fri, May 04, 2018 at 02:34:51PM +0530, Muni Sekhar wrote: > > See the setserial man page:t > > > > https://linux.die.net/man/8/setserial > > > > Not all serial devices support the spd_cust and divisor, however. In > > general, only devices where the kernel directly programs the > >

Re: serial: custom baud rate

2018-05-04 Thread Theodore Y. Ts'o
On Fri, May 04, 2018 at 02:34:51PM +0530, Muni Sekhar wrote: > > See the setserial man page:t > > > > https://linux.die.net/man/8/setserial > > > > Not all serial devices support the spd_cust and divisor, however. In > > general, only devices where the kernel directly programs the > >

Re: serial: custom baud rate

2018-05-04 Thread Muni Sekhar
On Thu, May 3, 2018 at 11:24 PM, Theodore Y. Ts'o wrote: > On Thu, May 03, 2018 at 06:09:13PM +0530, Muni Sekhar wrote: >> Hi All, >> >> From include/asm-generic/termbits.h , I see baudrate can be one of the >> standard values: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, >>

Re: serial: custom baud rate

2018-05-04 Thread Muni Sekhar
On Thu, May 3, 2018 at 11:24 PM, Theodore Y. Ts'o wrote: > On Thu, May 03, 2018 at 06:09:13PM +0530, Muni Sekhar wrote: >> Hi All, >> >> From include/asm-generic/termbits.h , I see baudrate can be one of the >> standard values: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, >> 2400, 4800,

Re: serial: custom baud rate

2018-05-03 Thread Grant Edwards
On 2018-05-03, Muni Sekhar wrote: > If I need to set a custom baud rates(e.g. 14400, 128000, 256000), does > Linux serial framework has any supporting method? Sure, use the termios2 structure instead of the termios structure: #include struct termios2 t;

Re: serial: custom baud rate

2018-05-03 Thread Grant Edwards
On 2018-05-03, Muni Sekhar wrote: > If I need to set a custom baud rates(e.g. 14400, 128000, 256000), does > Linux serial framework has any supporting method? Sure, use the termios2 structure instead of the termios structure: #include struct termios2 t; ioctl(fd, TCGETS2, )

Re: serial: custom baud rate

2018-05-03 Thread Theodore Y. Ts'o
On Thu, May 03, 2018 at 06:09:13PM +0530, Muni Sekhar wrote: > Hi All, > > From include/asm-generic/termbits.h , I see baudrate can be one of the > standard values: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, > 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 50, > 576000,

Re: serial: custom baud rate

2018-05-03 Thread Theodore Y. Ts'o
On Thu, May 03, 2018 at 06:09:13PM +0530, Muni Sekhar wrote: > Hi All, > > From include/asm-generic/termbits.h , I see baudrate can be one of the > standard values: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, > 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 50, > 576000,