diff options
author | Simon Horman <horms+renesas@verge.net.au> | 2013-06-26 16:22:21 +0900 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-07-04 10:30:06 +0900 |
commit | 9c77a6dc13c43c55690156e09872e966b37e3dae (patch) | |
tree | 8083dd4a92c2e4092e5319fe4a56a59299d2899a /arch/arm/mach-shmobile | |
parent | ebe35b8884b49b2930e833067d22ca207748c428 (diff) |
ARM: shmobile: r8a7790: add thermal driver support
The current temperature may be read using:
cat /sys/class/thermal/thermal_zone0/temp
Based on similar work for the r8a73a4 by Kuninori Morimoto.
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7790.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 11f396448850..9a2a7ea55fc0 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c @@ -138,6 +138,17 @@ static struct resource irqc0_resources[] __initdata = { &irqc##idx##_data, \ sizeof(struct renesas_irqc_config)) +static struct resource thermal_resources[] __initdata = { + DEFINE_RES_MEM(0xe61f0000, 0x14), + DEFINE_RES_MEM(0xe61f0100, 0x38), + DEFINE_RES_IRQ(gic_spi(69)), +}; + +#define r8a7790_register_thermal() \ + platform_device_register_simple("rcar_thermal", -1, \ + thermal_resources, \ + ARRAY_SIZE(thermal_resources)) + void __init r8a7790_add_standard_devices(void) { r8a7790_register_scif(SCIFA0); @@ -149,6 +160,7 @@ void __init r8a7790_add_standard_devices(void) r8a7790_register_scif(SCIF0); r8a7790_register_scif(SCIF1); r8a7790_register_irqc(0); + r8a7790_register_thermal(); } void __init r8a7790_timer_init(void) |