Skip to content

Commit

Permalink
gpio: exar: Use correct property prefix and document bindings
Browse files Browse the repository at this point in the history
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: 380b1e2 ("gpio-exar/8250-exar: Make set of exported GPIOs configurable")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Jan Kiszka authored and Linus Walleij committed Aug 1, 2017
1 parent cc9269f commit a589e21
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Documentation/devicetree/bindings/gpio/gpio-exar.txt
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-exar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/tty/serial/8250/8250_exar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
{ }
};
Expand Down Expand Up @@ -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),
{ }
};
Expand Down

0 comments on commit a589e21

Please sign in to comment.