drm/tegra: Use standard suffix for hotplug detect GPIO property
Subsystems (5)
cover drm/tegra: Use standard suffix for hotplug detect GPIO property
From: Thierry Reding <[email protected]>
The hotplug detect GPIO in the current bindings use "-gpio" as suffix, whereas the standard suffix is the plural: "-gpios". This small series replaces this in three steps to preserve bisectability:
- Patch 1 adds new nvidia,hpd-gpios properties to existing device tree files while marking existing nvidia,hpd-gpio ones as deprecated.
- Patch 2 makes use of the new property name in the driver and updates the device tree bindings.
- Patch 3 removes the deprecated properties from device tree files.
Since this touches both DRM and Tegra trees, I've prepared a stable branch[0] that can be pulled into both trees to make the transition easier.
Thierry
[0]: git://anongit.freedesktop.org/tegra/linux#drm/tegra/hpd-gpios-property
Thierry Reding (3):
ARM: tegra: Deprecate nvidia,hpd-gpio property drm/tegra: Use nvidia,hpd-gpios property
ARM: tegra: Remove deprecated nvidia,hpd-gpio properties
Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt | 8 ++++---- arch/arm/boot/dts/tegra114-dalmore.dts | 2 +- arch/arm/boot/dts/tegra20-colibri-512.dtsi | 4 ++-- arch/arm/boot/dts/tegra20-harmony.dts | 4 ++-- arch/arm/boot/dts/tegra20-paz00.dts | 4 ++-- arch/arm/boot/dts/tegra20-seaboard.dts | 4 ++-- arch/arm/boot/dts/tegra20-tamonten.dtsi | 4 ++-- arch/arm/boot/dts/tegra20-trimslice.dts | 4 ++-- arch/arm/boot/dts/tegra20-ventana.dts | 4 ++-- arch/arm/boot/dts/tegra20-whistler.dts | 4 ++-- arch/arm/boot/dts/tegra30-beaver.dts | 2 +- drivers/gpu/drm/tegra/output.c | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-)
Signature · 1 line
1.9.2
PATCH 1/3 ARM: tegra: Deprecate nvidia,hpd-gpio property
From: Thierry Reding <[email protected]>
Properties referencing GPIOs should use the plural suffix -gpios. This convention is encoded in the device tree backend of gpiod_get(), which we'll eventually want to migrate to.
Rename the property to nvidia,hpd-gpios but keep (and deprecate) the old name to preserve bisectability.
--- arch/arm/boot/dts/tegra114-dalmore.dts | 4 ++++ arch/arm/boot/dts/tegra20-colibri-512.dtsi | 4 ++++ arch/arm/boot/dts/tegra20-harmony.dts | 4 ++++ arch/arm/boot/dts/tegra20-paz00.dts | 4 ++++ arch/arm/boot/dts/tegra20-seaboard.dts | 4 ++++ arch/arm/boot/dts/tegra20-tamonten.dtsi | 4 ++++ arch/arm/boot/dts/tegra20-trimslice.dts | 4 ++++ arch/arm/boot/dts/tegra20-ventana.dts | 4 ++++ arch/arm/boot/dts/tegra20-whistler.dts | 4 ++++ arch/arm/boot/dts/tegra30-beaver.dts | 6 +++++- 10 files changed, 41 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra114-dalmore.dts +4 -0
@@ -29,6 +29,10 @@ pll-supply = <&palmas_smps3_reg>; nvidia,ddc-i2c-bus = <&hdmi_ddc>; + nvidia,hpd-gpios = + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; + + /* deprecated */ nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra20-colibri-512.dtsi +4 -0
@@ -19,6 +19,10 @@ pll-supply = <&hdmi_pll_reg>; nvidia,ddc-i2c-bus = <&i2c_ddc>; + nvidia,hpd-gpios = + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; + + /* deprecated */ nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra20-harmony.dts +4 -0
@@ -32,6 +32,10 @@ pll-supply = <&hdmi_pll_reg>; nvidia,ddc-i2c-bus = <&hdmi_ddc>; + nvidia,hpd-gpios = + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; + + /* deprecated */ nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra20-paz00.dts +4 -0
@@ -32,6 +32,10 @@ pll-supply = <&hdmi_pll_reg>; nvidia,ddc-i2c-bus = <&hdmi_ddc>; + nvidia,hpd-gpios = + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; + + /* deprecated */ nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra20-seaboard.dts +4 -0
@@ -32,6 +32,10 @@ pll-supply = <&hdmi_pll_reg>; nvidia,ddc-i2c-bus = <&hdmi_ddc>; + nvidia,hpd-gpios = + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; + + /* deprecated */ nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra20-tamonten.dtsi +4 -0
@@ -19,6 +19,10 @@ pll-supply = <&hdmi_pll_reg>; nvidia,ddc-i2c-bus = <&hdmi_ddc>; + nvidia,hpd-gpios = + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; + + /* deprecated */ nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra20-trimslice.dts +4 -0
@@ -24,6 +24,10 @@ pll-supply = <&hdmi_pll_reg>; nvidia,ddc-i2c-bus = <&hdmi_ddc>; + nvidia,hpd-gpios = + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; + + /* deprecated */ nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra20-ventana.dts +4 -0
@@ -32,6 +32,10 @@ pll-supply = <&hdmi_pll_reg>; nvidia,ddc-i2c-bus = <&hdmi_ddc>; + nvidia,hpd-gpios = + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; + + /* deprecated */ nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra20-whistler.dts +4 -0
@@ -24,6 +24,10 @@ pll-supply = <&hdmi_pll_reg>; nvidia,ddc-i2c-bus = <&hdmi_ddc>; + nvidia,hpd-gpios = + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; + + /* deprecated */ nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra30-beaver.dts +5 -1
@@ -43,9 +43,13 @@ vdd-supply = <&sys_3v3_reg>; pll-supply = <&vio_reg>; - nvidia,hpd-gpio = + nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; nvidia,ddc-i2c-bus = <&hdmiddc>; + + /* deprecated */ + nvidia,hpd-gpio = + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; }; };
Signature · 1 line
1.9.2
PATCH 2/3 drm/tegra: Use nvidia,hpd-gpios property
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Make use of the new nvidia,hpd-gpios property and remove support for the deprecated nvidia,hpd-gpio property.
--- Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt | 8 ++++---- drivers/gpu/drm/tegra/output.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt +4 -4
@@ -126,7 +126,7 @@ of the following host1x client modules: the RGB output associated with the controller. It can take the following optional properties: - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection + - nvidia,hpd-gpios: specifies a GPIO used for hotplug detection - nvidia,edid: supplies a binary EDID blob - nvidia,panel: phandle of a display panel
@@ -151,7 +151,7 @@ of the following host1x client modules: Optional properties: - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection + - nvidia,hpd-gpios: specifies a GPIO used for hotplug detection - nvidia,edid: supplies a binary EDID blob - nvidia,panel: phandle of a display panel
@@ -186,7 +186,7 @@ of the following host1x client modules: Optional properties: - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection + - nvidia,hpd-gpios: specifies a GPIO used for hotplug detection - nvidia,edid: supplies a binary EDID blob - nvidia,panel: phandle of a display panel
@@ -210,7 +210,7 @@ of the following host1x client modules: Optional properties: - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection + - nvidia,hpd-gpios: specifies a GPIO used for hotplug detection - nvidia,edid: supplies a binary EDID blob - nvidia,panel: phandle of a display panel
drivers/gpu/drm/tegra/output.c +1 -1
@@ -223,7 +223,7 @@ int tegra_output_probe(struct tegra_output *output) } output->hpd_gpio =of_get_named_gpio_flags (output->of_node, -"nvidia,hpd-gpio" ,0 , +"nvidia,hpd-gpios" ,0 , &flags);if (gpio_is_valid (output->hpd_gpio)) {unsigned long flags;
Signature · 1 line
1.9.2
PATCH 3/3 ARM: tegra: Remove deprecated nvidia,hpd-gpio properties
In reply to a message not in the archiveFrom: Thierry Reding <[email protected]>
This property has been replaced by one with a more standard name (nvidia,hpd-gpios) and is now obsolete.
--- arch/arm/boot/dts/tegra114-dalmore.dts | 4 ---- arch/arm/boot/dts/tegra20-colibri-512.dtsi | 4 ---- arch/arm/boot/dts/tegra20-harmony.dts | 4 ---- arch/arm/boot/dts/tegra20-paz00.dts | 4 ---- arch/arm/boot/dts/tegra20-seaboard.dts | 4 ---- arch/arm/boot/dts/tegra20-tamonten.dtsi | 4 ---- arch/arm/boot/dts/tegra20-trimslice.dts | 4 ---- arch/arm/boot/dts/tegra20-ventana.dts | 4 ---- arch/arm/boot/dts/tegra20-whistler.dts | 4 ---- arch/arm/boot/dts/tegra30-beaver.dts | 4 ---- 10 files changed, 40 deletions(-)
arch/arm/boot/dts/tegra114-dalmore.dts +0 -4
@@ -31,10 +31,6 @@ nvidia,ddc-i2c-bus = <&hdmi_ddc>; nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; - - /* deprecated */ - nvidia,hpd-gpio = - <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; }; dsi@54300000 {
arch/arm/boot/dts/tegra20-colibri-512.dtsi +0 -4
@@ -21,10 +21,6 @@ nvidia,ddc-i2c-bus = <&i2c_ddc>; nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; - - /* deprecated */ - nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) - GPIO_ACTIVE_HIGH>; }; };
arch/arm/boot/dts/tegra20-harmony.dts +0 -4
@@ -34,10 +34,6 @@ nvidia,ddc-i2c-bus = <&hdmi_ddc>; nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; - - /* deprecated */ - nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) - GPIO_ACTIVE_HIGH>; }; };
arch/arm/boot/dts/tegra20-paz00.dts +0 -4
@@ -34,10 +34,6 @@ nvidia,ddc-i2c-bus = <&hdmi_ddc>; nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; - - /* deprecated */ - nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) - GPIO_ACTIVE_HIGH>; }; };
arch/arm/boot/dts/tegra20-seaboard.dts +0 -4
@@ -34,10 +34,6 @@ nvidia,ddc-i2c-bus = <&hdmi_ddc>; nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; - - /* deprecated */ - nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) - GPIO_ACTIVE_HIGH>; }; };
arch/arm/boot/dts/tegra20-tamonten.dtsi +0 -4
@@ -21,10 +21,6 @@ nvidia,ddc-i2c-bus = <&hdmi_ddc>; nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; - - /* deprecated */ - nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) - GPIO_ACTIVE_HIGH>; }; };
arch/arm/boot/dts/tegra20-trimslice.dts +0 -4
@@ -26,10 +26,6 @@ nvidia,ddc-i2c-bus = <&hdmi_ddc>; nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; - - /* deprecated */ - nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) - GPIO_ACTIVE_HIGH>; }; };
arch/arm/boot/dts/tegra20-ventana.dts +0 -4
@@ -34,10 +34,6 @@ nvidia,ddc-i2c-bus = <&hdmi_ddc>; nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; - - /* deprecated */ - nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) - GPIO_ACTIVE_HIGH>; }; };
arch/arm/boot/dts/tegra20-whistler.dts +0 -4
@@ -26,10 +26,6 @@ nvidia,ddc-i2c-bus = <&hdmi_ddc>; nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; - - /* deprecated */ - nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) - GPIO_ACTIVE_HIGH>; }; };
arch/arm/boot/dts/tegra30-beaver.dts +0 -4
@@ -46,10 +46,6 @@ nvidia,hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; nvidia,ddc-i2c-bus = <&hdmiddc>; - - /* deprecated */ - nvidia,hpd-gpio = - <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; }; };
Signature · 1 line
1.9.2
Am Donnerstag, den 17.04.2014, 14:02 +0200 schrieb Thierry Reding:
Quoted 12 lines
From: Thierry Reding <[email protected]>
The hotplug detect GPIO in the current bindings use "-gpio" as suffix, whereas the standard suffix is the plural: "-gpios". This small series replaces this in three steps to preserve bisectability:
- Patch 1 adds new nvidia,hpd-gpios properties to existing device tree files while marking existing nvidia,hpd-gpio ones as deprecated.
- Patch 2 makes use of the new property name in the driver and updates the device tree bindings.
- Patch 3 removes the deprecated properties from device tree files.
Quoted 4 lines
Since this touches both DRM and Tegra trees, I've prepared a stable branch[0] that can be pulled into both trees to make the transition easier.
What's the real benefit to this series? After all you are breaking existing devicetrees here, as the driver doesn't continue to recognize the old name. IMHO adding a missed 's' to the property name isn't enough reason to do this.
Regards,
Lucas
Quoted 13 lines · Lucas Stach
Am Donnerstag, den 17.04.2014, 14:02 +0200 schrieb Thierry Reding:
Quoted 12 lines
From: Thierry Reding <[email protected]>
The hotplug detect GPIO in the current bindings use "-gpio" as suffix, whereas the standard suffix is the plural: "-gpios". This small series replaces this in three steps to preserve bisectability:
- Patch 1 adds new nvidia,hpd-gpios properties to existing device tree files while marking existing nvidia,hpd-gpio ones as deprecated.
- Patch 2 makes use of the new property name in the driver and updates the device tree bindings.
- Patch 3 removes the deprecated properties from device tree files.
Quoted 8 lines
Quoted 4 lines
Since this touches both DRM and Tegra trees, I've prepared a stable branch[0] that can be pulled into both trees to make the transition easier.
What's the real benefit to this series? After all you are breaking existing devicetrees here, as the driver doesn't continue to recognize the old name. IMHO adding a missed 's' to the property name isn't enough reason to do this.
The series is explicitly done in a way to ensure that at least in-tree device trees will keep working across the whole series. Obviously if anybody were to use a DTB written according to the deprecated binding that would no longer work.
However I'd like to eventually convert the driver to use the new GPIO descriptor helpers because they make it a lot easier to deal with the GPIOs. And with the new gpiod_get() function you loose the ability to specify an exact property name as it appends the -gpios suffix automatically.
The idea is to rectify this mistake now that there's still a manageable number of boards in the tree and we have never really supported stable devicetree bindings on Tegra anyway. Or to put it differently, there is not enough functionality on Tegra generally to make it practicable to use it in production. Therefore I think it makes sense to fix these issues while it's still a viable option.
Thierry
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/3] ARM: tegra: Deprecate nvidia,hpd-gpio property
In reply to a message not in the archiveQuoted 5 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Properties referencing GPIOs should use the plural suffix -gpios. This convention is encoded in the device tree backend of
gpiod_get(), which we'll eventually want to migrate to.
Wouldn't it be simpler to fix the GPIO binding documentation and gpiod_get() code to allow the -gpio suffix in addition to -gpios? It always struck me as silly that the binding required a plural property name when only a single entry made sense.
(For something like "clocks", since the property name applies to any clock, and there certainly can be many clocks, a plural property name makes sense. However, since each type of GPIO is "foo-gpios" rather than an "foo" entry in "gpios", that same argument doesn't apply, and a singular property name seems much more correct).
Re: [PATCH 1/3] ARM: tegra: Deprecate nvidia,hpd-gpio property
In reply to a message not in the archiveQuoted 12 lines · Stephen Warren
Quoted 5 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Properties referencing GPIOs should use the plural suffix -gpios. This convention is encoded in the device tree backend of
gpiod_get(), which we'll eventually want to migrate to.Wouldn't it be simpler to fix the GPIO binding documentation and
gpiod_get()code to allow the -gpio suffix in addition to -gpios? It always struck me as silly that the binding required a plural property name when only a single entry made sense.
Quoted 5 lines
(For something like "clocks", since the property name applies to any clock, and there certainly can be many clocks, a plural property name makes sense. However, since each type of GPIO is "foo-gpios" rather than an "foo" entry in "gpios", that same argument doesn't apply, and a singular property name seems much more correct).
Yeah, it's somewhat unfortunate that this is done inconsistently across different subsystems. GPIO isn't the only exception here. Regulators use a similar pattern.
For consistency it'd be nice if we could get everyone to agree to one scheme, but I suspect that by now we're far beyond that being a viable option.
I don't have a strong feeling either way, so if allowing both *-gpios and *-gpio properties is what we want, then I can certainly come up with a patch.
Thierry
Re: [PATCH 1/3] ARM: tegra: Deprecate nvidia,hpd-gpio property
Am Dienstag, den 22.04.2014, 09:23 +0200 schrieb Thierry Reding:
Quoted 23 lines · Stephen Warren
Quoted 12 lines · Thierry Reding
Quoted 5 lines
From: Thierry Reding <[email protected]>
Properties referencing GPIOs should use the plural suffix -gpios. This convention is encoded in the device tree backend of
gpiod_get(), which we'll eventually want to migrate to.Wouldn't it be simpler to fix the GPIO binding documentation and
gpiod_get()code to allow the -gpio suffix in addition to -gpios? It always struck me as silly that the binding required a plural property name when only a single entry made sense.Quoted 5 lines
(For something like "clocks", since the property name applies to any clock, and there certainly can be many clocks, a plural property name makes sense. However, since each type of GPIO is "foo-gpios" rather than an "foo" entry in "gpios", that same argument doesn't apply, and a singular property name seems much more correct).
Yeah, it's somewhat unfortunate that this is done inconsistently across different subsystems. GPIO isn't the only exception here. Regulators use a similar pattern.
Quoted 8 lines
For consistency it'd be nice if we could get everyone to agree to one scheme, but I suspect that by now we're far beyond that being a viable option.
I don't have a strong feeling either way, so if allowing both *-gpios and *-gpio properties is what we want, then I can certainly come up with a patch.
I agree with Stephen, allowing the singular form in the property name seems like a nicer solution (it makes for a less irritating property name), without the need to break existing DTs.
Regards,
Lucas
Signature · 2 lines
Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ |