All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmci: drop superfluous regulator #ifdef
@ 2010-12-02 13:36 ` Linus Walleij
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2010-12-02 13:36 UTC (permalink / raw)
  To: linux-mmc, linux-arm-kernel; +Cc: Linus Walleij

The regulator and MMC frameworks provide the proper stub functions
for the regulator functions anyway, get rid of this.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
---
 drivers/mmc/host/mmci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 3709ab3..7567872 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -844,7 +844,6 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
 		mmc->f_max = min(host->mclk, fmax);
 	dev_dbg(mmc_dev(mmc), "clocking block at %u Hz\n", mmc->f_max);
 
-#ifdef CONFIG_REGULATOR
 	/* If we're using the regulator framework, try to fetch a regulator */
 	host->vcc = regulator_get(&dev->dev, "vmmc");
 	if (IS_ERR(host->vcc))
@@ -863,7 +862,7 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
 				 "(using regulator instead)\n");
 		}
 	}
-#endif
+
 	/* Fall back to platform data if no regulator is found */
 	if (host->vcc == NULL)
 		mmc->ocr_avail = plat->ocr_mask;
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] mmci: drop superfluous regulator #ifdef
@ 2010-12-02 13:36 ` Linus Walleij
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2010-12-02 13:36 UTC (permalink / raw)
  To: linux-arm-kernel

The regulator and MMC frameworks provide the proper stub functions
for the regulator functions anyway, get rid of this.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
---
 drivers/mmc/host/mmci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 3709ab3..7567872 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -844,7 +844,6 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
 		mmc->f_max = min(host->mclk, fmax);
 	dev_dbg(mmc_dev(mmc), "clocking block at %u Hz\n", mmc->f_max);
 
-#ifdef CONFIG_REGULATOR
 	/* If we're using the regulator framework, try to fetch a regulator */
 	host->vcc = regulator_get(&dev->dev, "vmmc");
 	if (IS_ERR(host->vcc))
@@ -863,7 +862,7 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
 				 "(using regulator instead)\n");
 		}
 	}
-#endif
+
 	/* Fall back to platform data if no regulator is found */
 	if (host->vcc == NULL)
 		mmc->ocr_avail = plat->ocr_mask;
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] mmci: drop superfluous regulator #ifdef
  2010-12-02 13:36 ` Linus Walleij
@ 2010-12-02 14:02   ` Mark Brown
  -1 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2010-12-02 14:02 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-mmc, linux-arm-kernel

On Thu, Dec 02, 2010 at 02:36:58PM +0100, Linus Walleij wrote:
> The regulator and MMC frameworks provide the proper stub functions
> for the regulator functions anyway, get rid of this.

It's more that the regulator API stubs have been changed to match what
MMC is doing (there always were stubs) but that doesn't make any
material difference.

> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] mmci: drop superfluous regulator #ifdef
@ 2010-12-02 14:02   ` Mark Brown
  0 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2010-12-02 14:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Dec 02, 2010 at 02:36:58PM +0100, Linus Walleij wrote:
> The regulator and MMC frameworks provide the proper stub functions
> for the regulator functions anyway, get rid of this.

It's more that the regulator API stubs have been changed to match what
MMC is doing (there always were stubs) but that doesn't make any
material difference.

> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mmci: drop superfluous regulator #ifdef
  2010-12-02 13:36 ` Linus Walleij
