From patchwork Fri Aug 31 00:34:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 1390541 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 440BFDF264 for ; Fri, 31 Aug 2012 00:35:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753058Ab2HaAfF (ORCPT ); Thu, 30 Aug 2012 20:35:05 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:53829 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753287Ab2HaAfB (ORCPT ); Thu, 30 Aug 2012 20:35:01 -0400 Received: from ayumi.akashicho.tokyo.vergenet.net (p6117-ipbfp1901kobeminato.hyogo.ocn.ne.jp [114.172.117.117]) by kirsty.vergenet.net (Postfix) with ESMTP id 956C7267162; Fri, 31 Aug 2012 10:34:59 +1000 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 57239EDE62F; Fri, 31 Aug 2012 09:34:57 +0900 (JST) From: Simon Horman To: Arnd Bergmann , Olof Johansson Cc: linux-sh@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, Magnus Damm , Paul Mundt , Kuninori Morimoto , Phil Edworthy , Simon Horman Subject: [PATCH 10/10] ARM: shmobile: marzen: enable thermal sensor Date: Fri, 31 Aug 2012 09:34:45 +0900 Message-Id: <1346373285-19588-11-git-send-email-horms@verge.net.au> X-Mailer: git-send-email 1.7.10.2.484.gcd07cc5 In-Reply-To: <1346373285-19588-1-git-send-email-horms@verge.net.au> References: <1346373285-19588-1-git-send-email-horms@verge.net.au> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Kuninori Morimoto Marzen board can measure its thermal by this patch. cat /sys/class/thermal/thermal_zoneX/temp Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- 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 61d1c55..c30ea5e 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig @@ -73,6 +73,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 91e81e9..eb0a05a 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c @@ -113,9 +113,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, }; /* USB */