[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024022916-captivate-state-0255@gregkh>
Date: Thu, 29 Feb 2024 23:00:45 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: GuanBing Huang <albanhuang@...look.com>
Cc: jirislaby@...nel.org, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org, albanhuang@...cent.com
Subject: Re: [PATCH] serial: 8250_pnp: Support configurable reg shift property
On Thu, Feb 29, 2024 at 07:51:54PM +0800, GuanBing Huang wrote:
> From: albanhuang <albanhuang@...cent.com>
>
> The 16550a serial port based on the ACPI table requires obtaining the
> reg-shift attribute. In the ACPI scenario, If the reg-shift property
> is not configured like in DTS, the 16550a serial driver cannot read or
> write controller registers properly during initialization.
>
> Signed-off-by: albanhuang <albanhuang@...cent.com>
> Signed-off-by: tombinfan <tombinfan@...cent.com>
> Signed-off-by: dylanlhdu <dylanlhdu@...cent.com>
"interesting" names, can you not just use your native encoding to make
this easier?
> ---
> drivers/tty/serial/8250/8250_pnp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
> index 1974bbadc975..25b4e41e9745 100644
> --- a/drivers/tty/serial/8250/8250_pnp.c
> +++ b/drivers/tty/serial/8250/8250_pnp.c
> @@ -473,6 +473,7 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
> uart.port.flags |= UPF_SHARE_IRQ;
> uart.port.uartclk = 1843200;
> device_property_read_u32(&dev->dev, "clock-frequency", &uart.port.uartclk);
> + device_property_read_u8(&dev->dev, "reg-shift", &uart.port.regshift);
Is this property documented somewhere? What happens if the property
isn't there?
thanks,
greg k-h
Powered by blists - more mailing lists