aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-01-31 04:05:26 -0500
committerZhang Rui <rui.zhang@intel.com>2013-02-08 07:25:36 -0500
commit76cc1887496fe80138c6b07c37d7f81e4cf27cde (patch)
treeb759382748832e26f60fb85d122fa34eb5aec331
parente6e053f4e47634c07993cb31893556d24e18b65e (diff)
thermal: rcar: add Device Tree support
Support for loading the Renesas R-Car thermal module via devicetree. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r--Documentation/devicetree/bindings/thermal/rcar-thermal.txt29
-rw-r--r--drivers/thermal/rcar_thermal.c7
2 files changed, 36 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
new file mode 100644
index 000000000000..28ef498a66e5
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
@@ -0,0 +1,29 @@
1* Renesas R-Car Thermal
2
3Required properties:
4- compatible : "renesas,rcar-thermal"
5- reg : Address range of the thermal registers.
6 The 1st reg will be recognized as common register
7 if it has "interrupts".
8
9Option properties:
10
11- interrupts : use interrupt
12
13Example (non interrupt support):
14
15thermal@e61f0100 {
16 compatible = "renesas,rcar-thermal";
17 reg = <0xe61f0100 0x38>;
18};
19
20Example (interrupt support):
21
22thermal@e61f0000 {
23 compatible = "renesas,rcar-thermal";
24 reg = <0xe61f0000 0x14
25 0xe61f0100 0x38
26 0xe61f0200 0x38
27 0xe61f0300 0x38>;
28 interrupts = <0 69 4>;
29};
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 2eebcadb4c99..909bb4bb837f 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -476,9 +476,16 @@ static int rcar_thermal_remove(struct platform_device *pdev)
476 return 0; 476 return 0;
477} 477}
478 478
479static const struct of_device_id rcar_thermal_dt_ids[] __devinitconst = {
480 { .compatible = "renesas,rcar-thermal", },
481 {},
482};
483MODULE_DEVICE_TABLE(of, rcar_thermal_dt_ids);
484
479static struct platform_driver rcar_thermal_driver = { 485static struct platform_driver rcar_thermal_driver = {
480 .driver = { 486 .driver = {
481 .name = "rcar_thermal", 487 .name = "rcar_thermal",
488 .of_match_table = rcar_thermal_dt_ids,
482 }, 489 },
483 .probe = rcar_thermal_probe, 490 .probe = rcar_thermal_probe,
484 .remove = rcar_thermal_remove, 491 .remove = rcar_thermal_remove,