@ 2010-12-10  3:39   ` Chris Ball
  -1 siblings, 0 replies; 14+ messages in thread
From: Chris Ball @ 2010-12-10  3:39 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-mmc, linux-arm-kernel

Hi Linus,

On Thu, Dec 02, 2010 at 02:36:58PM +0100, Linus Walleij wrote:
> The regulator and MMC frameworks provide the proper stub functions
> for the regulator functions anyway, get rid of this.
> 
> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
> ---
>  drivers/mmc/host/mmci.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> index 3709ab3..7567872 100644
> --- a/drivers/mmc/host/mmci.c
> +++ b/drivers/mmc/host/mmci.c
> @@ -844,7 +844,6 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
>  		mmc->f_max = min(host->mclk, fmax);
>  	dev_dbg(mmc_dev(mmc), "clocking block at %u Hz\n", mmc->f_max);
>  
> -#ifdef CONFIG_REGULATOR
>  	/* If we're using the regulator framework, try to fetch a regulator */
>  	host->vcc = regulator_get(&dev->dev, "vmmc");
>  	if (IS_ERR(host->vcc))
> @@ -863,7 +862,7 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
>  				 "(using regulator instead)\n");
>  		}
>  	}
> -#endif
> +
>  	/* Fall back to platform data if no regulator is found */
>  	if (host->vcc == NULL)
>  		mmc->ocr_avail = plat->ocr_mask;

Thanks, pushed to mmc-next for .38.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] mmci: drop superfluous regulator #ifdef
@ 2010-12-10  3:39   ` Chris Ball
  0 siblings, 0 replies; 14+ messages in thread
From: Chris Ball @ 2010-12-10  3:39 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Linus,

On Thu, Dec 02, 2010 at 02:36:58PM +0100, Linus Walleij wrote:
> The regulator and MMC frameworks provide the proper stub functions
> for the regulator functions anyway, get rid of this.
> 
> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
> ---
>  drivers/mmc/host/mmci.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> index 3709ab3..7567872 100644
> --- a/drivers/mmc/host/mmci.c
> +++ b/drivers/mmc/host/mmci.c
> @@ -844,7 +844,6 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
>  		mmc->f_max = min(host->mclk, fmax);
>  	dev_dbg(mmc_dev(mmc), "clocking block at %u Hz\n", mmc->f_max);
>  
> -#ifdef CONFIG_REGULATOR
>  	/* If we're using the regulator framework, try to fetch a regulator */
>  	host->vcc = regulator_get(&dev->dev, "vmmc");
>  	if (IS_ERR(host->vcc))
> @@ -863,7 +862,7 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
>  				 "(using regulator instead)\n");
>  		}
>  	}
> -#endif
> +
>  	/* Fall back to platform data if no regulator is found */
>  	if (host->vcc == NULL)
>  		mmc->ocr_avail = plat->ocr_mask;

Thanks, pushed to mmc-next for .38.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mmci: drop superfluous regulator #ifdef
  2010-12-10  3:39   ` Chris Ball
@ 2010-12-10  8:12     ` Russell King - ARM Linux
  -1 siblings, 0 replies; 14+ messages in thread
From: Russell King - ARM Linux @ 2010-12-10  8:12 UTC (permalink / raw)
  To: Chris Ball; +Cc: Linus Walleij, linux-mmc, linux-arm-kernel

On Fri, Dec 10, 2010 at 03:39:08AM +0000, Chris Ball wrote:
> Hi Linus,
> 
> On Thu, Dec 02, 2010 at 02:36:58PM +0100, Linus Walleij wrote:
> > The regulator and MMC frameworks provide the proper stub functions
> > for the regulator functions anyway, get rid of this.
> > 
> > Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
> > ---
> >  drivers/mmc/host/mmci.c |    3 +--
> >  1 files changed, 1 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> > index 3709ab3..7567872 100644
> > --- a/drivers/mmc/host/mmci.c
> > +++ b/drivers/mmc/host/mmci.c
> > @@ -844,7 +844,6 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
> >  		mmc->f_max = min(host->mclk, fmax);
> >  	dev_dbg(mmc_dev(mmc), "clocking block at %u Hz\n", mmc->f_max);
> >  
> > -#ifdef CONFIG_REGULATOR
> >  	/* If we're using the regulator framework, try to fetch a regulator */
> >  	host->vcc = regulator_get(&dev->dev, "vmmc");
> >  	if (IS_ERR(host->vcc))
> > @@ -863,7 +862,7 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
> >  				 "(using regulator instead)\n");
> >  		}
> >  	}
> > -#endif
> > +
> >  	/* Fall back to platform data if no regulator is found */
> >  	if (host->vcc == NULL)
> >  		mmc->ocr_avail = plat->ocr_mask;
> 
> Thanks, pushed to mmc-next for .38.

