* [PATCH] mmc: add workaround for fixed regulators
@ 2012-01-23 9:53 Marek Szyprowski
2012-01-23 14:26 ` Kyungmin Park
0 siblings, 1 reply; 2+ messages in thread
From: Marek Szyprowski @ 2012-01-23 9:53 UTC (permalink / raw)
To: linux-mmc
Cc: Marek Szyprowski, Kyungmin Park, Chris Ball, Linus Walleij,
Adrian Hunter
Voltage change errors should not be fatal to mmc subsystem. Some
regulators don't support changing the supplied voltage values, while
they can still be used for enabling and disabling the supply. This fixes
the regresion that appeared in sdhci driver after commit ceb6143b -
erlier it worked fine with fixed gpio-based regulator.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/mmc/core/core.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index f545a3e..8726ae4 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1128,6 +1128,12 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
else
result = 0;
+ /* Some regulators don't support voltage changes, so
+ * assume that board designer used correct values
+ */
+ if (result == -EINVAL)
+ result = 0;
+
if (result == 0 && !mmc->regulator_enabled) {
result = regulator_enable(supply);
if (!result)
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: add workaround for fixed regulators
2012-01-23 9:53 [PATCH] mmc: add workaround for fixed regulators Marek Szyprowski
@ 2012-01-23 14:26 ` Kyungmin Park
0 siblings, 0 replies; 2+ messages in thread
From: Kyungmin Park @ 2012-01-23 14:26 UTC (permalink / raw)
To: Marek Szyprowski; +Cc: linux-mmc, Chris Ball, Linus Walleij, Adrian Hunter
Hi Marek,
I sent the patch same issue and get the Acked from Adrian.
http://permalink.gmane.org/gmane.linux.kernel.mmc/12206
Please see it.
Thank you,
Kyungmin Park
On Mon, Jan 23, 2012 at 6:53 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> Voltage change errors should not be fatal to mmc subsystem. Some
> regulators don't support changing the supplied voltage values, while
> they can still be used for enabling and disabling the supply. This fixes
> the regresion that appeared in sdhci driver after commit ceb6143b -
> erlier it worked fine with fixed gpio-based regulator.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/mmc/core/core.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index f545a3e..8726ae4 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1128,6 +1128,12 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
> else
> result = 0;
>
> + /* Some regulators don't support voltage changes, so
> + * assume that board designer used correct values
> + */
> + if (result == -EINVAL)
> + result = 0;
> +
> if (result == 0 && !mmc->regulator_enabled) {
> result = regulator_enable(supply);
> if (!result)
> --
> 1.7.1.569.g6f426
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-23 14:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-23 9:53 [PATCH] mmc: add workaround for fixed regulators Marek Szyprowski
2012-01-23 14:26 ` Kyungmin Park
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).