diff mbox

thermal: rcar: add Device Tree support

Message ID 87a9s3pdl1.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State Superseded, archived
Delegated to: Zhang Rui
Headers show

Commit Message

Kuninori Morimoto Jan. 21, 2013, 12:46 a.m. UTC
Support for loading the Renesas R-Car thermal module via devicetree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/thermal/rcar-thermal.txt   |   12 ++++++++++++
 drivers/thermal/rcar_thermal.c                     |    7 +++++++
 2 files changed, 19 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/thermal/rcar-thermal.txt

Comments

Kuninori Morimoto Jan. 21, 2013, 4:08 a.m. UTC | #1
Hi

> Support for loading the Renesas R-Car thermal module via devicetree.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---

I'm so sorry, but please ignore this patch.
Current R-Car thermal driver doesn't have interrupt support at this point.
I would like to add interrupt support first.
Then, I will re-send this patch with it.

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
new file mode 100644
index 0000000..7e0cbf6
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
@@ -0,0 +1,12 @@ 
+* Renesas R-Car Thermal
+
+Required properties:
+- compatible		: "renesas,rcar-thermal"
+- reg			: Address range of the thermal registers
+
+Example:
+
+thermal@e61f0100 {
+	compatible = "renesas,rcar-thermal";
+	reg = <0xe61f0100 0x38>;
+};
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 90db951..cb03aaf 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -235,9 +235,16 @@  static int rcar_thermal_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id rcar_thermal_dt_ids[] __devinitconst = {
+	{ .compatible = "renesas,rcar-thermal", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, rcar_thermal_dt_ids);
+
 static struct platform_driver rcar_thermal_driver = {
 	.driver	= {
 		.name	= "rcar_thermal",
+		.of_match_table = rcar_thermal_dt_ids,
 	},
 	.probe		= rcar_thermal_probe,
 	.remove		= rcar_thermal_remove,