Skip to contentSkip to conversation

tty: atmel_serial: print the controller version

PATCH In review Mihai Sain 2 participants 6 messages Oct 8, 2024

Subsystems (3)
lore
Share & tools
lore

Mihai Sain

author
#0 lore raw

PATCH 1/2 tty: atmel_serial: print the controller version

Add support to print the controller version similar to other at91 drivers like spi and twi.

---
 drivers/tty/serial/atmel_serial.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/atmel_serial.c +2 -0
index 09b246c9e389..5f93974918c0 100644
@@ -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

Signature · 1 line
2.47.0
maintainer
#1 lore raw
Quoted 13 lines · Mihai Sain

Add support to print the controller version similar to other at91 drivers like spi and twi.

---
 drivers/tty/serial/atmel_serial.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/atmel_serial.c +0 -0
index 09b246c9e389..5f93974918c0 100644

drivers/tty/serial/atmel_serial.c static int atmel_serial_probe(struct platform_device *pdev) · line 2974

Quoted 5 lines
drivers/tty/serial/atmel_serial.c +2 -0
@@ -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

#2 lore raw
Quoted 19 lines · Mihai Sain

drivers/tty/serial/atmel_serial.c static int atmel_serial_probe(struct platform_device

Quoted 14 lines

Add support to print the controller version similar to other at91 drivers like spi and twi.

---
 drivers/tty/serial/atmel_serial.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/atmel_serial.c +0 -0
index 09b246c9e389..5f93974918c0 100644
@@ -2970,6 +2970,8 @@ static int atmel_serial_probe(struct platform_device

*pdev)

Quoted 3 lines
drivers/tty/serial/atmel_serial.c +0 -0
       */
      clk_disable_unprepare(atmel_port->clk);
 
Quoted 6 lines

drivers/tty/serial/atmel_serial.c static int atmel_serial_probe(struct platform_device *pdev) · line 2974

Quoted 2 lines
drivers/tty/serial/atmel_serial.c +2 -0
+     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 ? Thanks.

Quoted 4 lines

thanks,

greg k-h

maintainer
#3 lore raw
Quoted 19 lines · On Tue, Oct 08, 2024 at 09:05:24AM +0000, [email protected] wrote:
Quoted 19 lines · Mihai Sain

drivers/tty/serial/atmel_serial.c static int atmel_serial_probe(struct platform_device

Quoted 14 lines

Add support to print the controller version similar to other at91 drivers like spi and twi.

---
 drivers/tty/serial/atmel_serial.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/atmel_serial.c +0 -0
index 09b246c9e389..5f93974918c0 100644
@@ -2970,6 +2970,8 @@ static int atmel_serial_probe(struct platform_device

*pdev)

Quoted 3 lines
drivers/tty/serial/atmel_serial.c +0 -0
       */
      clk_disable_unprepare(atmel_port->clk);
 
Quoted 8 lines
Quoted 6 lines

drivers/tty/serial/atmel_serial.c static int atmel_serial_probe(struct platform_device *pdev) · line 2974

Quoted 2 lines
drivers/tty/serial/atmel_serial.c +2 -0
+     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

maintainer
#4 lore raw
In reply to Mihai Sain
Quoted 22 lines · Mihai Sain

Add support to print the controller version similar to other at91 drivers like spi and twi.

---
 drivers/tty/serial/atmel_serial.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/atmel_serial.c +2 -0
index 09b246c9e389..5f93974918c0 100644
@@ -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:
Quoted 4 lines

base-commit: 87d6aab2389e5ce0197d8257d5f8ee965a67c4cd

Signature · 1 line
2.47.0

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

#5 lore raw
Quoted 23 lines · Mihai Sain

drivers/tty/serial/atmel_serial.c static int atmel_serial_probe(struct platform_device

Quoted 14 lines

Add support to print the controller version similar to other at91 drivers like spi and twi.

---
 drivers/tty/serial/atmel_serial.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/atmel_serial.c +0 -0
index 09b246c9e389..5f93974918c0 100644
@@ -2970,6 +2970,8 @@ static int atmel_serial_probe(struct platform_device

*pdev)

Quoted 7 lines
drivers/tty/serial/atmel_serial.c +2 -0
       */
      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;
 
Quoted 8 lines
Quoted 6 lines
drivers/tty/serial/atmel_serial.c +0 -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 :(

No.
There is no 2nd patch 😊