Skip to contentSkip to conversation

arm: enable TI SoC thermal driver

PATCH Superseded Eduardo Valentin 3 participants 16 messages Jun 7, 2013 – Jul 4, 2013

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

v3 cover arm: enable TI SoC thermal driver

Hello,

Idea is to add the missing bits under arch/arm/*omap* required to enable by default the ti-soc-thermal driver. I am planing to move it out of staging tree. This has been scheduled to 3.11.

It would be interesting to get
feedback from other ppl. By enabling it by default we could reach more ppl for testing it across the supported chips.

The difference from v2 is that now the driver is changed to use GPIO bindings for Tshut as suggested by Benoit and I added a simple description what is bandgap.

The difference from v1 is just that patch 01 doe snot include the dts prefix, as it is not supposed to be DTS related.

Eduardo Valentin (6):
thermal: ti-soc-thermal: use standard GPIO DT bindings
arm: introduce config HAS_BANDGAP
arm: dts: add bandgap entry for OMAP443x devices
arm: dts: add bandgap entry for OMAP4460 devices
arm: omap2plus_defconfig: enable TI bandgap driver
arm: omap2plus_defconfig: enable DRA752 thermal support by default

 arch/arm/Kconfig                                  |  3 +++
 arch/arm/boot/dts/omap443x.dtsi                   |  4 ++++
 arch/arm/boot/dts/omap4460.dtsi                   |  9 +++++++++
 arch/arm/configs/omap2plus_defconfig              | 12 ++++++++++++
 arch/arm/mach-omap2/Kconfig                       |  1 +
 drivers/staging/ti-soc-thermal/ti-bandgap.c       |  8 ++------
 drivers/staging/ti-soc-thermal/ti_soc_thermal.txt |  9 +++++----
 7 files changed, 36 insertions(+), 10 deletions(-)
Signature · 1 line
1.8.2.1.342.gfa7285d
#1 lore raw

PATCH v3 1/6 thermal: ti-soc-thermal: use standard GPIO DT bindings

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.

---
 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(-)
drivers/staging/ti-soc-thermal/ti-bandgap.c +2 -6
index f20c1cf..c7fc0d0 100644
@@ -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);
drivers/staging/ti-soc-thermal/ti_soc_thermal.txt +5 -4
index a4a33d1..382bd98 100644
@@ -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:
Signature · 1 line
1.8.2.1.342.gfa7285d
#3 lore raw

PATCH v3 2/6 arm: introduce config HAS_BANDGAP

In reply to Eduardo Valentin

Bandgap is a device used to measure temperature on electronic equipments. It is widely used in digital integrated circuits. It is based on the dependency between silicon voltage and temperature.

This patch introduce HAS_BANDGAP config entry.
This config is a boolean value so that arch
code can flag if they feature a bandgap device.

This config entry follows the same idea behind
ARCH_HAS_CPUFREQ.

Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-omap at vger.kernel.org
Cc linux-kernel at vger.kernel.org
Cc Fabio Stevam <[email protected]>
---
 arch/arm/Kconfig            | 3 +++
 arch/arm/mach-omap2/Kconfig | 1 +
 2 files changed, 4 insertions(+)
arch/arm/Kconfig +3 -0
index d423d58..bcbdec9 100644
@@ -174,6 +174,9 @@ config ARCH_HAS_CPUFREQ
 	  and that the relevant menu configurations are displayed for
 	  it.
 
+config ARCH_HAS_BANDGAP
+	bool
+
 config GENERIC_HWEIGHT
 	bool
 	default y
arch/arm/mach-omap2/Kconfig +1 -0
index f49cd51..8620ab5 100644
@@ -4,6 +4,7 @@ config ARCH_OMAP
 config ARCH_OMAP2PLUS
 	bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
 	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_BANDGAP
 	select ARCH_HAS_HOLES_MEMORYMODEL
 	select ARCH_OMAP
 	select ARCH_REQUIRE_GPIOLIB
Signature · 1 line
1.8.2.1.342.gfa7285d
#6 lore raw

PATCH v3 3/6 arm: dts: add bandgap entry for OMAP443x devices

In reply to Eduardo Valentin

This patch add the bandgap entry for OMAP4430 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap443x.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/omap443x.dtsi +4 -0
index cccf39a..8d6c968 100644
@@ -24,4 +24,8 @@
 			clock-latency = <300000>; /* From legacy driver */
 		};
 	};
