All of lore.kernel.org
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
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	[thread overview]
Message-ID: <1334659448-11521-12-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1334659448-11521-1-git-send-email-lee.jones@linaro.org>

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 <lee.jones@linaro.org>
---
 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();
 }
-- 
1.7.9.1

  parent reply	other threads:[~2012-04-17 10:44 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 10:43 [PATCH 0/16] Another round of Device Tree enablement for Snowball Lee Jones
2012-04-17 10:43 ` [PATCH 01/16] ARM: ux500: Enable the external bus with Device Tree Lee Jones
2012-04-18 15:54   ` Linus Walleij
2012-04-17 10:43 ` [PATCH 02/16] drivers/gpio: gpio-nomadik: Add support for irqdomains Lee Jones
2012-04-18 16:09   ` Linus Walleij
2012-04-18 16:22     ` Arnd Bergmann
2012-04-18 16:26       ` Linus Walleij
2012-04-19 16:23         ` Arnd Bergmann
2012-04-20  3:01           ` Rob Herring
2012-05-17 21:49             ` Grant Likely
2012-04-20  6:47           ` Linus Walleij
2012-04-17 10:43 ` [PATCH 03/16] ARM: ux500: Use correct format for dynamic IRQ assignment Lee Jones
2012-04-18 16:11   ` Linus Walleij
2012-04-17 10:43 ` [PATCH 04/16] drivers/net: Do not free an IRQ if its request failed Lee Jones
2012-04-18 16:12   ` Linus Walleij
2012-04-17 10:43 ` [PATCH 05/16] ARM: ux500: New DT:ed snowball_platform_devs for one-by-one device enablement Lee Jones
2012-04-17 10:43 ` [PATCH 06/16] ARM: ux500: New DT:ed u8500_init_devices " Lee Jones
2012-04-17 10:43 ` [PATCH 07/16] ARM: ux500: Enable the SMSC9115 on Snowball via Device Tree Lee Jones
2012-04-18 16:16   ` Linus Walleij
2012-04-17 10:44 ` [PATCH 08/16] drivers/mmc: MMCI: Use correct GPIO binding for IRQ requests Lee Jones
2012-04-18 16:18   ` Linus Walleij
2012-04-17 10:44 ` [PATCH 09/16] ARM: ux500: Correctly describe SMSC9115 for Snowball in DT Lee Jones
2012-04-17 10:44 ` [PATCH 10/16] drivers/gpio: represent gpio-nomadik as an IRQ controller in DT documentation Lee Jones
2012-04-17 14:38   ` Arnd Bergmann
2012-04-17 15:32     ` Lee Jones
2012-04-17 15:45     ` [PATCH 10/16 v2] " Lee Jones
2012-04-17 15:58     ` Lee Jones
2012-04-17 10:44 ` Lee Jones [this message]
2012-04-17 14:42   ` [PATCH 11/16] ARM: ux500: Do not attempt to register non-existent i2c devices on Snowball Arnd Bergmann
2012-04-17 15:28     ` Lee Jones
2012-04-17 15:44   ` [PATCH 11/16 v2] " Lee Jones
2012-04-17 16:02     ` Arnd Bergmann
2012-04-17 10:44 ` [PATCH 12/16] mfd/db8500-prcmu: Register as a platform driver instead of only probing Lee Jones
2012-04-18 16:19   ` Linus Walleij
2012-04-17 10:44 ` [PATCH 13/16] mfd/db8500-prcmu: Add Device Tree support Lee Jones
2012-04-18 16:35   ` Linus Walleij
2012-04-17 10:44 ` [PATCH 14/16] ARM: ux500: Fork cpu-db8500 platform_devs for sequential DT enablement Lee Jones
2012-04-17 10:44 ` [PATCH 15/16] ARM: ux500: Apply Device Tree settings for the DB8500 PRCMU Lee Jones
2012-04-17 14:47   ` Arnd Bergmann
2012-04-17 15:30     ` Lee Jones
2012-04-17 15:38       ` Arnd Bergmann
2012-04-17 15:46         ` Lee Jones
2012-04-17 15:56   ` [PATCH 13&15/16 v2] " Lee Jones
2012-04-18 16:21     ` Linus Walleij
2012-04-17 10:44 ` [PATCH 16/16] ARM: ux500: Enable PRCMU Timer 4 (clocksource) via Device Tree Lee Jones
2012-04-17 14:49 ` [PATCH 0/16] Another round of Device Tree enablement for Snowball Arnd Bergmann

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=1334659448-11521-12-git-send-email-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.