From patchwork Tue Apr 17 10:44:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 7898 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1A82023E00 for ; Tue, 17 Apr 2012 10:45:10 +0000 (UTC) Received: from mail-gy0-f180.google.com (mail-gy0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id D1991A181C2 for ; Tue, 17 Apr 2012 10:45:09 +0000 (UTC) Received: by mail-gy0-f180.google.com with SMTP id z12so3601288ghb.11 for ; Tue, 17 Apr 2012 03:45:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=24Dz587ChehDhWMlJedk1S74TcD+zm8W9tnfuekGYU8=; b=kLVFOqojzKLZqFS01mIrs8wZOznAloJngPtKNV56QO+R/pdY0MDApt6ocaSpT+OqDP 6Rzla1YUHpVfdmwR7GfKjnlnDr1ofWe/zK4sL7V7eIQbvdn5y80f1LxCeKZNuV46VnpX AR5jNS/rD1FwgLQpPaxWgSJbaIA+E4RJAhLCP9KtmGQh1srE8NTIm1B2NORWryAmo2sb HiYg8zlML8f5s+ZpWk03zwiyBzG+wYaTYE5Ir9KxbbO+75W4SG8F4Vxu/7idZnK/2l/J Mb0LWJA/24E1EZtQq86dIy7KK4EO50/NSOySyWJBMJ2UzTs7x2MQW2+lWah2CmlPF/cs TVjA== Received: by 10.50.135.36 with SMTP id pp4mr8889791igb.19.1334659509455; Tue, 17 Apr 2012 03:45:09 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp138717ibt; Tue, 17 Apr 2012 03:45:08 -0700 (PDT) Received: by 10.216.134.226 with SMTP id s76mr9119165wei.115.1334659508380; Tue, 17 Apr 2012 03:45:08 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id l12si11620543wiw.12.2012.04.17.03.45.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Apr 2012 03:45:08 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-we0-f178.google.com with SMTP id a13so5368067wer.37 for ; Tue, 17 Apr 2012 03:45:08 -0700 (PDT) Received: by 10.180.82.132 with SMTP id i4mr5939236wiy.12.1334659507914; Tue, 17 Apr 2012 03:45:07 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id fn2sm42069492wib.0.2012.04.17.03.45.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Apr 2012 03:45:07 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, grant.likely@secretlab.ca, cjb@laptop.org, linux@arm.linux.org.uk, Lee Jones Subject: [PATCH 11/16] ARM: ux500: Do not attempt to register non-existent i2c devices on Snowball Date: Tue, 17 Apr 2012 11:44:03 +0100 Message-Id: <1334659448-11521-12-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1334659448-11521-1-git-send-email-lee.jones@linaro.org> References: <1334659448-11521-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlwLham+wUCpP3OpPIxvE431JjQEWaPYfkPPAkhdrjMUZ0CjQFb2i6X9DnlX02n2OxHFXOS This patch prevents i2c devices which are not present on the Snowball low-cost development board from being registered. Devices such as; tc3589x, bu1780 and lp5521 are present on other supported boards, but are not located on Snowball. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500.c | 17 ++++++----------- 1 files changed, 6 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index a46345e..dcf49b6 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -652,7 +652,6 @@ static void __init mop500_init_machine(void) static void __init snowball_init_machine(void) { struct device *parent = NULL; - int i2c0_devs; int i; parent = u8500_init_devices(); @@ -670,11 +669,6 @@ static void __init snowball_init_machine(void) mop500_spi_init(parent); mop500_uart_init(parent); - i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); - i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); - i2c_register_board_info(2, mop500_i2c2_devices, - ARRAY_SIZE(mop500_i2c2_devices)); - /* This board has full regulator constraints */ regulator_has_full_constraints(); } @@ -787,7 +781,6 @@ static void __init u8500_init_machine(void) int i; parent = u8500_of_init_devices(); - i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) mop500_platform_devs[i]->dev.parent = parent; @@ -805,6 +798,12 @@ static void __init u8500_init_machine(void) ARRAY_SIZE(mop500_platform_devs)); mop500_sdi_init(parent); + + i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); + i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); + i2c_register_board_info(2, mop500_i2c2_devices, + ARRAY_SIZE(mop500_i2c2_devices)); + } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { snowball_pins_init(); @@ -834,10 +833,6 @@ static void __init u8500_init_machine(void) } mop500_i2c_init(parent); - i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); - i2c_register_board_info(2, mop500_i2c2_devices, - ARRAY_SIZE(mop500_i2c2_devices)); - /* This board has full regulator constraints */ regulator_has_full_constraints(); }