* [PATCHv3 1/6] thermal: ti-soc-thermal: use standard GPIO DT bindings
[not found] <1370637968-23299-1-git-send-email-eduardo.valentin@ti.com>
@ 2013-06-07 20:46 ` Eduardo Valentin
2013-06-19 2:28 ` [PATCHv4 " Eduardo Valentin
2013-06-07 20:46 ` [PATCHv3 3/6] arm: dts: add bandgap entry for OMAP443x devices Eduardo Valentin
2013-06-07 20:46 ` [PATCHv3 4/6] arm: dts: add bandgap entry for OMAP4460 devices Eduardo Valentin
2 siblings, 1 reply; 7+ messages in thread
From: Eduardo Valentin @ 2013-06-07 20:46 UTC (permalink / raw)
To: tony, grant.likely
Cc: linux-pm, linux-omap, linux, Eduardo Valentin, Zhang Rui,
Rob Herring, linux-kernel, devicetree-discuss
This change updates the ti-soc-thermal driver to use
standard GPIO DT bindings to read the GPIO number associated
to thermal shutdown IRQ, in case the device features it.
Previously, the code was using a specific DT bindings.
As now OMAP supports the standard way to model GPIOs,
there is no point in having a ti specific binding.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
drivers/staging/ti-soc-thermal/ti-bandgap.c | 8 ++------
drivers/staging/ti-soc-thermal/ti_soc_thermal.txt | 9 +++++----
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/staging/ti-soc-thermal/ti-bandgap.c
index f20c1cf..c7fc0d0 100644
--- a/drivers/staging/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/staging/ti-soc-thermal/ti-bandgap.c
@@ -38,6 +38,7 @@
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/of_irq.h>
+#include <linux/of_gpio.h>
#include <linux/io.h>
#include "ti-bandgap.h"
@@ -1123,7 +1124,6 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
const struct of_device_id *of_id;
struct ti_bandgap *bgp;
struct resource *res;
- u32 prop;
int i;
/* just for the sake */
@@ -1167,11 +1167,7 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
} while (res);
if (TI_BANDGAP_HAS(bgp, TSHUT)) {
- if (of_property_read_u32(node, "ti,tshut-gpio", &prop) < 0) {
- dev_err(&pdev->dev, "missing tshut gpio in device tree\n");
- return ERR_PTR(-EINVAL);
- }
- bgp->tshut_gpio = prop;
+ bgp->tshut_gpio = of_get_gpio(node, 0);
if (!gpio_is_valid(bgp->tshut_gpio)) {
dev_err(&pdev->dev, "invalid gpio for tshut (%d)\n",
bgp->tshut_gpio);
diff --git a/drivers/staging/ti-soc-thermal/ti_soc_thermal.txt b/drivers/staging/ti-soc-thermal/ti_soc_thermal.txt
index a4a33d1..382bd98 100644
--- a/drivers/staging/ti-soc-thermal/ti_soc_thermal.txt
+++ b/drivers/staging/ti-soc-thermal/ti_soc_thermal.txt
@@ -17,8 +17,9 @@ Required properties:
- interrupts : this entry should indicate which interrupt line
the talert signal is routed to;
Specific:
-- ti,tshut-gpio : this entry should be used to inform which GPIO
-line the tshut signal is routed to;
+- gpios : this entry should be used to inform which GPIO
+line the tshut signal is routed to. The informed GPIO will
+be treated as an IRQ;
- regs : this entry must also be specified and it is specific
to each bandgap version, because the mapping may change from
soc to soc, apart of depending on available features.
@@ -37,7 +38,7 @@ bandgap {
0x4a002378 0x18>;
compatible = "ti,omap4460-bandgap";
interrupts = <0 126 4>; /* talert */
- ti,tshut-gpio = <86>;
+ gpios = <&gpio3 22 0>; /* tshut */
};
OMAP4470:
@@ -47,7 +48,7 @@ bandgap {
0x4a002378 0x18>;
compatible = "ti,omap4470-bandgap";
interrupts = <0 126 4>; /* talert */
- ti,tshut-gpio = <86>;
+ gpios = <&gpio3 22 0>; /* tshut */
};
OMAP5430:
--
1.8.2.1.342.gfa7285d
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCHv3 3/6] arm: dts: add bandgap entry for OMAP443x devices
[not found] <1370637968-23299-1-git-send-email-eduardo.valentin@ti.com>
2013-06-07 20:46 ` [PATCHv3 1/6] thermal: ti-soc-thermal: use standard GPIO DT bindings Eduardo Valentin
@ 2013-06-07 20:46 ` Eduardo Valentin
2013-06-18 20:14 ` Eduardo Valentin
2013-06-07 20:46 ` [PATCHv3 4/6] arm: dts: add bandgap entry for OMAP4460 devices Eduardo Valentin
2 siblings, 1 reply; 7+ messages in thread
From: Eduardo Valentin @ 2013-06-07 20:46 UTC (permalink / raw)
To: tony, grant.likely
Cc: linux-pm, linux-omap, linux, Eduardo Valentin,
Benoît Cousson, devicetree-discuss, linux-arm-kernel,
linux-kernel
This patch add the bandgap entry for OMAP4430 devices.
Cc: "Benoît Cousson" <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-omap@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
arch/arm/boot/dts/omap443x.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/omap443x.dtsi b/arch/arm/boot/dts/omap443x.dtsi
index cccf39a..8d6c968 100644
--- a/arch/arm/boot/dts/omap443x.dtsi
+++ b/arch/arm/boot/dts/omap443x.dtsi
@@ -24,4 +24,8 @@
clock-latency = <300000>; /* From legacy driver */
};
};
+ bandgap {
+ reg = <0x4a002260 0x4 0x4a00232C 0x4>;
+ compatible = "ti,omap4430-bandgap";
+ };
};
--
1.8.2.1.342.gfa7285d
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCHv3 4/6] arm: dts: add bandgap entry for OMAP4460 devices
[not found] <1370637968-23299-1-git-send-email-eduardo.valentin@ti.com>
2013-06-07 20:46 ` [PATCHv3 1/6] thermal: ti-soc-thermal: use standard GPIO DT bindings Eduardo Valentin
2013-06-07 20:46 ` [PATCHv3 3/6] arm: dts: add bandgap entry for OMAP443x devices Eduardo Valentin
@ 2013-06-07 20:46 ` Eduardo Valentin
2013-06-18 20:16 ` Eduardo Valentin
2 siblings, 1 reply; 7+ messages in thread
From: Eduardo Valentin @ 2013-06-07 20:46 UTC (permalink / raw)
To: tony, grant.likely
Cc: linux-pm, linux-omap, linux, Eduardo Valentin,
Benoît Cousson, devicetree-discuss, linux-arm-kernel,
linux-kernel
Include bandgap devices for OMAP4460 devices.
Cc: "Benoît Cousson" <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-omap@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/omap4460.dtsi b/arch/arm/boot/dts/omap4460.dtsi
index 2cf227c..ea97201 100644
--- a/arch/arm/boot/dts/omap4460.dtsi
+++ b/arch/arm/boot/dts/omap4460.dtsi
@@ -29,4 +29,13 @@
<0 55 0x4>;
ti,hwmods = "debugss";
};
+
+ bandgap {
+ reg = <0x4a002260 0x4
+ 0x4a00232C 0x4
+ 0x4a002378 0x18>;
+ compatible = "ti,omap4460-bandgap";
+ interrupts = <0 126 4>; /* talert */
+ gpios = <&gpio3 22 0>; /* tshut */
+ };
};
--
1.8.2.1.342.gfa7285d
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCHv3 3/6] arm: dts: add bandgap entry for OMAP443x devices
2013-06-07 20:46 ` [PATCHv3 3/6] arm: dts: add bandgap entry for OMAP443x devices Eduardo Valentin
@ 2013-06-18 20:14 ` Eduardo Valentin
0 siblings, 0 replies; 7+ messages in thread
From: Eduardo Valentin @ 2013-06-18 20:14 UTC (permalink / raw)
To: Eduardo Valentin, Benoît Cousson
Cc: linux, linux-pm, tony, devicetree-discuss@lists.ozlabs.org,
linux-kernel, grant.likely, linux-omap, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1117 bytes --]
Benoit,
On 07-06-2013 16:46, Eduardo Valentin wrote:
> This patch add the bandgap entry for OMAP4430 devices.
>
> Cc: "Benoît Cousson" <b-cousson@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: linux-omap@vger.kernel.org
> Cc: devicetree-discuss@lists.ozlabs.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Could you please have a look on this one?
> ---
> arch/arm/boot/dts/omap443x.dtsi | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/boot/dts/omap443x.dtsi b/arch/arm/boot/dts/omap443x.dtsi
> index cccf39a..8d6c968 100644
> --- a/arch/arm/boot/dts/omap443x.dtsi
> +++ b/arch/arm/boot/dts/omap443x.dtsi
> @@ -24,4 +24,8 @@
> clock-latency = <300000>; /* From legacy driver */
> };
> };
> + bandgap {
> + reg = <0x4a002260 0x4 0x4a00232C 0x4>;
> + compatible = "ti,omap4430-bandgap";
> + };
> };
>
--
You have got to be excited about what you are doing. (L. Lamport)
Eduardo Valentin
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 295 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3 4/6] arm: dts: add bandgap entry for OMAP4460 devices
2013-06-07 20:46 ` [PATCHv3 4/6] arm: dts: add bandgap entry for OMAP4460 devices Eduardo Valentin
@ 2013-06-18 20:16 ` Eduardo Valentin
2013-06-19 1:11 ` Benoit Cousson
0 siblings, 1 reply; 7+ messages in thread
From: Eduardo Valentin @ 2013-06-18 20:16 UTC (permalink / raw)
To: Eduardo Valentin, Benoît Cousson
Cc: linux, linux-pm, tony, devicetree-discuss, linux-kernel,
grant.likely, linux-omap, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1465 bytes --]
Benoit
On 07-06-2013 16:46, Eduardo Valentin wrote:
> Include bandgap devices for OMAP4460 devices.
>
> Cc: "Benoît Cousson" <b-cousson@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: linux-omap@vger.kernel.org
> Cc: devicetree-discuss@lists.ozlabs.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
Could you please have a look on patch 3 and 4 of this series? I have
changed this one accordingly to your recommendation on v2. If nothing
else, please let me know if they can still be queued for 3.11.
I would need to rebase patch 01 to refresh on top of the thermal tree.
Thanks.
> arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm/boot/dts/omap4460.dtsi b/arch/arm/boot/dts/omap4460.dtsi
> index 2cf227c..ea97201 100644
> --- a/arch/arm/boot/dts/omap4460.dtsi
> +++ b/arch/arm/boot/dts/omap4460.dtsi
> @@ -29,4 +29,13 @@
> <0 55 0x4>;
> ti,hwmods = "debugss";
> };
> +
> + bandgap {
> + reg = <0x4a002260 0x4
> + 0x4a00232C 0x4
> + 0x4a002378 0x18>;
> + compatible = "ti,omap4460-bandgap";
> + interrupts = <0 126 4>; /* talert */
> + gpios = <&gpio3 22 0>; /* tshut */
> + };
> };
>
--
You have got to be excited about what you are doing. (L. Lamport)
Eduardo Valentin
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 295 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3 4/6] arm: dts: add bandgap entry for OMAP4460 devices
2013-06-18 20:16 ` Eduardo Valentin
@ 2013-06-19 1:11 ` Benoit Cousson
0 siblings, 0 replies; 7+ messages in thread
From: Benoit Cousson @ 2013-06-19 1:11 UTC (permalink / raw)
To: Eduardo Valentin
Cc: linux, linux-pm, tony, devicetree-discuss, linux-kernel,
grant.likely, linux-omap, linux-arm-kernel
Hi Eduardo,
On 06/18/2013 03:16 PM, Eduardo Valentin wrote:
> Benoit
>
> On 07-06-2013 16:46, Eduardo Valentin wrote:
>> Include bandgap devices for OMAP4460 devices.
>>
>> Cc: "Benoît Cousson" <b-cousson@ti.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Cc: linux-omap@vger.kernel.org
>> Cc: devicetree-discuss@lists.ozlabs.org
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>> ---
>
> Could you please have a look on patch 3 and 4 of this series? I have
> changed this one accordingly to your recommendation on v2. If nothing
> else, please let me know if they can still be queued for 3.11.
I've just applied both of them in my tree for 3.11. I'll send the pull
request to Tony tomorrow.
Regards,
Benoit
>
> I would need to rebase patch 01 to refresh on top of the thermal tree.
>
> Thanks.
>
>> arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/omap4460.dtsi b/arch/arm/boot/dts/omap4460.dtsi
>> index 2cf227c..ea97201 100644
>> --- a/arch/arm/boot/dts/omap4460.dtsi
>> +++ b/arch/arm/boot/dts/omap4460.dtsi
>> @@ -29,4 +29,13 @@
>> <0 55 0x4>;
>> ti,hwmods = "debugss";
>> };
>> +
>> + bandgap {
>> + reg = <0x4a002260 0x4
>> + 0x4a00232C 0x4
>> + 0x4a002378 0x18>;
>> + compatible = "ti,omap4460-bandgap";
>> + interrupts = <0 126 4>; /* talert */
>> + gpios = <&gpio3 22 0>; /* tshut */
>> + };
>> };
>>
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCHv4 1/6] thermal: ti-soc-thermal: use standard GPIO DT bindings
2013-06-07 20:46 ` [PATCHv3 1/6] thermal: ti-soc-thermal: use standard GPIO DT bindings Eduardo Valentin
@ 2013-06-19 2:28 ` Eduardo Valentin
0 siblings, 0 replies; 7+ messages in thread
From: Eduardo Valentin @ 2013-06-19 2:28 UTC (permalink / raw)
To: rui.zhang
Cc: Eduardo Valentin, Grant Likely, Rob Herring, linux-pm,
linux-kernel, devicetree-discuss
This change updates the ti-soc-thermal driver to use
standard GPIO DT bindings to read the GPIO number associated
to thermal shutdown IRQ, in case the device features it.
Previously, the code was using a specific DT bindings.
As now OMAP supports the standard way to model GPIOs,
there is no point in having a ti specific binding.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt | 9 +++++----
drivers/thermal/ti-soc-thermal/ti-bandgap.c | 8 ++------
2 files changed, 7 insertions(+), 10 deletions(-)
---
Rui,
This is the rebased version of patch 01. It has been rebased on
your thermal/next. Please send it for 3.11. All remaining patches
on this series have been applied to respective for_3.11 branches
on corresponding trees.
diff --git a/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt b/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
index 1953b33..0c9222d 100644
--- a/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
@@ -17,8 +17,9 @@ Required properties:
- interrupts : this entry should indicate which interrupt line
the talert signal is routed to;
Specific:
-- ti,tshut-gpio : this entry should be used to inform which GPIO
-line the tshut signal is routed to;
+- gpios : this entry should be used to inform which GPIO
+line the tshut signal is routed to. The informed GPIO will
+be treated as an IRQ;
- regs : this entry must also be specified and it is specific
to each bandgap version, because the mapping may change from
soc to soc, apart of depending on available features.
@@ -37,7 +38,7 @@ bandgap {
0x4a002378 0x18>;
compatible = "ti,omap4460-bandgap";
interrupts = <0 126 4>; /* talert */
- ti,tshut-gpio = <86>;
+ gpios = <&gpio3 22 0>; /* tshut */
};
OMAP4470:
@@ -47,7 +48,7 @@ bandgap {
0x4a002378 0x18>;
compatible = "ti,omap4470-bandgap";
interrupts = <0 126 4>; /* talert */
- ti,tshut-gpio = <86>;
+ gpios = <&gpio3 22 0>; /* tshut */
};
OMAP5430:
diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index 7c0b3eb..9dfd471 100644
--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
@@ -38,6 +38,7 @@
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/of_irq.h>
+#include <linux/of_gpio.h>
#include <linux/io.h>
#include "ti-bandgap.h"
@@ -1129,7 +1130,6 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
const struct of_device_id *of_id;
struct ti_bandgap *bgp;
struct resource *res;
- u32 prop;
int i;
/* just for the sake */
@@ -1173,11 +1173,7 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
} while (res);
if (TI_BANDGAP_HAS(bgp, TSHUT)) {
- if (of_property_read_u32(node, "ti,tshut-gpio", &prop) < 0) {
- dev_err(&pdev->dev, "missing tshut gpio in device tree\n");
- return ERR_PTR(-EINVAL);
- }
- bgp->tshut_gpio = prop;
+ bgp->tshut_gpio = of_get_gpio(node, 0);
if (!gpio_is_valid(bgp->tshut_gpio)) {
dev_err(&pdev->dev, "invalid gpio for tshut (%d)\n",
bgp->tshut_gpio);
--
1.8.2.1.342.gfa7285d
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-06-19 2:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1370637968-23299-1-git-send-email-eduardo.valentin@ti.com>
2013-06-07 20:46 ` [PATCHv3 1/6] thermal: ti-soc-thermal: use standard GPIO DT bindings Eduardo Valentin
2013-06-19 2:28 ` [PATCHv4 " Eduardo Valentin
2013-06-07 20:46 ` [PATCHv3 3/6] arm: dts: add bandgap entry for OMAP443x devices Eduardo Valentin
2013-06-18 20:14 ` Eduardo Valentin
2013-06-07 20:46 ` [PATCHv3 4/6] arm: dts: add bandgap entry for OMAP4460 devices Eduardo Valentin
2013-06-18 20:16 ` Eduardo Valentin
2013-06-19 1:11 ` Benoit Cousson
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).