From patchwork Fri Jul 20 17:35:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 1221991 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 528FB3FD48 for ; Fri, 20 Jul 2012 17:56:38 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SsHLa-0005yR-3b; Fri, 20 Jul 2012 17:50:38 +0000 Received: from londo.lunn.ch ([80.238.139.98]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SsH8k-0003wj-0U for linux-arm-kernel@lists.infradead.org; Fri, 20 Jul 2012 17:37:26 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1SsH7O-0004in-00; Fri, 20 Jul 2012 19:35:58 +0200 From: Andrew Lunn To: linux ARM Subject: [PATCH 9/16] ARM: Kirkwood: Describe DNS325 temperature sensor in DT. Date: Fri, 20 Jul 2012 19:35:44 +0200 Message-Id: <1342805751-18048-10-git-send-email-andrew@lunn.ch> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1342805751-18048-1-git-send-email-andrew@lunn.ch> References: <1342805751-18048-1-git-send-email-andrew@lunn.ch> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Andrew Lunn , Jamie Lentin 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 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. */