Skip to contentSkip to conversation

serial: clps711x: Change compatible string

PATCH Applied Alexander Shiyan 3 participants 14 messages Dec 19, 2018 – Jan 8, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/10 serial: clps711x: Change compatible string

This patch changes compatible string for CLPS711X serial driver to "cirrus,ep7209-uart" for conform with linux kernel.

---
 drivers/serial/serial_clps711x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/serial_clps711x.c +1 -1
index fa6342346..9a9ae24c0 100644
@@ -182,7 +182,7 @@ out_err:
 }
 
 static struct of_device_id __maybe_unused clps711x_uart_dt_ids[] = {
-	{ .compatible = "cirrus,clps711x-uart", },
+	{ .compatible = "cirrus,ep7209-uart", },
 };
 
 static struct driver_d clps711x_driver = {
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#10 lore raw

PATCH 8/10 clocksource: clps711x: Add devicetree support

---
 drivers/clocksource/clps711x.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/clocksource/clps711x.c +6 -0
index f6399e930..d9e0f795e 100644
@@ -51,9 +51,15 @@ static int clps711x_cs_probe(struct device_d *dev)
 	return init_clock(&clps711x_cs);
 }
 
+static __maybe_unused struct of_device_id clps711x_timer_dt_ids[] = {
+	{ .compatible = "cirrus,ep7209-timer", },
+	{ }
+};
+
 static struct driver_d clps711x_cs_driver = {
 	.name = "clps711x-cs",
 	.probe = clps711x_cs_probe,
+	.of_compatible = DRV_OF_COMPAT(clps711x_timer_dt_ids),
 };
 
 static __init int clps711x_cs_init(void)
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#11 lore raw

PATCH 9/10 clocksource: clps711x: Switch to SPDX identifier

In reply to Alexander Shiyan

Adopt the SPDX license identifier headers to ease license compliance management.

---
 drivers/clocksource/clps711x.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/clocksource/clps711x.c +2 -8
index d9e0f795e..a3070e727 100644
@@ -1,11 +1,5 @@
-/*
- * Copyright (C) 2013 Alexander Shiyan <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- */
+// SPDX-License-Identifier: GPL-2.0+
+/* Author: Alexander Shiyan <[email protected]> */
 
 #include <common.h>
 #include <clock.h>
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#12 lore raw

PATCH 10/10 clocksource: clps711x: Use coredevice_platform_driver() macro

In reply to Alexander Shiyan
---
 drivers/clocksource/clps711x.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/clocksource/clps711x.c +1 -6
index a3070e727..3df2c81e9 100644
@@ -55,9 +55,4 @@ static struct driver_d clps711x_cs_driver = {
 	.probe = clps711x_cs_probe,
 	.of_compatible = DRV_OF_COMPAT(clps711x_timer_dt_ids),
 };
-
-static __init int clps711x_cs_init(void)
-{
-	return platform_driver_register(&clps711x_cs_driver);
-}
-coredevice_initcall(clps711x_cs_init);
+coredevice_platform_driver(clps711x_cs_driver);
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 2/10 serial: clps711x: Switch to SPDX identifier

In reply to Alexander Shiyan

Adopt the SPDX license identifier headers to ease license compliance management.

---
 drivers/serial/serial_clps711x.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/serial/serial_clps711x.c +2 -10
index 9a9ae24c0..c21ca6510 100644
@@ -1,13 +1,5 @@
-/*
- * Simple CLPS711X serial driver
- *
- * (C) Copyright 2012-2014 Alexander Shiyan <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- */
+// SPDX-License-Identifier: GPL-2.0+
+/* Author: Alexander Shiyan <[email protected]> */
 
 #include <common.h>
 #include <malloc.h>
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

PATCH 3/10 serial: clps711x: Use DIV_ROUND_CLOSEST() for baudrate calculation

In reply to Alexander Shiyan
---
 drivers/serial/serial_clps711x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/serial_clps711x.c +1 -1
index c21ca6510..863ba7dd3 100644
@@ -46,7 +46,7 @@ static int clps711x_setbaudrate(struct console_device *cdev, int baudrate)
 	int divisor;
 	u32 tmp;
 