+	bandgap {
+		reg = <0x4a002260 0x4 0x4a00232C 0x4>;
+		compatible = "ti,omap4430-bandgap";
+	};
 };
Signature · 1 line
1.8.2.1.342.gfa7285d
#8 lore raw

PATCH v3 4/6 arm: dts: add bandgap entry for OMAP4460 devices

In reply to Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +9 -0
index 2cf227c..ea97201 100644
@@ -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 */
+	};
 };
Signature · 1 line
1.8.2.1.342.gfa7285d
#11 lore raw

PATCH v3 5/6 arm: omap2plus_defconfig: enable TI bandgap driver

In reply to Eduardo Valentin

Enable the bandgap driver for TI SoCs thermal support.

Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc AnilKumar Ch <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/configs/omap2plus_defconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/configs/omap2plus_defconfig +11 -0
index c1ef64b..6e6c494 100644
@@ -151,6 +151,13 @@ CONFIG_W1=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_SENSORS_LM75=m
 CONFIG_WATCHDOG=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_GOV_FAIR_SHARE=y
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_GOV_USER_SPACE=y
+CONFIG_CPU_THERMAL=y
 CONFIG_OMAP_WATCHDOG=y
 CONFIG_TWL4030_WATCHDOG=y
 CONFIG_MFD_TPS65217=y
@@ -237,6 +244,10 @@ CONFIG_RTC_DRV_TWL4030=y
 CONFIG_RTC_DRV_OMAP=y
 CONFIG_DMADEVICES=y
 CONFIG_DMA_OMAP=y
+CONFIG_TI_SOC_THERMAL=y
+CONFIG_TI_THERMAL=y
+CONFIG_OMAP4_THERMAL=y
+CONFIG_OMAP5_THERMAL=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
Signature · 1 line
1.8.2.1.342.gfa7285d
#15 lore raw

PATCH v3 6/6 arm: omap2plus_defconfig: enable DRA752 thermal support by default

In reply to Eduardo Valentin

Make DRA752 thermal support enabled on omap2plus_defconfig

Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc AnilKumar Ch <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/configs/omap2plus_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/omap2plus_defconfig +1 -0
index 6e6c494..07aab0b 100644
@@ -248,6 +248,7 @@ CONFIG_TI_SOC_THERMAL=y
 CONFIG_TI_THERMAL=y
 CONFIG_OMAP4_THERMAL=y
 CONFIG_OMAP5_THERMAL=y
+CONFIG_DRA752_THERMAL=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
Signature · 1 line
1.8.2.1.342.gfa7285d
maintainer Acked-by on v3 2/6
#4 lore raw

Re: [PATCHv3 2/6] arm: introduce config HAS_BANDGAP

In reply to Eduardo Valentin
Quoted 11 lines · Eduardo Valentin

Bandgap is a device used to measure temperature on electronic equipments. It is widely used in digital integrated circuits. It is based on the dependency between silicon voltage and temperature.

This patch introduce HAS_BANDGAP config entry.
This config is a boolean value so that arch
code can flag if they feature a bandgap device.

This config entry follows the same idea behind
ARCH_HAS_CPUFREQ.

I suggest you add this to Russell's patch system:

Quoted 41 lines
Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-omap at vger.kernel.org
Cc linux-kernel at vger.kernel.org
Cc Fabio Stevam <[email protected]>
---
 arch/arm/Kconfig            | 3 +++
 arch/arm/mach-omap2/Kconfig | 1 +
 2 files changed, 4 insertions(+)
arch/arm/Kconfig +3 -0
index d423d58..bcbdec9 100644
@@ -174,6 +174,9 @@ config ARCH_HAS_CPUFREQ
 	  and that the relevant menu configurations are displayed for
 	  it.
 
+config ARCH_HAS_BANDGAP
+	bool
+
 config GENERIC_HWEIGHT
 	bool
 	default y
