Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1586804 > unrolled thread
| Started by | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| First post | 2017-02-23 11:40 +0100 |
| Last post | 2017-02-24 13:20 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v1 2/3] extcon: int3496: Rename GPIO pins in accordance with binding Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-02-23 11:40 +0100
Re: [PATCH v1 2/3] extcon: int3496: Rename GPIO pins in accordance with binding Chanwoo Choi <cw00.choi@samsung.com> - 2017-02-24 02:20 +0100
Re: [PATCH v1 2/3] extcon: int3496: Rename GPIO pins in accordance with binding Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-02-24 13:20 +0100
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2017-02-23 11:40 +0100 |
| Subject | [PATCH v1 2/3] extcon: int3496: Rename GPIO pins in accordance with binding |
| Message-ID | <tdYYy-8q5-19@gated-at.bofh.it> |
First of all, add an optional binding for external muxer which might be
used.
Second, update GPIO pin names in extcon-intel-int3496.c driver to follow
the existing binding.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt | 3 +++
drivers/extcon/extcon-intel-int3496.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
index dfc14f71e81f..9d97472ae51d 100644
--- a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
+++ b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
@@ -10,6 +10,9 @@ Either one of id-gpio or vbus-gpio must be present. Both can be present as well.
- id-gpio: gpio for USB ID pin. See gpio binding.
- vbus-gpio: gpio for USB VBUS pin.
+Optional properties:
+- mux-gpios: gpio for USB external muxer
+
Example: Examples of extcon-usb-gpio node in dra7-evm.dts as listed below:
extcon_usb1 {
compatible = "linux,extcon-usb-gpio";
diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
index 38eb6cab938f..81713bf7487e 100644
--- a/drivers/extcon/extcon-intel-int3496.c
+++ b/drivers/extcon/extcon-intel-int3496.c
@@ -105,13 +105,13 @@ static int int3496_probe(struct platform_device *pdev)
return data->usb_id_irq;
}
- data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus en",
+ data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus",
INT3496_GPIO_VBUS_EN,
GPIOD_ASIS);
if (IS_ERR(data->gpio_vbus_en))
dev_info(dev, "can't request VBUS EN GPIO\n");
- data->gpio_usb_mux = devm_gpiod_get_index(dev, "usb mux",
+ data->gpio_usb_mux = devm_gpiod_get_index(dev, "mux",
INT3496_GPIO_USB_MUX,
GPIOD_ASIS);
if (IS_ERR(data->gpio_usb_mux))
--
2.11.0
[toc] | [next] | [standalone]
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Date | 2017-02-24 02:20 +0100 |
| Subject | Re: [PATCH v1 2/3] extcon: int3496: Rename GPIO pins in accordance with binding |
| Message-ID | <tecIa-11o-15@gated-at.bofh.it> |
| In reply to | #1586804 |
Hi,
On 2017년 02월 23일 19:31, Andy Shevchenko wrote:
> First of all, add an optional binding for external muxer which might be
> used.
>
> Second, update GPIO pin names in extcon-intel-int3496.c driver to follow
> the existing binding.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt | 3 +++
> drivers/extcon/extcon-intel-int3496.c | 4 ++--
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
> index dfc14f71e81f..9d97472ae51d 100644
> --- a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
> +++ b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
> @@ -10,6 +10,9 @@ Either one of id-gpio or vbus-gpio must be present. Both can be present as well.
> - id-gpio: gpio for USB ID pin. See gpio binding.
> - vbus-gpio: gpio for USB VBUS pin.
>
> +Optional properties:
> +- mux-gpios: gpio for USB external muxer
The Documentation/extcon/intel-int3496.txt includes
already the information for id/vbus/mux pin.
The extcon-usb-gpio.txt is not related with the extcon-int3496 driver.
> +
> Example: Examples of extcon-usb-gpio node in dra7-evm.dts as listed below:
> extcon_usb1 {
> compatible = "linux,extcon-usb-gpio";
> diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
> index 38eb6cab938f..81713bf7487e 100644
> --- a/drivers/extcon/extcon-intel-int3496.c
> +++ b/drivers/extcon/extcon-intel-int3496.c
> @@ -105,13 +105,13 @@ static int int3496_probe(struct platform_device *pdev)
> return data->usb_id_irq;
> }
>
> - data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus en",
> + data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus",
> INT3496_GPIO_VBUS_EN,
> GPIOD_ASIS);
> if (IS_ERR(data->gpio_vbus_en))
> dev_info(dev, "can't request VBUS EN GPIO\n");
>
> - data->gpio_usb_mux = devm_gpiod_get_index(dev, "usb mux",
> + data->gpio_usb_mux = devm_gpiod_get_index(dev, "mux",
> INT3496_GPIO_USB_MUX,
> GPIOD_ASIS);
> if (IS_ERR(data->gpio_usb_mux))
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-02-24 13:20 +0100 |
| Subject | Re: [PATCH v1 2/3] extcon: int3496: Rename GPIO pins in accordance with binding |
| Message-ID | <ten0S-8s6-9@gated-at.bofh.it> |
| In reply to | #1587223 |
On Fri, Feb 24, 2017 at 3:17 AM, Chanwoo Choi <cw00.choi@samsung.com> wrote:
> On 2017년 02월 23일 19:31, Andy Shevchenko wrote:
>> First of all, add an optional binding for external muxer which might be
>> used.
>> --- a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
>> +++ b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
>> @@ -10,6 +10,9 @@ Either one of id-gpio or vbus-gpio must be present. Both can be present as well.
>> - id-gpio: gpio for USB ID pin. See gpio binding.
>> - vbus-gpio: gpio for USB VBUS pin.
>>
>> +Optional properties:
>> +- mux-gpios: gpio for USB external muxer
>
> The Documentation/extcon/intel-int3496.txt includes
> already the information for id/vbus/mux pin.
Thanks for pointing this out...
> The extcon-usb-gpio.txt is not related with the extcon-int3496 driver.
...but the bindings is related to ACPI somehow. I dunno why in
extcon-usb-gpio.c we have
if (!np && !ACPI_HANDLE(dev))
...and thus it means either firmware chooses we better to have
standardized bindings in both cases.
OTOH mux-gpios indeed doesn't make sense for extcon-usb-gpio.c and
would be removed from the bindings.
I'll update patches accordingly.
--
With Best Regards,
Andy Shevchenko
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web