-	divisor = (clk_get_rate(s->uart_clk) / 16) / baudrate;
+	divisor = DIV_ROUND_CLOSEST(clk_get_rate(s->uart_clk), baudrate * 16);
 
 	tmp = readl(s->base + UBRLCR) & ~UBRLCR_BAUD_MASK;
 	tmp |= divisor - 1;
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw

PATCH 4/10 serial: clps711x: Determine device name from device tree

In reply to Alexander Shiyan
---
 drivers/serial/serial_clps711x.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/serial/serial_clps711x.c +9 -0
index 863ba7dd3..d4f674afd 100644
@@ -124,6 +124,7 @@ static int clps711x_probe(struct device_d *dev)
 	struct clps711x_uart *s;
 	int err, id = dev->id;
 	char syscon_dev[8];
+	const char *devname;
 
 	if (dev->device_node)
 		id = of_alias_get_id(dev->device_node, "serial");
@@ -162,6 +163,14 @@ static int clps711x_probe(struct device_d *dev)
 	s->cdev.getc	= clps711x_getc;
 	s->cdev.flush	= clps711x_flush;
 	s->cdev.setbrg	= clps711x_setbaudrate;
+	s->cdev.linux_console_name = "ttyCL";
+
+	devname = of_alias_get(dev->device_node);
+	if (devname) {
+		s->cdev.devname = xstrdup(devname);
+		s->cdev.devid = DEVICE_ID_SINGLE;
+	}
+
 	clps711x_init_port(&s->cdev);
 
 	err = console_register(&s->cdev);
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#7 lore raw

PATCH 5/10 gpio: clps711x: Change compatible string

In reply to Alexander Shiyan

This patch changes compatible string for CLPS711X GPIO driver to "cirrus,ep7209-gpio" for conform with linux kernel.

---
 drivers/gpio/gpio-clps711x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-clps711x.c +1 -1
index c1ec6ab68..eef2a29e8 100644
@@ -71,7 +71,7 @@ out_err:
 }
 
 static struct of_device_id __maybe_unused clps711x_gpio_dt_ids[] = {
-	{ .compatible = "cirrus,clps711x-gpio", },
+	{ .compatible = "cirrus,ep7209-gpio", },
 	{ /* sentinel */ }
 };
 
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#9 lore raw

PATCH 7/10 gpio: clps711x: Use coredevice_platform_driver() macro

In reply to Alexander Shiyan
---
 drivers/gpio/gpio-clps711x.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpio/gpio-clps711x.c +1 -6
index d3d669713..946da533b 100644
@@ -74,9 +74,4 @@ static struct driver_d clps711x_gpio_driver = {
 	.probe		= clps711x_gpio_probe,
 	.of_compatible	= DRV_OF_COMPAT(clps711x_gpio_dt_ids),
 };
-
-static __init int clps711x_gpio_register(void)
-{
-	return platform_driver_register(&clps711x_gpio_driver);
-}
-coredevice_initcall(clps711x_gpio_register);
+coredevice_platform_driver(clps711x_gpio_driver);
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#8 lore raw

PATCH 6/10 gpio: clps711x: Switch to SPDX identifier

In reply to Alexander Shiyan

Adopt the SPDX license identifier headers to ease license compliance management.

---
 drivers/gpio/gpio-clps711x.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpio/gpio-clps711x.c +2 -8
index eef2a29e8..d3d669713 100644
@@ -1,11 +1,5 @@
-/*
- * Copyright (C) 2013-2014 Alexander Shiyan <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- */
+// SPDX-License-Identifier: GPL-2.0+
+/* Author: Alexander Shiyan <[email protected]> */
 
 #include <init.h>
 #include <common.h>
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#13 lore raw
In reply to Alexander Shiyan
Quoted 7 lines · Alexander Shiyan

This patch changes compatible string for CLPS711X serial driver to "cirrus,ep7209-uart" for conform with linux kernel.

---
 drivers/serial/serial_clps711x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied all, thanks

Sascha

