aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/ti-soc-thermal
diff options
context:
space:
mode:
authorEduardo Valentin <eduardo.valentin@ti.com>2013-06-07 11:11:53 -0400
committerEduardo Valentin <eduardo.valentin@ti.com>2013-07-08 10:11:59 -0400
commit57d1617137dd61825a3a7cebf61015f58afce510 (patch)
tree435ee366eca2964c02d51a755d75a588ef1a84a2 /drivers/thermal/ti-soc-thermal
parent65d467e84600754712fb36accd74b036cd775e5e (diff)
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. 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>
Diffstat (limited to 'drivers/thermal/ti-soc-thermal')
-rw-r--r--drivers/thermal/ti-soc-thermal/ti-bandgap.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index 7c0b3ebcf83a..9dfd47196e63 100644
--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
@@ -38,6 +38,7 @@
38#include <linux/of_device.h> 38#include <linux/of_device.h>
39#include <linux/of_platform.h> 39#include <linux/of_platform.h>
40#include <linux/of_irq.h> 40#include <linux/of_irq.h>
41#include <linux/of_gpio.h>
41#include <linux/io.h> 42#include <linux/io.h>
42 43
43#include "ti-bandgap.h" 44#include "ti-bandgap.h"
@@ -1129,7 +1130,6 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
1129 const struct of_device_id *of_id; 1130 const struct of_device_id *of_id;
1130 struct ti_bandgap *bgp; 1131 struct ti_bandgap *bgp;
1131 struct resource *res; 1132 struct resource *res;
1132 u32 prop;
1133 int i; 1133 int i;
1134 1134
1135 /* just for the sake */ 1135 /* just for the sake */
@@ -1173,11 +1173,7 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
1173 } while (res); 1173 } while (res);
1174 1174
1175 if (TI_BANDGAP_HAS(bgp, TSHUT)) { 1175 if (TI_BANDGAP_HAS(bgp, TSHUT)) {
1176 if (of_property_read_u32(node, "ti,tshut-gpio", &prop) < 0) { 1176 bgp->tshut_gpio = of_get_gpio(node, 0);
1177 dev_err(&pdev->dev, "missing tshut gpio in device tree\n");
1178 return ERR_PTR(-EINVAL);
1179 }
1180 bgp->tshut_gpio = prop;
1181 if (!gpio_is_valid(bgp->tshut_gpio)) { 1177 if (!gpio_is_valid(bgp->tshut_gpio)) {
1182 dev_err(&pdev->dev, "invalid gpio for tshut (%d)\n", 1178 dev_err(&pdev->dev, "invalid gpio for tshut (%d)\n",
1183 bgp->tshut_gpio); 1179 bgp->tshut_gpio);