Re: [PATCH v2 1/4] serial: 8250_dw: Keep the BUSY-safe divisor hook when DLF is present

From: Andy Shevchenko

Date: Tue Oct 20 2026 - 04:57:19 EST


On Mon, Oct 19, 2026 at 05:06:10PM -0300, Vinicius Pedrosa wrote:

...

> @@ -218,7 +228,9 @@ void dw8250_setup_port(struct uart_port *p)
> if (reg) {
> pd->dlf_size = fls(reg);
> p->get_divisor = dw8250_get_divisor;

In the case of existing _set_divisor, do we want to keep the possible set
_get_divisor as well? Shouldn't we introduce a respective _get_divisor in 8250_dw.c?

> - p->set_divisor = dw8250_set_divisor;
> + /* Keep a hook the driver has already installed */
> + if (!p->set_divisor)
> + p->set_divisor = dw8250_set_divisor;
> }

On top of my previous reply, why is this hunk needed?

...

But now I see that we have same function name in two files. Can we rename those
in dwlib to, for example,
dw8250_get_divisor --> dw8250_get_dfl_divisor
dw8250_set_divisor --> dw8250_set_dfl_divisor

?

--
With Best Regards,
Andy Shevchenko