mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Cc: Grant Likely <[email protected]> Cc: Rob Herring <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Eduardo Valentin <[email protected]>
This commit is contained in:
parent
65d467e846
commit
57d1617137
2 changed files with 7 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue