On Mon, Feb 19, 2024 at 05:08:54PM +0200, Andy Shevchenko wrote: > On Fri, Feb 16, 2024 at 08:19:37PM +0300, Serge Semin wrote: > > On Thu, Feb 15, 2024 at 09:39:12PM +0200, Andy Shevchenko wrote: > > ... > > (thanks for the detailed explanation why you have done it that way) > > > If what you suggest is to replace the serial8250_update_uartclk() body > > with a direct uart_port::set_termios() invocation then I don't find it > > being much clearer really. The serial8250_update_uartclk() is > > currently specialized on doing one thing: adjusting the divider in > > case of the UART-clock change. If instead the entire > > serial8250_set_termios() method is called then for a reader it won't > > be easy to understand what is really required for a 8250 serial port > > to perceive the ref-clock change. But from the maintainability point > > of view I guess that it might be safer to just call > > serial8250_set_termios() indeed, since among the other things the > > later method implies the divider update too. Thus the maintainer won't > > need to support the two clock divider update implementations. > > > From that perspective I agree, directly calling serial8250_set_termios() > > might be more suitable despite of it' doing more than required. > > Would it be possible for you to cook the patch (and test on your HW, > since it seems the only user of that)? Agreed. The patch should have been just landed on your work and private inboxes. Link: https://lore.kernel.org/linux-serial/20240222145058.28307-1-fancer.lancer@xxxxxxxxx -Serge(y) > > -- > With Best Regards, > Andy Shevchenko > >