arch/arm/mach-omap2/Kconfig +1 -0
index f49cd51..8620ab5 100644
@@ -4,6 +4,7 @@ config ARCH_OMAP
 config ARCH_OMAP2PLUS
 	bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
 	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_BANDGAP
 	select ARCH_HAS_HOLES_MEMORYMODEL
 	select ARCH_OMAP
 	select ARCH_REQUIRE_GPIOLIB
Signature · 1 line
1.8.2.1.342.gfa7285d
#7 lore raw

Re: [PATCHv3 3/6] arm: dts: add bandgap entry for OMAP443x devices

In reply to Eduardo Valentin

Benoit,

Quoted 10 lines · Eduardo Valentin

This patch add the bandgap entry for OMAP4430 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org

Could you please have a look on this one?

Quoted 18 lines
---
 arch/arm/boot/dts/omap443x.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/omap443x.dtsi +4 -0
index cccf39a..8d6c968 100644
@@ -24,4 +24,8 @@
 			clock-latency = <300000>; /* From legacy driver */
 		};
 	};
+	bandgap {
+		reg = <0x4a002260 0x4 0x4a00232C 0x4>;
+		compatible = "ti,omap4430-bandgap";
+	};
 };
Signature · 11 lines
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130618/f3e2a54f/attachment.sig>
#9 lore raw

Re: [PATCHv3 4/6] arm: dts: add bandgap entry for OMAP4460 devices

In reply to Eduardo Valentin

Benoit

Quoted 11 lines · Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org

---

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.

Quoted 22 lines
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +9 -0
index 2cf227c..ea97201 100644
@@ -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 */
+	};
 };
Signature · 11 lines
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130618/5eeb2557/attachment.sig>
#5 lore raw

Re: [PATCHv3 2/6] arm: introduce config HAS_BANDGAP

In reply to Tony Lindgren
Quoted 10 lines · Tony Lindgren
Quoted 9 lines · Eduardo Valentin

Bandgap is a device used to measure temperature on electronic equipments. It is widely used in digital integrated circuits. It is based on the dependency between silicon voltage and temperature.

This patch introduce HAS_BANDGAP config entry.
This config is a boolean value so that arch
code can flag if they feature a bandgap device.

Quoted 6 lines
Quoted 2 lines

This config entry follows the same idea behind
ARCH_HAS_CPUFREQ.

I suggest you add this to Russell's patch system:

Thanks!

I have add it to Russell's patch system and it has been accepted and applied.

Quoted 44 lines
Quoted 42 lines
Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-omap at vger.kernel.org
Cc linux-kernel at vger.kernel.org
Cc Fabio Stevam <[email protected]>
---
 arch/arm/Kconfig            | 3 +++
 arch/arm/mach-omap2/Kconfig | 1 +
 2 files changed, 4 insertions(+)
arch/arm/Kconfig +3 -0
index d423d58..bcbdec9 100644
@@ -174,6 +174,9 @@ config ARCH_HAS_CPUFREQ
 	  and that the relevant menu configurations are displayed for
 	  it.
 
+config ARCH_HAS_BANDGAP
+	bool
+
 config GENERIC_HWEIGHT
 	bool
 	default y
arch/arm/mach-omap2/Kconfig +1 -0
index f49cd51..8620ab5 100644
@@ -4,6 +4,7 @@ config ARCH_OMAP
 config ARCH_OMAP2PLUS
 	bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
 	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_BANDGAP
 	select ARCH_HAS_HOLES_MEMORYMODEL
 	select ARCH_OMAP
 	select ARCH_REQUIRE_GPIOLIB
Signature · 1 line
1.8.2.1.342.gfa7285d
Signature · 11 lines
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130618/c73595f0/attachment.sig>
#12 lore raw

Re: [PATCHv3 5/6] arm: omap2plus_defconfig: enable TI bandgap driver

In reply to Eduardo Valentin

Tony,

Quoted 11 lines · Eduardo Valentin

Enable the bandgap driver for TI SoCs thermal support.

Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc AnilKumar Ch <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org

Is it possible for you to queue this one and patch 6 for 3.11?

Cheers,

Quoted 34 lines
---
 arch/arm/configs/omap2plus_defconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/configs/omap2plus_defconfig +11 -0