Quoted 23 lines
drivers/serial/serial_clps711x.c +1 -1
index fa6342346..9a9ae24c0 100644
@@ -182,7 +182,7 @@ out_err:
 }
 
 static struct of_device_id __maybe_unused clps711x_uart_dt_ids[] = {
-	{ .compatible = "cirrus,clps711x-uart", },
+	{ .compatible = "cirrus,ep7209-uart", },
 };
 
 static struct driver_d clps711x_driver = {
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

Re: [PATCH 02/10] serial: clps711x: Switch to SPDX identifier

In reply to Alexander Shiyan

Hi Alexander,

Quoted 15 lines · Alexander Shiyan

Adopt the SPDX license identifier headers to ease license compliance management.

---
 drivers/serial/serial_clps711x.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/serial/serial_clps711x.c +0 -2
index 9a9ae24c0..c21ca6510 100644
@@ -1,13 +1,5 @@
-/*
- * Simple CLPS711X serial driver

drivers/serial/serial_clps711x.c line 2

Quoted 10 lines
drivers/serial/serial_clps711x.c +2 -8
- *
- * (C) Copyright 2012-2014 Alexander Shiyan <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- */
+// SPDX-License-Identifier: GPL-2.0+
+/* Author: Alexander Shiyan <[email protected]> */

Your removed the "Copyright" here and replaced it with "Author", but in some jurisdictions copyright and authorship are actually different things, and most automated license compliance tools only look for the string "Copyright", so your change will probably mean that your name will not be picked up as copyright. Was this change made deliberately?

Same goes for "[PATCH 06/10] gpio: clps711x: Switch to SPDX identifier".

- Roland

Quoted 12 lines
drivers/serial/serial_clps711x.c +0 -0
 #include <common.h>
 #include <malloc.h>
Signature · 7 lines
2.13.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Roland Hieber                     | [email protected]     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

Re: [PATCH 02/10] serial: clps711x: Switch to SPDX identifier

Quoted 35 lines · Roland Hieber

Hi Alexander,

Quoted 15 lines · Alexander Shiyan

Adopt the SPDX license identifier headers to ease license compliance management.

---
 drivers/serial/serial_clps711x.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/serial/serial_clps711x.c +0 -2
index 9a9ae24c0..c21ca6510 100644
@@ -1,13 +1,5 @@
-/*
- * Simple CLPS711X serial driver

drivers/serial/serial_clps711x.c line 2

Quoted 10 lines
drivers/serial/serial_clps711x.c +2 -8
- *
- * (C) Copyright 2012-2014 Alexander Shiyan <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- */
+// SPDX-License-Identifier: GPL-2.0+
+/* Author: Alexander Shiyan <[email protected]> */

Your removed the "Copyright" here and replaced it with "Author", but in some jurisdictions copyright and authorship are actually different things, and most automated license compliance tools only look for the string "Copyright", so your change will probably mean that your name will not be picked up as copyright. Was this change made deliberately?

Quoted 1 line

Same goes for "[PATCH 06/10] gpio: clps711x: Switch to SPDX identifier".

and "[PATCH 09/10] clocksource: clps711x: Switch to SPDX identifier".

- Roland

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#4 lore raw

Re: [PATCH 02/10] serial: clps711x: Switch to SPDX identifier

Quoted 38 lines

Пятница, 4 января 2019, 13:48 +03:00 от Roland Hieber <[email protected]>:

Quoted 35 lines · Roland Hieber

Hi Alexander,

Quoted 15 lines · Alexander Shiyan

Adopt the SPDX license identifier headers to ease license compliance management.

---
 drivers/serial/serial_clps711x.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/serial/serial_clps711x.c +0 -2
index 9a9ae24c0..c21ca6510 100644
@@ -1,13 +1,5 @@
-/*
- * Simple CLPS711X serial driver

drivers/serial/serial_clps711x.c line 2

Quoted 10 lines
drivers/serial/serial_clps711x.c +2 -8
- *
- * (C) Copyright 2012-2014 Alexander Shiyan < [email protected] >
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- */
+// SPDX-License-Identifier: GPL-2.0+
+/* Author: Alexander Shiyan < [email protected] > */

Your removed the "Copyright" here and replaced it with "Author", but in some jurisdictions copyright and authorship are actually different things, and most automated license compliance tools only look for the string "Copyright", so your change will probably mean that your name will not be picked up as copyright. Was this change made deliberately?

Quoted 3 lines
Quoted 1 line

Same goes for "[PATCH 06/10] gpio: clps711x: Switch to SPDX identifier".

and "[PATCH 09/10] clocksource: clps711x: Switch to SPDX identifier".

Everything is OK, as it was intended.

---
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox