summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Valentin <eduardo.valentin@ti.com>2013-06-07 11:11:53 -0400
committerMyungJoo Ham <myungjoo.ham@samsung.com>2013-11-15 13:52:45 +0900
commitb196ea2e63b310670ed7297eb54ff9f4a9512b45 (patch)
treea00f972e55a70ad7b6e57e18563bfdb39269a3e6
parent8ae14fc974e9cc80cf095cfc6e69a94e308487d9 (diff)
downloadlinux-3.10-b196ea2e63b310670ed7297eb54ff9f4a9512b45.tar.gz
linux-3.10-b196ea2e63b310670ed7297eb54ff9f4a9512b45.tar.bz2
linux-3.10-b196ea2e63b310670ed7297eb54ff9f4a9512b45.zip
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>
-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 7c0b3ebcf83..9dfd47196e6 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);