From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] regulator: ab8500-ext: Don't register without initialisation data
Date: Fri, 24 May 2013 12:23:33 +0100 [thread overview]
Message-ID: <20130524112333.GW22683@gmail.com> (raw)
In-Reply-To: <1369226853-16978-3-git-send-email-lee.jones@linaro.org>
On Wed, 22 May 2013, Lee Jones wrote:
> This patch fixes a bug introduced in the v3.10 merge window.
>
> Some platforms will not want external registers. Rather than setting up
> lots of different clauses in the core ab8500 regulator driver not to
> call ab8500-ext init() we just won't pass the initialisation data from
> platform code. This patch checks for it and if it's missing, we won't
> register the external regulators.
>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> drivers/regulator/ab8500-ext.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c
> index b4d4547..8421537 100644
> --- a/drivers/regulator/ab8500-ext.c
> +++ b/drivers/regulator/ab8500-ext.c
> @@ -334,6 +334,12 @@ int ab8500_ext_regulator_init(struct platform_device *pdev)
> return -EINVAL;
> }
>
> + /* have any external regulators been specified? */
> + if (pdata->num_ext_regulator == 0) {
> + dev_warn(&pdev->dev, "Not using external regulators\n");
> + return 0;
> + }
> +
> /* make sure the platform data has the correct size */
> if (pdata->num_ext_regulator != ARRAY_SIZE(ab8500_ext_regulator_info)) {
> dev_err(&pdev->dev, "Configuration error: size mismatch.\n");
Okay drop this patch, I have a better solution.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, broonie@kernel.org,
linus.walleij@linaro.org
Cc: arnd@arndb.de, linus.walleij@stericsson.com,
srinidhi.kasagar@stericsson.com
Subject: Re: [PATCH] regulator: ab8500-ext: Don't register without initialisation data
Date: Fri, 24 May 2013 12:23:33 +0100 [thread overview]
Message-ID: <20130524112333.GW22683@gmail.com> (raw)
In-Reply-To: <1369226853-16978-3-git-send-email-lee.jones@linaro.org>
On Wed, 22 May 2013, Lee Jones wrote:
> This patch fixes a bug introduced in the v3.10 merge window.
>
> Some platforms will not want external registers. Rather than setting up
> lots of different clauses in the core ab8500 regulator driver not to
> call ab8500-ext init() we just won't pass the initialisation data from
> platform code. This patch checks for it and if it's missing, we won't
> register the external regulators.
>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> drivers/regulator/ab8500-ext.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c
> index b4d4547..8421537 100644
> --- a/drivers/regulator/ab8500-ext.c
> +++ b/drivers/regulator/ab8500-ext.c
> @@ -334,6 +334,12 @@ int ab8500_ext_regulator_init(struct platform_device *pdev)
> return -EINVAL;
> }
>
> + /* have any external regulators been specified? */
> + if (pdata->num_ext_regulator == 0) {
> + dev_warn(&pdev->dev, "Not using external regulators\n");
> + return 0;
> + }
> +
> /* make sure the platform data has the correct size */
> if (pdata->num_ext_regulator != ARRAY_SIZE(ab8500_ext_regulator_info)) {
> dev_err(&pdev->dev, "Configuration error: size mismatch.\n");
Okay drop this patch, I have a better solution.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2013-05-24 11:23 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-22 12:47 [RC FIXES] Fix broken MMC devices on Snowball Lee Jones
2013-05-22 12:47 ` Lee Jones
2013-05-22 12:47 ` [PATCH] ARM: ux500: Allow Snowball to pass its own regulator settings Lee Jones
2013-05-22 12:47 ` Lee Jones
2013-05-24 11:25 ` Lee Jones
2013-05-24 11:25 ` Lee Jones
2013-05-22 12:47 ` [PATCH] regulator: ab8500-ext: Don't register without initialisation data Lee Jones
2013-05-22 12:47 ` Lee Jones
2013-05-22 13:18 ` Linus Walleij
2013-05-22 13:18 ` Linus Walleij
2013-05-22 14:08 ` Arnd Bergmann
2013-05-22 14:08 ` Arnd Bergmann
2013-05-23 8:23 ` Linus Walleij
2013-05-23 8:23 ` Linus Walleij
2013-05-22 15:53 ` Mark Brown
2013-05-22 15:53 ` Mark Brown
2013-05-22 16:53 ` Lee Jones
2013-05-22 16:53 ` Lee Jones
2013-05-22 17:45 ` Mark Brown
2013-05-22 17:45 ` Mark Brown
2013-05-23 7:09 ` Lee Jones
2013-05-23 7:09 ` Lee Jones
2013-05-23 14:24 ` Mark Brown
2013-05-23 14:24 ` Mark Brown
2013-05-23 14:44 ` Lee Jones
2013-05-23 14:44 ` Lee Jones
2013-05-23 15:18 ` Mark Brown
2013-05-23 15:18 ` Mark Brown
2013-05-23 15:30 ` Lee Jones
2013-05-23 15:30 ` Lee Jones
2013-05-24 11:23 ` Lee Jones [this message]
2013-05-24 11:23 ` Lee Jones
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=20130524112333.GW22683@gmail.com \
--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.