From: Simon Horman <horms@verge.net.au>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] ARM: shmobile: marzen: enable thermal sensor
Date: Wed, 05 Sep 2012 08:20:44 +0000 [thread overview]
Message-ID: <1346833244-30432-6-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1346833244-30432-1-git-send-email-horms@verge.net.au>
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
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 | 2 ++
arch/arm/mach-shmobile/board-marzen.c | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig
index cd2dc21..b46914f 100644
--- a/arch/arm/configs/marzen_defconfig
+++ b/arch/arm/configs/marzen_defconfig
@@ -71,6 +71,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_USB_SUPPORT is not set
CONFIG_MMC=y
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index cbf9f25..2e884b6 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -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 = {
ð_device,
&sdhi0_device,
+ &thermal_device,
};
static void __init marzen_init(void)
--
1.7.10.4
next prev parent reply other threads:[~2012-09-05 8:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-05 8:20 [GIT PULL v3] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
2012-09-05 8:20 ` [PATCH 1/5] r8a7779: add SDHI clock support Simon Horman
2012-09-05 8:20 ` [PATCH 2/5] marzen: add SDHI0 support Simon Horman
2012-09-05 8:20 ` [PATCH 3/5] ARM: mach-shmobile: marzen: defconfig update Simon Horman
2012-09-05 8:20 ` [PATCH 4/5] ARM: shmobile: marzen: fixup regulator id for smsc911x Simon Horman
2012-09-05 8:20 ` Simon Horman [this message]
2012-09-05 23:13 ` [GIT PULL v3] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Olof Johansson
2012-09-06 0:02 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1346833244-30432-6-git-send-email-horms@verge.net.au \
--to=horms@verge.net.au \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).