From ba95e453ab4bd5e18d2a22c613c63300d5384d7c Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 26 Jun 2013 16:22:21 +0900 Subject: [PATCH] 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 Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-r8a7790.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 49de2d56f86d..930fc940a110 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c @@ -105,6 +105,17 @@ static struct resource irqc0_resources[] = { &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); @@ -116,6 +127,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) -- 2.39.5