diff mbox series

[1/2] tty: atmel_serial: print the controller version

Message ID 20241008083459.51249-1-mihai.sain@microchip.com (mailing list archive)
State New, archived
Headers show
Series [1/2] tty: atmel_serial: print the controller version | expand

Commit Message

Mihai Sain Oct. 8, 2024, 8:34 a.m. UTC
Add support to print the controller version similar
to other at91 drivers like spi and twi.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
 drivers/tty/serial/atmel_serial.c | 2 ++
 1 file changed, 2 insertions(+)


base-commit: 87d6aab2389e5ce0197d8257d5f8ee965a67c4cd

Comments

Greg Kroah-Hartman Oct. 8, 2024, 8:37 a.m. UTC | #1
On Tue, Oct 08, 2024 at 11:34:59AM +0300, Mihai Sain wrote:
> Add support to print the controller version similar
> to other at91 drivers like spi and twi.
> 
> Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
> ---
>  drivers/tty/serial/atmel_serial.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 09b246c9e389..5f93974918c0 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2970,6 +2970,8 @@ static int atmel_serial_probe(struct platform_device *pdev)
>  	 */
>  	clk_disable_unprepare(atmel_port->clk);
>  
> +	dev_info(&pdev->dev, "AT91 USART Controller version %#x",
> +		 atmel_uart_readl(&atmel_port->uart, ATMEL_US_VERSION));

No, the other drivers need to be fixed up, when drivers are working
properly, they are quiet.  This driver is correct by being quiet, please
send patches for the other ones to remove these types of lines.

thanks,

greg k-h
Greg Kroah-Hartman Oct. 8, 2024, 9:09 a.m. UTC | #2
On Tue, Oct 08, 2024 at 09:05:24AM +0000, Mihai.Sain@microchip.com wrote:
> > On Tue, Oct 08, 2024 at 11:34:59AM +0300, Mihai Sain wrote:
> > > Add support to print the controller version similar to other at91
> > > drivers like spi and twi.
> > >
> > > Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
> > > ---
> > >  drivers/tty/serial/atmel_serial.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/tty/serial/atmel_serial.c
> > > b/drivers/tty/serial/atmel_serial.c
> > > index 09b246c9e389..5f93974918c0 100644
> > > --- a/drivers/tty/serial/atmel_serial.c
> > > +++ b/drivers/tty/serial/atmel_serial.c
> > > @@ -2970,6 +2970,8 @@ static int atmel_serial_probe(struct platform_device
> > *pdev)
> > >        */
> > >       clk_disable_unprepare(atmel_port->clk);
> > >
> > > +     dev_info(&pdev->dev, "AT91 USART Controller version %#x",
> > > +              atmel_uart_readl(&atmel_port->uart, ATMEL_US_VERSION));
> > 
> > No, the other drivers need to be fixed up, when drivers are working properly,
> > they are quiet.  This driver is correct by being quiet, please send patches for
> > the other ones to remove these types of lines.
> 
> Is it acceptable to use dev_dbg instead of dev_info ?

Sure, but why?  What user would ever need/want to turn that on?
dev_dbg() is for developers to help support things, a dbg call at probe
time is rare.

What would you do with such a message?

thanks,

greg k-h
Greg Kroah-Hartman Oct. 8, 2024, 9:13 a.m. UTC | #3
On Tue, Oct 08, 2024 at 11:34:59AM +0300, Mihai Sain wrote:
> Add support to print the controller version similar
> to other at91 drivers like spi and twi.
> 
> Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
> ---
>  drivers/tty/serial/atmel_serial.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 09b246c9e389..5f93974918c0 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2970,6 +2970,8 @@ static int atmel_serial_probe(struct platform_device *pdev)
>  	 */
>  	clk_disable_unprepare(atmel_port->clk);
>  
> +	dev_info(&pdev->dev, "AT91 USART Controller version %#x",
> +		 atmel_uart_readl(&atmel_port->uart, ATMEL_US_VERSION));
>  	return 0;
>  
>  err_add_port:
> 
> base-commit: 87d6aab2389e5ce0197d8257d5f8ee965a67c4cd
> -- 
> 2.47.0
>

Did I miss patch 2/2 of this series?  I don't see it anywhere :(
diff mbox series

Patch

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 09b246c9e389..5f93974918c0 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2970,6 +2970,8 @@  static int atmel_serial_probe(struct platform_device *pdev)
 	 */
 	clk_disable_unprepare(atmel_port->clk);
 
+	dev_info(&pdev->dev, "AT91 USART Controller version %#x",
+		 atmel_uart_readl(&atmel_port->uart, ATMEL_US_VERSION));
 	return 0;
 
 err_add_port: