All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajendra Nayak <rnayak@ti.com>
To: balbi@ti.com
Cc: linux-omap@vger.kernel.org, tony@atomide.com,
	linux-arm-kernel@lists.infradead.org
Subject: RE: [PATCH 1/2] omap3sdp: Fix regulator mapping for ads7846 TS controller
Date: Thu, 3 Feb 2011 17:34:40 +0530	[thread overview]
Message-ID: <1dd409cd6dfe29ecf4459c6defc2bd8a@mail.gmail.com> (raw)
In-Reply-To: <20110203115613.GK23561@legolas.emea.dhcp.ti.com>

> -----Original Message-----
> From: Felipe Balbi [mailto:balbi@ti.com]
> Sent: Thursday, February 03, 2011 5:26 PM
> To: Rajendra Nayak
> Cc: linux-omap@vger.kernel.org; tony@atomide.com;
linux-arm-kernel@lists.infradead.org
> Subject: Re: [PATCH 1/2] omap3sdp: Fix regulator mapping for ads7846 TS
controller
>
> Hi,
>
> On Thu, Feb 03, 2011 at 05:01:44PM +0530, Rajendra Nayak wrote:
> > diff --git a/arch/arm/mach-omap2/board-3430sdp.c
b/arch/arm/mach-omap2/board-3430sdp.c
> > index d4e41ef..dcdc718 100644
> > --- a/arch/arm/mach-omap2/board-3430sdp.c
> > +++ b/arch/arm/mach-omap2/board-3430sdp.c
> > @@ -427,6 +427,10 @@ static struct twl4030_madc_platform_data
sdp3430_madc_data = {
> >  	.irq_line	= 1,
> >  };
> >
> > +/* ads7846 on SPI */
> > +static struct regulator_consumer_supply sdp3430_vaux3_supply =
> > +	REGULATOR_SUPPLY("vcc", "spi1.0");
> > +
> >  /*
> >   * Apply all the fixed voltages since most versions of U-Boot
> >   * don't bother with that initialization.
> > @@ -469,6 +473,8 @@ static struct regulator_init_data sdp3430_vaux3 =
{
> >  		.valid_ops_mask		= REGULATOR_CHANGE_MODE
> >  					| REGULATOR_CHANGE_STATUS,
> >  	},
> > +	.num_consumer_supplies		= 1,
> > +	.consumer_supplies		= &sdp3430_vaux3_supply,
> >  };
>
> this is not the expected way of using the regulator framework, you
> should have:
>
> static struct regulator_consumer_supply sdp3430_vaux3_supplies[] =
> 	{ REGULATOR_SUPPLY("vcc", "spi1.0"), },
> };
>
> ...
>
> .num_consume_supplies	= ARRAY_SIZE(sdp3430_vaux3_supplies),
> .consumer_supplies	= sdp3430_vaux3_supplies,

Yup, makes sense. Will fix that and repost.

>
> or something similar. (completely untested though).
>
> --
> balbi

WARNING: multiple messages have this Message-ID (diff)
From: rnayak@ti.com (Rajendra Nayak)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] omap3sdp: Fix regulator mapping for ads7846 TS controller
Date: Thu, 3 Feb 2011 17:34:40 +0530	[thread overview]
Message-ID: <1dd409cd6dfe29ecf4459c6defc2bd8a@mail.gmail.com> (raw)
In-Reply-To: <20110203115613.GK23561@legolas.emea.dhcp.ti.com>

> -----Original Message-----
> From: Felipe Balbi [mailto:balbi at ti.com]
> Sent: Thursday, February 03, 2011 5:26 PM
> To: Rajendra Nayak
> Cc: linux-omap at vger.kernel.org; tony at atomide.com;
linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 1/2] omap3sdp: Fix regulator mapping for ads7846 TS
controller
>
> Hi,
>
> On Thu, Feb 03, 2011 at 05:01:44PM +0530, Rajendra Nayak wrote:
> > diff --git a/arch/arm/mach-omap2/board-3430sdp.c
b/arch/arm/mach-omap2/board-3430sdp.c
> > index d4e41ef..dcdc718 100644
> > --- a/arch/arm/mach-omap2/board-3430sdp.c
> > +++ b/arch/arm/mach-omap2/board-3430sdp.c
> > @@ -427,6 +427,10 @@ static struct twl4030_madc_platform_data
sdp3430_madc_data = {
> >  	.irq_line	= 1,
> >  };
> >
> > +/* ads7846 on SPI */
> > +static struct regulator_consumer_supply sdp3430_vaux3_supply =
> > +	REGULATOR_SUPPLY("vcc", "spi1.0");
> > +
> >  /*
> >   * Apply all the fixed voltages since most versions of U-Boot
> >   * don't bother with that initialization.
> > @@ -469,6 +473,8 @@ static struct regulator_init_data sdp3430_vaux3 =
{
> >  		.valid_ops_mask		= REGULATOR_CHANGE_MODE
> >  					| REGULATOR_CHANGE_STATUS,
> >  	},
> > +	.num_consumer_supplies		= 1,
> > +	.consumer_supplies		= &sdp3430_vaux3_supply,
> >  };
>
> this is not the expected way of using the regulator framework, you
> should have:
>
> static struct regulator_consumer_supply sdp3430_vaux3_supplies[] =
> 	{ REGULATOR_SUPPLY("vcc", "spi1.0"), },
> };
>
> ...
>
> .num_consume_supplies	= ARRAY_SIZE(sdp3430_vaux3_supplies),
> .consumer_supplies	= sdp3430_vaux3_supplies,

Yup, makes sense. Will fix that and repost.

>
> or something similar. (completely untested though).
>
> --
> balbi

  reply	other threads:[~2011-02-03 12:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 11:31 [PATCH 0/2] Fix/Clean regulator consumer mapping for 3430sdp Rajendra Nayak
2011-02-03 11:31 ` Rajendra Nayak
2011-02-03 11:31 ` [PATCH 1/2] omap3sdp: Fix regulator mapping for ads7846 TS controller Rajendra Nayak
2011-02-03 11:31   ` Rajendra Nayak
2011-02-03 11:31   ` [PATCH 2/2] omap3sdp: clean regulator supply mapping in board file Rajendra Nayak
2011-02-03 11:31     ` Rajendra Nayak
2011-02-03 12:03     ` Felipe Balbi
2011-02-03 12:03       ` Felipe Balbi
2011-02-03 11:56   ` [PATCH 1/2] omap3sdp: Fix regulator mapping for ads7846 TS controller Felipe Balbi
2011-02-03 11:56     ` Felipe Balbi
2011-02-03 12:04     ` Rajendra Nayak [this message]
2011-02-03 12:04       ` Rajendra Nayak

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=1dd409cd6dfe29ecf4459c6defc2bd8a@mail.gmail.com \
    --to=rnayak@ti.com \
    --cc=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    /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.