Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCHv3 1/6] thermal: ti-soc-thermal: use standard GPIO DT bindings

2 views
Skip to first unread message

Eduardo Valentin

unread,
Jun 7, 2013, 4:47:01 PM6/7/13
to to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, Eduardo Valentin, Zhang Rui, Rob Herring, linux-...@vger.kernel.org, devicetre...@lists.ozlabs.org
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....@intel.com>
Cc: Grant Likely <grant....@linaro.org>
Cc: Rob Herring <rob.h...@calxeda.com>
Cc: linu...@vger.kernel.org
Cc: linux-...@vger.kernel.org
Cc: devicetre...@lists.ozlabs.org
Signed-off-by: Eduardo Valentin <eduardo....@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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Eduardo Valentin

unread,
Jun 7, 2013, 4:47:58 PM6/7/13
to to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, Eduardo Valentin, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, Fabio Stevam
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 <li...@arm.linux.org.uk>
Cc: Tony Lindgren <to...@atomide.com>
Cc: linux-ar...@lists.infradead.org
Cc: linux...@vger.kernel.org
Cc: linux-...@vger.kernel.org
Cc: Fabio Stevam <fest...@gmail.com>
Signed-off-by: Eduardo Valentin <eduardo....@ti.com>
---
arch/arm/Kconfig | 3 +++
arch/arm/mach-omap2/Kconfig | 1 +
2 files changed, 4 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d423d58..bcbdec9 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index f49cd51..8620ab5 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -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

Eduardo Valentin

unread,
Jun 7, 2013, 4:48:22 PM6/7/13
to to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, Eduardo Valentin, Benoît Cousson, devicetre...@lists.ozlabs.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
This patch add the bandgap entry for OMAP4430 devices.

Cc: "Benoît Cousson" <b-co...@ti.com>
Cc: Tony Lindgren <to...@atomide.com>
Cc: Russell King <li...@arm.linux.org.uk>
Cc: linux...@vger.kernel.org
Cc: devicetre...@lists.ozlabs.org
Cc: linux-ar...@lists.infradead.org
Cc: linux-...@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo....@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";
+ };
};

Eduardo Valentin

unread,
Jun 7, 2013, 4:48:27 PM6/7/13
to to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, Eduardo Valentin, Benoît Cousson, devicetre...@lists.ozlabs.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Include bandgap devices for OMAP4460 devices.

Cc: "Benoît Cousson" <b-co...@ti.com>
Cc: Tony Lindgren <to...@atomide.com>
Cc: Russell King <li...@arm.linux.org.uk>
Cc: linux...@vger.kernel.org
Cc: devicetre...@lists.ozlabs.org
Cc: linux-ar...@lists.infradead.org
Cc: linux-...@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo....@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 */

Eduardo Valentin

unread,
Jun 7, 2013, 4:48:46 PM6/7/13
to to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, Eduardo Valentin, Javier Martinez Canillas, AnilKumar Ch, Santosh Shilimkar, Tomi Valkeinen, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Enable the bandgap driver for TI SoCs thermal support.

Cc: Russell King <li...@arm.linux.org.uk>
Cc: Tony Lindgren <to...@atomide.com>
Cc: Javier Martinez Canillas <javier....@collabora.co.uk>
Cc: AnilKumar Ch <anil...@ti.com>
Cc: Santosh Shilimkar <santosh....@ti.com>
Cc: Tomi Valkeinen <tomi.va...@ti.com>
arch/arm/configs/omap2plus_defconfig | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index c1ef64b..6e6c494 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -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

Eduardo Valentin

unread,
Jun 7, 2013, 4:48:51 PM6/7/13
to to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, Eduardo Valentin, Javier Martinez Canillas, AnilKumar Ch, Santosh Shilimkar, Tomi Valkeinen, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Make DRA752 thermal support enabled on omap2plus_defconfig

Cc: Russell King <li...@arm.linux.org.uk>
Cc: Tony Lindgren <to...@atomide.com>
Cc: Javier Martinez Canillas <javier....@collabora.co.uk>
Cc: AnilKumar Ch <anil...@ti.com>
Cc: Santosh Shilimkar <santosh....@ti.com>
Cc: Tomi Valkeinen <tomi.va...@ti.com>
Cc: linux-ar...@lists.infradead.org
Cc: linux-...@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo....@ti.com>
---
arch/arm/configs/omap2plus_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 6e6c494..07aab0b 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -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

Tony Lindgren

unread,
Jun 12, 2013, 1:07:42 PM6/12/13
to Eduardo Valentin, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, Fabio Stevam
* Eduardo Valentin <eduardo....@ti.com> [130607 13:53]:
> 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:

Acked-by: Tony Lindgren <to...@atomide.com>

Eduardo Valentin

unread,
Jun 18, 2013, 4:15:30 PM6/18/13
to Eduardo Valentin, Benoît Cousson, to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, devicetre...@lists.ozlabs.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Benoit,

On 07-06-2013 16:46, Eduardo Valentin wrote:
> This patch add the bandgap entry for OMAP4430 devices.
>
> Cc: "Benoît Cousson" <b-co...@ti.com>
> Cc: Tony Lindgren <to...@atomide.com>
> Cc: Russell King <li...@arm.linux.org.uk>
> Cc: linux...@vger.kernel.org
> Cc: devicetre...@lists.ozlabs.org
> Cc: linux-ar...@lists.infradead.org
> Cc: linux-...@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo....@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

signature.asc

Eduardo Valentin

unread,
Jun 18, 2013, 4:17:03 PM6/18/13
to Eduardo Valentin, Benoît Cousson, to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, devicetre...@lists.ozlabs.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Benoit

