ARM: shmobile: marzen: enable thermal sensor
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 28 Aug 2012 02:00:15 +0000 (19:00 -0700)
committerSimon Horman <horms@verge.net.au>
Thu, 6 Sep 2012 01:24:17 +0000 (10:24 +0900)
Marzen board can measure its thermal by this patch.
cat /sys/class/thermal/thermal_zoneX/temp

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
arch/arm/configs/marzen_defconfig
arch/arm/mach-shmobile/board-marzen.c

index 864f9a5c39dd218c00ed6757702f522e1e8504ee..f513acedc10a57ee67099773019e2c4c54ab252e 100644 (file)
@@ -68,6 +68,8 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y
 # CONFIG_HW_RANDOM is not set
 CONFIG_GPIO_SYSFS=y
 # CONFIG_HWMON is not set
+CONFIG_THERMAL=y
+CONFIG_RCAR_THERMAL=y
 CONFIG_SSB=y
 # CONFIG_HID_SUPPORT is not set
 # CONFIG_USB_SUPPORT is not set
index cbf9f25ed972748966fe3af7bef70077f59b8e8a..2e884b66ec14cd4b7a97958f456bd2fad06be77e 100644 (file)
@@ -111,9 +111,25 @@ static struct platform_device sdhi0_device = {
        }
 };
 
+/* Thermal */
+static struct resource thermal_resources[] = {
+       [0] = {
+               .start          = 0xFFC48000,
+               .end            = 0xFFC48038 - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device thermal_device = {
+       .name           = "rcar_thermal",
+       .resource       = thermal_resources,
+       .num_resources  = ARRAY_SIZE(thermal_resources),
+};
+
 static struct platform_device *marzen_devices[] __initdata = {
        &eth_device,
        &sdhi0_device,
+       &thermal_device,
 };
 
 static void __init marzen_init(void)