diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2012-12-23 15:03:37 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2013-01-02 06:07:05 -0500 |
commit | 8899b8d93ec64b7a8e54807a68a958e1206535e2 (patch) | |
tree | 22bc88d77fdf1fd2489c8be62f51bf95b9a6db8c | |
parent | 412b3729dd0234771c67452b8999191f1e8d8630 (diff) |
watchdog: twl4030_wdt: add DT support
Add DT support for twl4030_wdt. This is needed to get twl4030_wdt to
probe when booting with DT.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r-- | Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt | 10 | ||||
-rw-r--r-- | arch/arm/boot/dts/twl4030.dtsi | 4 | ||||
-rw-r--r-- | drivers/watchdog/twl4030_wdt.c | 11 |
3 files changed, 23 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt b/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt new file mode 100644 index 000000000000..80a37193c0b8 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | Device tree bindings for twl4030-wdt driver (TWL4030 watchdog) | ||
2 | |||
3 | Required properties: | ||
4 | compatible = "ti,twl4030-wdt"; | ||
5 | |||
6 | Example: | ||
7 | |||
8 | watchdog { | ||
9 | compatible = "ti,twl4030-wdt"; | ||
10 | }; | ||
diff --git a/arch/arm/boot/dts/twl4030.dtsi b/arch/arm/boot/dts/twl4030.dtsi index 63411b036932..ed0bc9546837 100644 --- a/arch/arm/boot/dts/twl4030.dtsi +++ b/arch/arm/boot/dts/twl4030.dtsi | |||
@@ -19,6 +19,10 @@ | |||
19 | interrupts = <11>; | 19 | interrupts = <11>; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | watchdog { | ||
23 | compatible = "ti,twl4030-wdt"; | ||
24 | }; | ||
25 | |||
22 | vdac: regulator-vdac { | 26 | vdac: regulator-vdac { |
23 | compatible = "ti,twl4030-vdac"; | 27 | compatible = "ti,twl4030-vdac"; |
24 | regulator-min-microvolt = <1800000>; | 28 | regulator-min-microvolt = <1800000>; |
diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c index 81918cf8993b..0f03106f7516 100644 --- a/drivers/watchdog/twl4030_wdt.c +++ b/drivers/watchdog/twl4030_wdt.c | |||
@@ -131,14 +131,21 @@ static int twl4030_wdt_resume(struct platform_device *pdev) | |||
131 | #define twl4030_wdt_resume NULL | 131 | #define twl4030_wdt_resume NULL |
132 | #endif | 132 | #endif |
133 | 133 | ||
134 | static const struct of_device_id twl_wdt_of_match[] = { | ||
135 | { .compatible = "ti,twl4030-wdt", }, | ||
136 | { }, | ||
137 | }; | ||
138 | MODULE_DEVICE_TABLE(of, twl_wdt_of_match); | ||
139 | |||
134 | static struct platform_driver twl4030_wdt_driver = { | 140 | static struct platform_driver twl4030_wdt_driver = { |
135 | .probe = twl4030_wdt_probe, | 141 | .probe = twl4030_wdt_probe, |
136 | .remove = twl4030_wdt_remove, | 142 | .remove = twl4030_wdt_remove, |
137 | .suspend = twl4030_wdt_suspend, | 143 | .suspend = twl4030_wdt_suspend, |
138 | .resume = twl4030_wdt_resume, | 144 | .resume = twl4030_wdt_resume, |
139 | .driver = { | 145 | .driver = { |
140 | .owner = THIS_MODULE, | 146 | .owner = THIS_MODULE, |
141 | .name = "twl4030_wdt", | 147 | .name = "twl4030_wdt", |
148 | .of_match_table = twl_wdt_of_match, | ||
142 | }, | 149 | }, |
143 | }; | 150 | }; |
144 | 151 | ||