public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: GuanBing Huang <albanhuang@outlook.com>
Cc: jirislaby@kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org, albanhuang@tencent.com
Subject: Re: [PATCH] serial: 8250_pnp: Support configurable reg shift property
Date: Thu, 29 Feb 2024 23:00:45 +0100	[thread overview]
Message-ID: <2024022916-captivate-state-0255@gregkh> (raw)
In-Reply-To: <PSAPR06MB49522EB50BDE08A5D9D0DACEC95F2@PSAPR06MB4952.apcprd06.prod.outlook.com>

On Thu, Feb 29, 2024 at 07:51:54PM +0800, GuanBing Huang wrote:
> From: albanhuang <albanhuang@tencent.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@tencent.com>
> Signed-off-by: tombinfan <tombinfan@tencent.com>
> Signed-off-by: dylanlhdu <dylanlhdu@tencent.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

  reply	other threads:[~2024-02-29 22:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 11:51 [PATCH] serial: 8250_pnp: Support configurable reg shift property GuanBing Huang
2024-02-29 22:00 ` Greg KH [this message]
2024-03-05  3:24   ` GuanBing Huang
2024-03-05 11:14     ` Greg KH
2024-03-06 11:42       ` [PATCH v2] " Guanbing Huang
2024-03-08 16:15         ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024022916-captivate-state-0255@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=albanhuang@outlook.com \
    --cc=albanhuang@tencent.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox