linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] gpio-exar: Use correct property prefix and document bindings
@ 2017-07-19  5:31 Jan Kiszka
  2017-07-24 19:06 ` Rob Herring
  2017-08-01 11:44 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Kiszka @ 2017-07-19  5:31 UTC (permalink / raw)
  To: Linus Walleij, Rob Herring, Mark Rutland
  Cc: linux-gpio, devicetree, Linux Kernel Mailing List,
	Andy Shevchenko, Greg Kroah-Hartman

The device-specific property should be prefixed with the vendor name,
not "linux,", as Linus Walleij pointed out. Change this and document the
bindings of this platform device.

We didn't ship the old binding in a release yet. So we can still change
it without breaking an official API.

Fixes: 380b1e2f3a2f ("gpio-exar/8250-exar: Make set of exported GPIOs configurable")

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 Documentation/devicetree/bindings/gpio/gpio-exar.txt | 5 +++++
 drivers/gpio/gpio-exar.c                             | 2 +-
 drivers/tty/serial/8250/8250_exar.c                  | 4 ++--
 3 files changed, 8 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-exar.txt

diff --git a/Documentation/devicetree/bindings/gpio/gpio-exar.txt b/Documentation/devicetree/bindings/gpio/gpio-exar.txt
new file mode 100644
index 000000000000..4540d61824af
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-exar.txt
@@ -0,0 +1,5 @@
+Exportable MPIO interface of Exar UART chips
+
+Required properties of the device:
+ - exar,first-pin: first exportable pins (0..15)
+ - ngpios: number of exportable pins (1..16)
diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c
index fb8d304cfa17..0ecd2369c2ca 100644
--- a/drivers/gpio/gpio-exar.c
+++ b/drivers/gpio/gpio-exar.c
@@ -132,7 +132,7 @@ static int gpio_exar_probe(struct platform_device *pdev)
 	if (!p)
 		return -ENOMEM;
 
-	ret = device_property_read_u32(&pdev->dev, "linux,first-pin",
+	ret = device_property_read_u32(&pdev->dev, "exar,first-pin",
 				       &first_pin);
 	if (ret)
 		return ret;
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index b5c98e5bf524..c6360fbdf808 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -261,7 +261,7 @@ __xr17v35x_register_gpio(struct pci_dev *pcidev,
 }
 
 static const struct property_entry exar_gpio_properties[] = {
-	PROPERTY_ENTRY_U32("linux,first-pin", 0),
+	PROPERTY_ENTRY_U32("exar,first-pin", 0),
 	PROPERTY_ENTRY_U32("ngpios", 16),
 	{ }
 };
@@ -326,7 +326,7 @@ static int iot2040_rs485_config(struct uart_port *port,
 }
 
 static const struct property_entry iot2040_gpio_properties[] = {
-	PROPERTY_ENTRY_U32("linux,first-pin", 10),
+	PROPERTY_ENTRY_U32("exar,first-pin", 10),
 	PROPERTY_ENTRY_U32("ngpios", 1),
 	{ }
 };
-- 
2.12.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] gpio-exar: Use correct property prefix and document bindings
  2017-07-19  5:31 [PATCH v2] gpio-exar: Use correct property prefix and document bindings Jan Kiszka
@ 2017-07-24 19:06 ` Rob Herring
  2017-08-01 11:44 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2017-07-24 19:06 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Linus Walleij, Mark Rutland, linux-gpio, devicetree,
	Linux Kernel Mailing List, Andy Shevchenko, Greg Kroah-Hartman

On Wed, Jul 19, 2017 at 07:31:14AM +0200, Jan Kiszka wrote:
> The device-specific property should be prefixed with the vendor name,
> not "linux,", as Linus Walleij pointed out. Change this and document the
> bindings of this platform device.
> 
> We didn't ship the old binding in a release yet. So we can still change
> it without breaking an official API.
> 
> Fixes: 380b1e2f3a2f ("gpio-exar/8250-exar: Make set of exported GPIOs configurable")
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  Documentation/devicetree/bindings/gpio/gpio-exar.txt | 5 +++++
>  drivers/gpio/gpio-exar.c                             | 2 +-
>  drivers/tty/serial/8250/8250_exar.c                  | 4 ++--
>  3 files changed, 8 insertions(+), 3 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-exar.txt

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] gpio-exar: Use correct property prefix and document bindings
  2017-07-19  5:31 [PATCH v2] gpio-exar: Use correct property prefix and document bindings Jan Kiszka
  2017-07-24 19:06 ` Rob Herring
@ 2017-08-01 11:44 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2017-08-01 11:44 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Rob Herring, Mark Rutland, linux-gpio, devicetree,
	Linux Kernel Mailing List, Andy Shevchenko, Greg Kroah-Hartman

On Wed, Jul 19, 2017 at 7:31 AM, Jan Kiszka <jan.kiszka@siemens.com> wrote:

> The device-specific property should be prefixed with the vendor name,
> not "linux,", as Linus Walleij pointed out. Change this and document the
> bindings of this platform device.
>
> We didn't ship the old binding in a release yet. So we can still change
> it without breaking an official API.
>
> Fixes: 380b1e2f3a2f ("gpio-exar/8250-exar: Make set of exported GPIOs configurable")
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Patch applied for fixes with Rob's ACK, nice fixup!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-01 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-19  5:31 [PATCH v2] gpio-exar: Use correct property prefix and document bindings Jan Kiszka
2017-07-24 19:06 ` Rob Herring
2017-08-01 11:44 ` Linus Walleij

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).