index c1ef64b..6e6c494 100644
@@ -151,6 +151,13 @@ CONFIG_W1=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_SENSORS_LM75=m
 CONFIG_WATCHDOG=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_GOV_FAIR_SHARE=y
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_GOV_USER_SPACE=y
+CONFIG_CPU_THERMAL=y
 CONFIG_OMAP_WATCHDOG=y
 CONFIG_TWL4030_WATCHDOG=y
 CONFIG_MFD_TPS65217=y
@@ -237,6 +244,10 @@ CONFIG_RTC_DRV_TWL4030=y
 CONFIG_RTC_DRV_OMAP=y
 CONFIG_DMADEVICES=y
 CONFIG_DMA_OMAP=y
+CONFIG_TI_SOC_THERMAL=y
+CONFIG_TI_THERMAL=y
+CONFIG_OMAP4_THERMAL=y
+CONFIG_OMAP5_THERMAL=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
Signature · 11 lines
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130618/a1b1a113/attachment-0001.sig>
#10 lore raw

Re: [PATCHv3 4/6] arm: dts: add bandgap entry for OMAP4460 devices

In reply to Eduardo Valentin

Hi Eduardo,

Quoted 15 lines · Eduardo Valentin

Benoit

Quoted 11 lines · Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org

---

Quoted 3 lines

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

Quoted 29 lines

I would need to rebase patch 01 to refresh on top of the thermal tree.

Thanks.

Quoted 22 lines
  arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
  1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +9 -0
index 2cf227c..ea97201 100644
@@ -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 */
+	};
  };
#2 lore raw

PATCH v4 1/6 thermal: ti-soc-thermal: use standard GPIO DT bindings

In reply to Eduardo Valentin

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.

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

Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt +5 -4
index 1953b33..0c9222d 100644
@@ -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:
drivers/thermal/ti-soc-thermal/ti-bandgap.c +2 -6
index 7c0b3eb..9dfd471 100644
@@ -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);
Signature · 1 line
1.8.2.1.342.gfa7285d
#13 lore raw

Re: [PATCHv3 5/6] arm: omap2plus_defconfig: enable TI bandgap driver

In reply to Eduardo Valentin

Tony,

Quoted 15 lines · Eduardo Valentin

Tony,

Quoted 11 lines · Eduardo Valentin

Enable the bandgap driver for TI SoCs thermal support.

Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc AnilKumar Ch <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
Quoted 1 line

Is it possible for you to queue this one and patch 6 for 3.11?

Gentle reminder.

Quoted 39 lines

Cheers,

Quoted 34 lines
---
 arch/arm/configs/omap2plus_defconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/configs/omap2plus_defconfig +11 -0
index c1ef64b..6e6c494 100644
@@ -151,6 +151,13 @@ CONFIG_W1=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_SENSORS_LM75=m
 CONFIG_WATCHDOG=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_GOV_FAIR_SHARE=y
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_GOV_USER_SPACE=y
+CONFIG_CPU_THERMAL=y
 CONFIG_OMAP_WATCHDOG=y
 CONFIG_TWL4030_WATCHDOG=y
 CONFIG_MFD_TPS65217=y
@@ -237,6 +244,10 @@ CONFIG_RTC_DRV_TWL4030=y
 CONFIG_RTC_DRV_OMAP=y
 CONFIG_DMADEVICES=y
 CONFIG_DMA_OMAP=y
+CONFIG_TI_SOC_THERMAL=y
+CONFIG_TI_THERMAL=y
+CONFIG_OMAP4_THERMAL=y
+CONFIG_OMAP5_THERMAL=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
Signature · 11 lines
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130624/66cf164b/attachment.sig>
maintainer
#14 lore raw

Re: [PATCHv3 5/6] arm: omap2plus_defconfig: enable TI bandgap driver

In reply to Eduardo Valentin
Quoted 15 lines · Eduardo Valentin

Tony,

Quoted 11 lines · Eduardo Valentin

Enable the bandgap driver for TI SoCs thermal support.

Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc AnilKumar Ch <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
Quoted 1 line

Is it possible for you to queue this one and patch 6 for 3.11?

Yes thanks applying into omap-for-v3.11/fixes.

Tony