From bf8cf8e2b40ca7f6b3ef4f787a8d1b9f070cd86e Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 31 Jan 2013 09:05:26 +0000 Subject: [PATCH] --- yaml --- r: 359781 b: refs/heads/master c: 76cc1887496fe80138c6b07c37d7f81e4cf27cde h: refs/heads/master i: 359779: c30bdef1d1c881bb5221e4b97c7a8c4451e43251 v: v3 --- [refs] | 2 +- .../bindings/thermal/rcar-thermal.txt | 29 +++++++++++++++++++ trunk/drivers/thermal/rcar_thermal.c | 7 +++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 trunk/Documentation/devicetree/bindings/thermal/rcar-thermal.txt diff --git a/[refs] b/[refs] index 4d794c747701..1b2a40d31baf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e6e053f4e47634c07993cb31893556d24e18b65e +refs/heads/master: 76cc1887496fe80138c6b07c37d7f81e4cf27cde diff --git a/trunk/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/trunk/Documentation/devicetree/bindings/thermal/rcar-thermal.txt new file mode 100644 index 000000000000..28ef498a66e5 --- /dev/null +++ b/trunk/Documentation/devicetree/bindings/thermal/rcar-thermal.txt @@ -0,0 +1,29 @@ +* Renesas R-Car Thermal + +Required properties: +- compatible : "renesas,rcar-thermal" +- reg : Address range of the thermal registers. + The 1st reg will be recognized as common register + if it has "interrupts". + +Option properties: + +- interrupts : use interrupt + +Example (non interrupt support): + +thermal@e61f0100 { + compatible = "renesas,rcar-thermal"; + reg = <0xe61f0100 0x38>; +}; + +Example (interrupt support): + +thermal@e61f0000 { + compatible = "renesas,rcar-thermal"; + reg = <0xe61f0000 0x14 + 0xe61f0100 0x38 + 0xe61f0200 0x38 + 0xe61f0300 0x38>; + interrupts = <0 69 4>; +}; diff --git a/trunk/drivers/thermal/rcar_thermal.c b/trunk/drivers/thermal/rcar_thermal.c index 2eebcadb4c99..909bb4bb837f 100644 --- a/trunk/drivers/thermal/rcar_thermal.c +++ b/trunk/drivers/thermal/rcar_thermal.c @@ -476,9 +476,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,