Also queued in the ARM tree.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] mmci: drop superfluous regulator #ifdef
@ 2010-12-10  8:12     ` Russell King - ARM Linux
  0 siblings, 0 replies; 14+ messages in thread
From: Russell King - ARM Linux @ 2010-12-10  8:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 10, 2010 at 03:39:08AM +0000, Chris Ball wrote:
> Hi Linus,
> 
> On Thu, Dec 02, 2010 at 02:36:58PM +0100, Linus Walleij wrote:
> > The regulator and MMC frameworks provide the proper stub functions
> > for the regulator functions anyway, get rid of this.
> > 
> > Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
> > ---
> >  drivers/mmc/host/mmci.c |    3 +--
> >  1 files changed, 1 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> > index 3709ab3..7567872 100644
> > --- a/drivers/mmc/host/mmci.c
> > +++ b/drivers/mmc/host/mmci.c
> > @@ -844,7 +844,6 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
> >  		mmc->f_max = min(host->mclk, fmax);
> >  	dev_dbg(mmc_dev(mmc), "clocking block at %u Hz\n", mmc->f_max);
> >  
> > -#ifdef CONFIG_REGULATOR
> >  	/* If we're using the regulator framework, try to fetch a regulator */
> >  	host->vcc = regulator_get(&dev->dev, "vmmc");
> >  	if (IS_ERR(host->vcc))
> > @@ -863,7 +862,7 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
> >  				 "(using regulator instead)\n");
> >  		}
> >  	}
> > -#endif
> > +
> >  	/* Fall back to platform data if no regulator is found */
> >  	if (host->vcc == NULL)
> >  		mmc->ocr_avail = plat->ocr_mask;
> 
> Thanks, pushed to mmc-next for .38.

Also queued in the ARM tree.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH] mmci: drop superfluous regulator #ifdef
  2010-12-10  8:12     ` Russell King - ARM Linux
@ 2010-12-10  9:30       ` Linus WALLEIJ
  -1 siblings, 0 replies; 14+ messages in thread
From: Linus WALLEIJ @ 2010-12-10  9:30 UTC (permalink / raw)
  To: Russell King - ARM Linux, Chris Ball; +Cc: linux-mmc, linux-arm-kernel

[Russell]
> [Chris]
>
> > Thanks, pushed to mmc-next for .38.
> 
> Also queued in the ARM tree.

Chris, Russell is listed as maintainer for this driver so
he probably prefers to take in changes to it through the ARM
tree, can you take this patch out of the mmc tree?

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] mmci: drop superfluous regulator #ifdef
@ 2010-12-10  9:30       ` Linus WALLEIJ
  0 siblings, 0 replies; 14+ messages in thread
From: Linus WALLEIJ @ 2010-12-10  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

[Russell]
> [Chris]
>
> > Thanks, pushed to mmc-next for .38.
> 
> Also queued in the ARM tree.

Chris, Russell is listed as maintainer for this driver so
he probably prefers to take in changes to it through the ARM
tree, can you take this patch out of the mmc tree?

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mmci: drop superfluous regulator #ifdef
  2010-12-10  9:30       ` Linus WALLEIJ
@ 2010-12-10 16:07         ` Chris Ball
  -1 siblings, 0 replies; 14+ messages in thread
From: Chris Ball @ 2010-12-10 16:07 UTC (permalink / raw)
  To: Linus WALLEIJ; +Cc: Russell King - ARM Linux, linux-mmc, linux-arm-kernel

Hi,

On Fri, Dec 10, 2010 at 10:30:05AM +0100, Linus WALLEIJ wrote:
> > > Thanks, pushed to mmc-next for .38.
> > 
> > Also queued in the ARM tree.
> 
> Chris, Russell is listed as maintainer for this driver so
> he probably prefers to take in changes to it through the ARM
> tree, can you take this patch out of the mmc tree?

