* [PATCH] MMC: pxamci: call pdata->setpower even when regulator is used
@ 2009-11-26 11:10 Daniel Mack
2009-12-02 0:52 ` Daniel Mack
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Daniel Mack @ 2009-11-26 11:10 UTC (permalink / raw)
To: linux-arm-kernel
On platforms where the vmmc regulator is used, it might still be
necessary to call the platform data's setpower() callback in order to
drive GPIOs to power up hardware.
I can't see any pxamci user with power regulators enabled, hence this
shouldn't break anything.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Pierre Ossman <pierre@ossman.eu>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: linux-mmc at vger.kernel.org
---
drivers/mmc/host/pxamci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index b00d673..c35df2b 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -84,7 +84,7 @@ static inline void pxamci_init_ocr(struct pxamci_host *host)
host->mmc->ocr_avail = mmc_regulator_get_ocrmask(host->vcc);
if (host->pdata && host->pdata->ocr_mask)
dev_warn(mmc_dev(host->mmc),
- "ocr_mask/setpower will not be used\n");
+ "given ocr_mask will not be used\n");
}
#endif
if (host->vcc == NULL) {
@@ -109,7 +109,7 @@ static inline void pxamci_set_power(struct pxamci_host *host, unsigned int vdd)
gpio_set_value(host->pdata->gpio_power,
!!on ^ host->pdata->gpio_power_invert);
}
- if (!host->vcc && host->pdata && host->pdata->setpower)
+ if (host->pdata && host->pdata->setpower)
host->pdata->setpower(mmc_dev(host->mmc), vdd);
}
--
1.6.5.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] MMC: pxamci: call pdata->setpower even when regulator is used
2009-11-26 11:10 [PATCH] MMC: pxamci: call pdata->setpower even when regulator is used Daniel Mack
@ 2009-12-02 0:52 ` Daniel Mack
2009-12-02 4:34 ` Eric Miao
2010-08-27 19:00 ` Chris Ball
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Mack @ 2009-12-02 0:52 UTC (permalink / raw)
To: linux-arm-kernel
ping.
On Thu, Nov 26, 2009 at 12:10:13PM +0100, Daniel Mack wrote:
> On platforms where the vmmc regulator is used, it might still be
> necessary to call the platform data's setpower() callback in order to
> drive GPIOs to power up hardware.
>
> I can't see any pxamci user with power regulators enabled, hence this
> shouldn't break anything.
>
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
> Cc: Pierre Ossman <pierre@ossman.eu>
> Cc: Eric Miao <eric.y.miao@gmail.com>
> Cc: linux-mmc at vger.kernel.org
> ---
> drivers/mmc/host/pxamci.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
> index b00d673..c35df2b 100644
> --- a/drivers/mmc/host/pxamci.c
> +++ b/drivers/mmc/host/pxamci.c
> @@ -84,7 +84,7 @@ static inline void pxamci_init_ocr(struct pxamci_host *host)
> host->mmc->ocr_avail = mmc_regulator_get_ocrmask(host->vcc);
> if (host->pdata && host->pdata->ocr_mask)
> dev_warn(mmc_dev(host->mmc),
> - "ocr_mask/setpower will not be used\n");
> + "given ocr_mask will not be used\n");
> }
> #endif
> if (host->vcc == NULL) {
> @@ -109,7 +109,7 @@ static inline void pxamci_set_power(struct pxamci_host *host, unsigned int vdd)
> gpio_set_value(host->pdata->gpio_power,
> !!on ^ host->pdata->gpio_power_invert);
> }
> - if (!host->vcc && host->pdata && host->pdata->setpower)
> + if (host->pdata && host->pdata->setpower)
> host->pdata->setpower(mmc_dev(host->mmc), vdd);
> }
>
> --
> 1.6.5.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] MMC: pxamci: call pdata->setpower even when regulator is used
2009-11-26 11:10 [PATCH] MMC: pxamci: call pdata->setpower even when regulator is used Daniel Mack
2009-12-02 0:52 ` Daniel Mack
@ 2009-12-02 4:34 ` Eric Miao
2010-08-27 19:00 ` Chris Ball
2 siblings, 0 replies; 4+ messages in thread
From: Eric Miao @ 2009-12-02 4:34 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Nov 26, 2009 at 7:10 PM, Daniel Mack <daniel@caiaq.de> wrote:
> On platforms where the vmmc regulator is used, it might still be
> necessary to call the platform data's setpower() callback in order to
> drive GPIOs to power up hardware.
>
> I can't see any pxamci user with power regulators enabled, hence this
> shouldn't break anything.
>
I was thinking about this for quite a time, and I'm afraid that this patch
solves only one corner case - that some specific actions need to be
taken _after_ mmc regulator is adjusted, while excluding the possibility
for that to happen _before_. I wonder maybe for those corner cases,
if one can just manipulate the vmmc regulator and other specific stuffs
within ->setpower().
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] MMC: pxamci: call pdata->setpower even when regulator is used
2009-11-26 11:10 [PATCH] MMC: pxamci: call pdata->setpower even when regulator is used Daniel Mack
2009-12-02 0:52 ` Daniel Mack
2009-12-02 4:34 ` Eric Miao
@ 2010-08-27 19:00 ` Chris Ball
2 siblings, 0 replies; 4+ messages in thread
From: Chris Ball @ 2010-08-27 19:00 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Thu, Nov 26, 2009 at 12:10:13PM +0100, Daniel Mack wrote:
> On platforms where the vmmc regulator is used, it might still be
> necessary to call the platform data's setpower() callback in order to
> drive GPIOs to power up hardware.
>
> I can't see any pxamci user with power regulators enabled, hence this
> shouldn't break anything.
>
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
Am chasing up old patches, looks like this didn't get merged. Eric,
any interest in taking something like this, or was your reply a NACK?
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-27 19:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-26 11:10 [PATCH] MMC: pxamci: call pdata->setpower even when regulator is used Daniel Mack
2009-12-02 0:52 ` Daniel Mack
2009-12-02 4:34 ` Eric Miao
2010-08-27 19:00 ` Chris Ball
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).