From patchwork Thu Jul 19 20:30:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamie Lentin X-Patchwork-Id: 1218431 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id AADE33FD48 for ; Thu, 19 Jul 2012 20:36:52 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SrxPL-00052p-UQ; Thu, 19 Jul 2012 20:33:12 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SrxNY-0004zJ-Jd for linux-arm-kernel@merlin.infradead.org; Thu, 19 Jul 2012 20:31:20 +0000 Received: from marmot.wormnet.eu ([2a03:9800:10:2d:3203:b3a5:8bdc:5b68]) by casper.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SrxNU-00013S-Sq for linux-arm-kernel@lists.infradead.org; Thu, 19 Jul 2012 20:31:19 +0000 Received: from mijo.vandergast.wormnet.eu ([80.229.158.163] helo=bunsen.vandergast.wormnet.eu) by marmot.wormnet.eu with esmtpa (Exim 4.80) (envelope-from ) id 1SrxMw-0004E0-Pg; Thu, 19 Jul 2012 21:30:43 +0100 From: Jamie Lentin To: Andrew Lunn , Jason Subject: [PATCH 1/4] ARM: Kirkwood: Describe DNS325 temperature sensor in DT. Date: Thu, 19 Jul 2012 21:30:57 +0100 Message-Id: <1342729860-14647-2-git-send-email-jm@lentin.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1342729860-14647-1-git-send-email-jm@lentin.co.uk> References: <1342729860-14647-1-git-send-email-jm@lentin.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20120719_213117_107284_2CB25513 X-CRM114-Status: GOOD ( 12.48 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: devicetree-discuss@lists.ozlabs.org, Jamie Lentin , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Andrew Lunn Now that we have I2C support in DT, describe the LM75 in the DT file for the DNS325. Signed-off-by: Andrew Lunn Signed-off-by: Jamie Lentin --- arch/arm/boot/dts/kirkwood-dns325.dts | 8 ++++++++ arch/arm/mach-kirkwood/board-dnskw.c | 15 ++------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts index 10bc819..e040d6c 100644 --- a/arch/arm/boot/dts/kirkwood-dns325.dts +++ b/arch/arm/boot/dts/kirkwood-dns325.dts @@ -16,6 +16,14 @@ }; ocp@f1000000 { + i2c@11000 { + status = "okay"; + + lm75: lm75@48 { + compatible = "national,lm75"; + reg = <0x48>; + }; + }; serial@12000 { clock-frequency = <200000000>; status = "okay"; diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c index 179f4b3..1c97efa 100644 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ b/arch/arm/mach-kirkwood/board-dnskw.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -153,13 +152,6 @@ static struct platform_device dns320_led_device = { }, }; -static struct i2c_board_info dns325_i2c_board_info[] __initdata = { - { - I2C_BOARD_INFO("lm75", 0x48), - }, - /* Something at 0x0c also */ -}; - static struct gpio_keys_button dnskw_button_pins[] = { { .code = KEY_POWER, @@ -241,17 +233,14 @@ void __init dnskw_init(void) kirkwood_ehci_init(); kirkwood_ge00_init(&dnskw_ge00_data); - kirkwood_i2c_init(); platform_device_register(&dnskw_button_device); platform_device_register(&dnskw_fan_device); - if (of_machine_is_compatible("dlink,dns-325")) { - i2c_register_board_info(0, dns325_i2c_board_info, - ARRAY_SIZE(dns325_i2c_board_info)); + if (of_machine_is_compatible("dlink,dns-325")) platform_device_register(&dns325_led_device); - } else if (of_machine_is_compatible("dlink,dns-320")) + else if (of_machine_is_compatible("dlink,dns-320")) platform_device_register(&dns320_led_device); /* Register power-off GPIO. */