Oops, my apologies, didn't think of that.  Removed from mmc-next, thanks.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] mmci: drop superfluous regulator #ifdef
@ 2010-12-10 16:07         ` Chris Ball
  0 siblings, 0 replies; 14+ messages in thread
From: Chris Ball @ 2010-12-10 16:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Fri, Dec 10, 2010 at 10:30:05AM +0100, Linus WALLEIJ wrote:
> > > Thanks, pushed to mmc-next for .38.
> > 
> > Also queued in the ARM tree.
> 
> Chris, Russell is listed as maintainer for this driver so
> he probably prefers to take in changes to it through the ARM
> tree, can you take this patch out of the mmc tree?

Oops, my apologies, didn't think of that.  Removed from mmc-next, thanks.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mmci: drop superfluous regulator #ifdef
  2010-12-02 13:36 ` Linus Walleij
@ 2010-12-19 16:00   ` Russell King - ARM Linux
  -1 siblings, 0 replies; 14+ messages in thread
From: Russell King - ARM Linux @ 2010-12-19 16:00 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-mmc, linux-arm-kernel

On Thu, Dec 02, 2010 at 02:36:58PM +0100, Linus Walleij wrote:
> The regulator and MMC frameworks provide the proper stub functions
> for the regulator functions anyway, get rid of this.

I'm dropping this patch - it's wrong, because on platforms without
regulator support, it stamps over the provided platform values:

mmci-pl18x mb:mmci: Provided ocr_mask/setpower will not be used (using regulator instead)

# CONFIG_REGULATOR is not set

So the ifdefs have to stay until some other solution for this is found.
Maybe the:

        if (IS_ERR(host->vcc))
                host->vcc = NULL;
        else {

should be:

        if (IS_ERR(host->vcc) || host->vcc == NULL)
                host->vcc = NULL;
        else {

or maybe:

        if (IS_ERR(host->vcc))
                host->vcc = NULL;
        else if (host->vcc) {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] mmci: drop superfluous regulator #ifdef
@ 2010-12-19 16:00   ` Russell King - ARM Linux
  0 siblings, 0 replies; 14+ messages in thread
From: Russell King - ARM Linux @ 2010-12-19 16:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Dec 02, 2010 at 02:36:58PM +0100, Linus Walleij wrote:
> The regulator and MMC frameworks provide the proper stub functions
> for the regulator functions anyway, get rid of this.

I'm dropping this patch - it's wrong, because on platforms without
regulator support, it stamps over the provided platform values:

mmci-pl18x mb:mmci: Provided ocr_mask/setpower will not be used (using regulator instead)

# CONFIG_REGULATOR is not set

So the ifdefs have to stay until some other solution for this is found.
Maybe the:

        if (IS_ERR(host->vcc))
                host->vcc = NULL;
        else {

should be:

        if (IS_ERR(host->vcc) || host->vcc == NULL)
                host->vcc = NULL;
        else {

or maybe:

        if (IS_ERR(host->vcc))
                host->vcc = NULL;
        else if (host->vcc) {

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-12-19 16:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-02 13:36 [PATCH] mmci: drop superfluous regulator #ifdef Linus Walleij
2010-12-02 13:36 ` Linus Walleij
2010-12-02 14:02 ` Mark Brown
2010-12-02 14:02   ` Mark Brown
2010-12-10  3:39 ` Chris Ball
2010-12-10  3:39   ` Chris Ball
2010-12-10  8:12   ` Russell King - ARM Linux
2010-12-10  8:12     ` Russell King - ARM Linux
2010-12-10  9:30     ` Linus WALLEIJ
2010-12-10  9:30       ` Linus WALLEIJ
2010-12-10 16:07       ` Chris Ball
2010-12-10 16:07         ` Chris Ball
2010-12-19 16:00 ` Russell King - ARM Linux
2010-12-19 16:00   ` Russell King - ARM Linux

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.