Skip to content

Commit 8899b8d

Browse files
aakoskinWim Van Sebroeck
authored andcommitted
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>
1 parent 412b372 commit 8899b8d

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
};

arch/arm/boot/dts/twl4030.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
interrupts = <11>;
2020
};
2121

22+
watchdog {
23+
compatible = "ti,twl4030-wdt";
24+
};
25+
2226
vdac: regulator-vdac {
2327
compatible = "ti,twl4030-vdac";
2428
regulator-min-microvolt = <1800000>;

drivers/watchdog/twl4030_wdt.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,21 @@ static int twl4030_wdt_resume(struct platform_device *pdev)
131131
#define twl4030_wdt_resume NULL
132132
#endif
133133

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+
134140
static struct platform_driver twl4030_wdt_driver = {
135141
.probe = twl4030_wdt_probe,
136142
.remove = twl4030_wdt_remove,
137143
.suspend = twl4030_wdt_suspend,
138144
.resume = twl4030_wdt_resume,
139145
.driver = {
140-
.owner = THIS_MODULE,
141-
.name = "twl4030_wdt",
146+
.owner = THIS_MODULE,
147+
.name = "twl4030_wdt",
148+
.of_match_table = twl_wdt_of_match,
142149
},
143150
};
144151

0 commit comments

Comments
 (0)