linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Guanbing Huang <albanhuang@outlook.com>
Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	albanhuang@tencent.com, tombinfan@tencent.com
Subject: Re: [PATCH v2] serial: 8250_pnp: Support configurable reg shift property
Date: Fri, 8 Mar 2024 18:15:25 +0200	[thread overview]
Message-ID: <Zes5nX4YdxrsGRji@smile.fi.intel.com> (raw)
In-Reply-To: <PSAPR06MB4952ED7EAD4410B25258F42FC9212@PSAPR06MB4952.apcprd06.prod.outlook.com>

On Wed, Mar 06, 2024 at 07:42:27PM +0800, Guanbing Huang wrote:
> From: Guanbing Huang <albanhuang@tencent.com>

Thanks for your contribution!
My comments below.

...


First of all, always start a new email thread when sending a new version of the
patch (i.o.w. no In-Reply-to email header).

> 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: Guanbing Huang <albanhuang@tencent.com>


> Signed-off-by: Bing Fan <tombinfan@tencent.com>
> Signed-off-by: Linheng Du <dylanlhdu@tencent.com>

This chain, as described in Submitting Patches documentation [1], should go
accordingly.

...

> @@ -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);
>  	uart.port.dev = &dev->dev;

Instead, it may make sense to switch to use uart_read_port_properties() which
has been recently introduced and dozen of drivers converted.

Ex. e6a46d073e11 ("serial: 8250_dw: Switch to use uart_read_port_properties()")

Yes, it assumes that you always need to base your changes on the latest
available changes in the certain subsystem (here it is tty-next branch
in Greg's tty tree, see git.kernel.org for the details).

>  	line = serial8250_register_8250_port(&uart);

[1]: https://www.kernel.org/doc/html/latest/process/submitting-patches.html

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2024-03-08 16:15 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
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 [this message]

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=Zes5nX4YdxrsGRji@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=albanhuang@outlook.com \
    --cc=albanhuang@tencent.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=tombinfan@tencent.com \
    /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;
as well as URLs for NNTP newsgroup(s).