Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kuninori Morimoto and committed by
Zhang Rui
76cc1887 e6e053f4

+36
+29
Documentation/devicetree/bindings/thermal/rcar-thermal.txt
··· 1 + * Renesas R-Car Thermal 2 + 3 + Required 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 + 9 + Option properties: 10 + 11 + - interrupts : use interrupt 12 + 13 + Example (non interrupt support): 14 + 15 + thermal@e61f0100 { 16 + compatible = "renesas,rcar-thermal"; 17 + reg = <0xe61f0100 0x38>; 18 + }; 19 + 20 + Example (interrupt support): 21 + 22 + thermal@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 + };
+7
drivers/thermal/rcar_thermal.c
··· 476 476 return 0; 477 477 } 478 478 479 + static const struct of_device_id rcar_thermal_dt_ids[] __devinitconst = { 480 + { .compatible = "renesas,rcar-thermal", }, 481 + {}, 482 + }; 483 + MODULE_DEVICE_TABLE(of, rcar_thermal_dt_ids); 484 + 479 485 static struct platform_driver rcar_thermal_driver = { 480 486 .driver = { 481 487 .name = "rcar_thermal", 488 + .of_match_table = rcar_thermal_dt_ids, 482 489 }, 483 490 .probe = rcar_thermal_probe, 484 491 .remove = rcar_thermal_remove,