On 07-06-2013 16:46, Eduardo Valentin wrote:
> Include bandgap devices for OMAP4460 devices.
>
> Cc: "Benoît Cousson" <b-co...@ti.com>
> Cc: Tony Lindgren <to...@atomide.com>
> Cc: Russell King <li...@arm.linux.org.uk>
> Cc: linux...@vger.kernel.org
> Cc: devicetre...@lists.ozlabs.org
> Cc: linux-ar...@lists.infradead.org
> Cc: linux-...@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo....@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 */
> + };
> };
>


--
signature.asc

Eduardo Valentin

unread,
Jun 18, 2013, 4:24:39 PM6/18/13
to Tony Lindgren, Eduardo Valentin, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, Fabio Stevam
On 12-06-2013 13:07, Tony Lindgren wrote:
> * Eduardo Valentin <eduardo....@ti.com> [130607 13:53]:
>> 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:
>
> Acked-by: Tony Lindgren <to...@atomide.com>

Thanks!

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

Eduardo Valentin

unread,
Jun 18, 2013, 4:28:14 PM6/18/13
to Eduardo Valentin, to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, Javier Martinez Canillas, Santosh Shilimkar, Tomi Valkeinen, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Tony,

On 07-06-2013 16:46, Eduardo Valentin wrote:
> Enable the bandgap driver for TI SoCs thermal support.
>
> Cc: Russell King <li...@arm.linux.org.uk>
> Cc: Tony Lindgren <to...@atomide.com>
> Cc: Javier Martinez Canillas <javier....@collabora.co.uk>
> Cc: AnilKumar Ch <anil...@ti.com>
> Cc: Santosh Shilimkar <santosh....@ti.com>
> Cc: Tomi Valkeinen <tomi.va...@ti.com>
> Cc: linux-ar...@lists.infradead.org
> Cc: linux-...@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo....@ti.com>

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

Cheers,
signature.asc

Benoit Cousson

unread,
Jun 18, 2013, 9:17:47 PM6/18/13
to Eduardo Valentin, to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, devicetre...@lists.ozlabs.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
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-co...@ti.com>
>> Cc: Tony Lindgren <to...@atomide.com>
>> Cc: Russell King <li...@arm.linux.org.uk>
>> Cc: linux...@vger.kernel.org
>> Cc: devicetre...@lists.ozlabs.org
>> Cc: linux-ar...@lists.infradead.org
>> Cc: linux-...@vger.kernel.org
>> Signed-off-by: Eduardo Valentin <eduardo....@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 */
>> + };
>> };
>>
>
>

--

Eduardo Valentin

unread,
Jun 18, 2013, 10:29:24 PM6/18/13
to rui....@intel.com, Eduardo Valentin, Grant Likely, Rob Herring, linu...@vger.kernel.org, linux-...@vger.kernel.org, devicetre...@lists.ozlabs.org
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....@intel.com>
Cc: Grant Likely <grant....@linaro.org>
Cc: Rob Herring <rob.h...@calxeda.com>
Cc: linu...@vger.kernel.org
Cc: linux-...@vger.kernel.org
Cc: devicetre...@lists.ozlabs.org
Signed-off-by: Eduardo Valentin <eduardo....@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
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);

Eduardo Valentin

unread,
Jun 24, 2013, 5:40:21 PM6/24/13
to Eduardo Valentin, to...@atomide.com, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, Javier Martinez Canillas, Santosh Shilimkar, Tomi Valkeinen, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Tony,

On 18-06-2013 16:27, Eduardo Valentin wrote:
> Tony,
>
> On 07-06-2013 16:46, Eduardo Valentin wrote:
>> Enable the bandgap driver for TI SoCs thermal support.
>>
>> Cc: Russell King <li...@arm.linux.org.uk>
>> Cc: Tony Lindgren <to...@atomide.com>
>> Cc: Javier Martinez Canillas <javier....@collabora.co.uk>
>> Cc: AnilKumar Ch <anil...@ti.com>
>> Cc: Santosh Shilimkar <santosh....@ti.com>
>> Cc: Tomi Valkeinen <tomi.va...@ti.com>
>> Cc: linux-ar...@lists.infradead.org
>> Cc: linux-...@vger.kernel.org
>> Signed-off-by: Eduardo Valentin <eduardo....@ti.com>
>
> Is it possible for you to queue this one and patch 6 for 3.11?

Gentle reminder.
signature.asc

Tony Lindgren

unread,
Jul 4, 2013, 7:48:24 AM7/4/13
to Eduardo Valentin, grant....@linaro.org, linu...@vger.kernel.org, linux...@vger.kernel.org, li...@arm.linux.org.uk, Javier Martinez Canillas, Santosh Shilimkar, Tomi Valkeinen, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
* Eduardo Valentin <eduardo....@ti.com> [130618 13:33]:
> Tony,
>
> On 07-06-2013 16:46, Eduardo Valentin wrote:
> > Enable the bandgap driver for TI SoCs thermal support.
> >
> > Cc: Russell King <li...@arm.linux.org.uk>
> > Cc: Tony Lindgren <to...@atomide.com>
> > Cc: Javier Martinez Canillas <javier....@collabora.co.uk>
> > Cc: AnilKumar Ch <anil...@ti.com>
> > Cc: Santosh Shilimkar <santosh....@ti.com>
> > Cc: Tomi Valkeinen <tomi.va...@ti.com>
> > Cc: linux-ar...@lists.infradead.org
> > Cc: linux-...@vger.kernel.org
> > Signed-off-by: Eduardo Valentin <eduardo....@ti.com>
>
> 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
0 new messages