linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: OMAP3+: TWL: add support for mapping platform data via pdata-quirks
Date: Fri, 10 Oct 2014 10:00:17 -0700	[thread overview]
Message-ID: <20141010170017.GH10014@atomide.com> (raw)
In-Reply-To: <1412948442-19896-2-git-send-email-t-kristo@ti.com>

* Tero Kristo <t-kristo@ti.com> [141010 06:41]:
> Device tree based boot does not currently support DVFS voltage scaling,
> as the VC/VP mapping is broken. This patch adds support to provide
> platform data in the device tree boot case also, basically to pass the
> function pointers to the vc/vp core for voltage changes.
> 
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> ---
>  arch/arm/mach-omap2/pdata-quirks.c |    8 ++--
>  arch/arm/mach-omap2/twl-common.c   |   88 ++++++++++++++++++++++++++++++++----
>  arch/arm/mach-omap2/twl-common.h   |    2 +
>  3 files changed, 84 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
> index 90c88d4..03e4a86 100644
> --- a/arch/arm/mach-omap2/pdata-quirks.c
> +++ b/arch/arm/mach-omap2/pdata-quirks.c
> @@ -311,10 +311,10 @@ void omap_auxdata_legacy_init(struct device *dev)
>  	if (dev->platform_data)
>  		return;
>  
> -	if (strcmp("twl4030-gpio", dev_name(dev)))
> -		return;
> -
> -	dev->platform_data = &twl_gpio_auxdata;
> +	if (!strcmp("twl4030-gpio", dev_name(dev)))
> +		dev->platform_data = &twl_gpio_auxdata;
> +	else
> +		dev->platform_data = omap_twl_match_regulator(dev);
>  }

I think now you're passing also dev->platform_data for all the
other devices as this gets called for any devices added.

So you probale should use something like this instead:

	if (!strcmp("twl4030-gpio", dev_name(dev)))
		dev->platform_data = &twl_gpio_auxdata;

	if (!strcmp("twl4030-whatever-you-need", dev_name(dev)))
		dev->platform_data = &twl_gpio_auxdata;

Regards,

Tony

  reply	other threads:[~2014-10-10 17:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10 13:40 [PATCH 0/2] ARM: OMAP3+: VCVP mapping fixes to get DVFS working Tero Kristo
2014-10-10 13:40 ` [PATCH 1/2] ARM: OMAP3+: TWL: add support for mapping platform data via pdata-quirks Tero Kristo
2014-10-10 17:00   ` Tony Lindgren [this message]
2014-10-10 17:54     ` Tero Kristo
2014-10-10 13:40 ` [PATCH 2/2] regulator: twl: use platform data in the DT based boot also Tero Kristo
2014-10-10 13:43   ` Nishanth Menon
2014-10-10 13:43   ` Tero Kristo
2014-10-10 13:48     ` Mark Brown

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=20141010170017.GH10014@atomide.com \
    --to=tony@atomide.com \
    --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).