linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled
Date: Fri, 18 May 2012 13:36:54 +0100	[thread overview]
Message-ID: <4FB64266.6040301@linaro.org> (raw)
In-Reply-To: <201205181112.17254.arnd@arndb.de>

On 18/05/12 12:12, Arnd Bergmann wrote:
> On Friday 18 May 2012, Lee Jones wrote:
>>> Well, as far as I can tell, you duplicated a lot of functions or
>>> data structures so you can remove the parts one by one, but when you
>>> duplicated snowball_platform_devs[] you did not also duplicate
>>> mop500_platform_devs[].
>>
>> That's true, but why would I have done? I would think that whoever
>> writes the DT for that platform would do that?
>
> In order to not break them when you add the nodes to their device tree? ;-)
>
>> So I see four ways round this: 1) disable all the nodes in db8500.dtsi
>> and force snowball.dts and mop500.dts et. al to re-enable them as
>> appropriate. 2) duplicate mop500_platform_devs[] for DT booting and
>> strip out the ab8500 entry, essentially only leaving in only
>> mop500_gpio_keys_device, 3) DT gpio-keys for the mop500 and do away with
>> platform_add()ing mop500_platform_devs[] in u8500_init_machine()
>> altogether. Or my personal favorite 4) as there is no DT or compatible
>> entry for st-ericsson,mop500 or st-ericsson,hrefv60+ yet, don't worry
>> about it and let whoever enables DT for those platforms (me?) to deal
>> with at a later date.
>
> Well, you've got a point there that no device tree has been written
> yet for those boards. I think my preference would be 2), since you can
> do that in a way that actually removes code (see below), but it's also
> fine if you want to leave it as is for now.
>
> 	Arnd
>
> diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
> index 182dc4e..4ca56615 100644
> --- a/arch/arm/mach-ux500/board-mop500.c
> +++ b/arch/arm/mach-ux500/board-mop500.c
> @@ -806,8 +806,7 @@ static void __init u8500_init_machine(void)
>
>   	parent = u8500_init_devices();
>
> -	for (i = 0; i<  ARRAY_SIZE(mop500_platform_devs); i++)
> -		mop500_platform_devs[i]->dev.parent = parent;
> +	mop500_gpio_keys_device.parent = parent;
>   	for (i = 0; i<  ARRAY_SIZE(snowball_platform_devs); i++)
>   		snowball_platform_devs[i]->dev.parent = parent;
>
> @@ -816,9 +815,7 @@ static void __init u8500_init_machine(void)
>
>   	if (of_machine_is_compatible("st-ericsson,mop500")) {
>   		mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
> -
> -		platform_add_devices(mop500_platform_devs,
> -				ARRAY_SIZE(mop500_platform_devs));
> +		platform_device_register(&mop500_gpio_keys_device);
>
>   		mop500_sdi_init(parent);
>
> @@ -839,8 +836,7 @@ static void __init u8500_init_machine(void)
>   		 * instead.
>   		 */
>   		mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
> -		platform_add_devices(mop500_platform_devs,
> -				ARRAY_SIZE(mop500_platform_devs));
> +		platform_device_register(&mop500_gpio_keys_device);
>
>   		hrefv60_sdi_init(parent);

This is nice. Can I leave it for a now and submit this with the rest of 
my clean-ups? I have a nice TODO list now that this would fit nicely 
into. The way I see it, as long as this is submitted before we add a 
mop500.dts then it's not going to cause anyone issues.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2012-05-18 12:36 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
2012-05-17 13:45 ` [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver Lee Jones
2012-05-20 20:53   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 02/18] ARM: ux500: Remove unused i2c platform_data initialisation code Lee Jones
2012-05-17 13:45 ` [PATCH 03/18] ARM: ux500: Provide auxdata to be used as name base clock search for nmk-i2c Lee Jones
2012-05-17 13:45 ` [PATCH 04/18] ARM: ux500: CONFIG: Compile in support for leds-gpio Lee Jones
2012-05-17 13:45 ` [PATCH 05/18] ARM: ux500: Enable the user LED on Snowball via Device Tree Lee Jones
2012-05-17 13:45 ` [PATCH 06/18] mfd: ab8500: Remove confusing ab8500-i2c file and merge into ab8500-core Lee Jones
2012-05-20 20:58   ` Linus Walleij
2012-05-21  7:52     ` Lee Jones
2012-05-17 13:45 ` [PATCH 07/18] ARM: ux500: PRCMU related configuration and layout corrections for Device Tree Lee Jones
2012-05-17 13:45 ` [PATCH 08/18] mfd: Enable Device Tree for ab8500-core driver Lee Jones
2012-05-17 13:45 ` [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces Lee Jones
2012-05-18  7:36   ` Mark Brown
2012-05-18  7:53     ` Lee Jones
2012-05-20 21:15   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 10/18] ARM: ux500: Add support for ab8500 regulators into the Device Tree Lee Jones
2012-05-17 13:45 ` [PATCH 11/18] regulator: Enable the ab8500 for " Lee Jones
2012-05-18  7:36   ` Mark Brown
2012-05-18  7:52     ` Lee Jones
2012-05-20 21:14   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled Lee Jones
2012-05-17 21:22   ` Arnd Bergmann
2012-05-17 21:58     ` Lee Jones
2012-05-18 10:38       ` Arnd Bergmann
2012-05-18 11:00         ` Lee Jones
2012-05-18 11:12           ` Arnd Bergmann
2012-05-18 12:36             ` Lee Jones [this message]
2012-05-18 20:38               ` Arnd Bergmann
2012-05-17 13:45 ` [PATCH 13/18] ARM: ux500: Apply ab8500-debug node do the db8500 DT structure Lee Jones
2012-05-20 21:00   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 14/18] mfd: Enable ab8500-debug when Device Tree is enabled Lee Jones
2012-05-20 21:00   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 15/18] mfd: Prevent unassigned pointer from being used in ab8500-gpadc driver Lee Jones
2012-05-20 21:02   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 16/18] ARM: ux500: Add a ab8500-gpadc node to the db8500 Device Tree Lee Jones
2012-05-20 21:01   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 17/18] mfd: Enable ab8500-gpadc driver for " Lee Jones
2012-05-20 21:02   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 18/18] ARM: ux500: Add support for input/ponkey into the db8500's " Lee Jones
2012-05-20 21:03   ` Linus Walleij
2012-05-17 21:25 ` [PATCH 00/18] DT enablement for Snowball Arnd Bergmann
2012-05-17 21:41   ` Mark Brown
2012-05-17 21:49     ` Lee Jones
2012-05-19 15:25 ` Samuel Ortiz

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=4FB64266.6040301@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).