* [PATCHv3] mmc: atmel-mci: add vmmc-supply support
@ 2013-10-17 10:46 Alexandre Belloni
2013-10-17 13:56 ` Ulf Hansson
0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Belloni @ 2013-10-17 10:46 UTC (permalink / raw)
To: Ludovic Desroches
Cc: ulf.hansson, Chris Ball, linux-mmc, linux-kernel,
Alexandre Belloni
Other MMC hosts handle a regulator named vmmc-supply that allows to power the
MMC card or SDIO device before communicating on the bus.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
Changes in v2:
- use mmc_regulator_get_supply instead of devm_regulator_get
Changes in v3:
- en/disable the regulator in .set_ios using mmc_regulator_set_ocr
drivers/mmc/host/atmel-mci.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 69e438e..a9e1ba6 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1385,8 +1385,14 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
clk_unprepare(host->mck);
switch (ios->power_mode) {
+ case MMC_POWER_OFF:
+ if (!IS_ERR(mmc->supply.vmmc))
+ mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);
+ break;
case MMC_POWER_UP:
set_bit(ATMCI_CARD_NEED_INIT, &slot->flags);
+ if (!IS_ERR(mmc->supply.vmmc))
+ mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
break;
default:
/*
@@ -2196,6 +2202,7 @@ static int __init atmci_init_slot(struct atmel_mci *host,
}
host->slot[id] = slot;
+ mmc_regulator_get_supply(mmc);
mmc_add_host(mmc);
if (gpio_is_valid(slot->detect_pin)) {
--
1.8.1.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCHv3] mmc: atmel-mci: add vmmc-supply support
2013-10-17 10:46 [PATCHv3] mmc: atmel-mci: add vmmc-supply support Alexandre Belloni
@ 2013-10-17 13:56 ` Ulf Hansson
2013-12-17 19:03 ` Alexandre Belloni
0 siblings, 1 reply; 7+ messages in thread
From: Ulf Hansson @ 2013-10-17 13:56 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Ludovic Desroches, Chris Ball, linux-mmc,
linux-kernel@vger.kernel.org
On 17 October 2013 12:46, Alexandre Belloni
<alexandre.belloni@free-electrons.com> wrote:
> Other MMC hosts handle a regulator named vmmc-supply that allows to power the
> MMC card or SDIO device before communicating on the bus.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>
> Changes in v2:
> - use mmc_regulator_get_supply instead of devm_regulator_get
>
> Changes in v3:
> - en/disable the regulator in .set_ios using mmc_regulator_set_ocr
>
> drivers/mmc/host/atmel-mci.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index 69e438e..a9e1ba6 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -1385,8 +1385,14 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
> clk_unprepare(host->mck);
>
> switch (ios->power_mode) {
> + case MMC_POWER_OFF:
> + if (!IS_ERR(mmc->supply.vmmc))
> + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);
> + break;
> case MMC_POWER_UP:
> set_bit(ATMCI_CARD_NEED_INIT, &slot->flags);
> + if (!IS_ERR(mmc->supply.vmmc))
> + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
> break;
> default:
> /*
> @@ -2196,6 +2202,7 @@ static int __init atmci_init_slot(struct atmel_mci *host,
> }
>
> host->slot[id] = slot;
> + mmc_regulator_get_supply(mmc);
> mmc_add_host(mmc);
>
> if (gpio_is_valid(slot->detect_pin)) {
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3] mmc: atmel-mci: add vmmc-supply support
2013-10-17 13:56 ` Ulf Hansson
@ 2013-12-17 19:03 ` Alexandre Belloni
2013-12-18 8:16 ` Ludovic Desroches
0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Belloni @ 2013-12-17 19:03 UTC (permalink / raw)
To: Ulf Hansson
Cc: Ludovic Desroches, Chris Ball, linux-mmc,
linux-kernel@vger.kernel.org
Hi,
It seems that patch never made it to the mainline. Is it still missing
something ?
Regards,
On 17/10/2013 15:56, Ulf Hansson wrote:
> On 17 October 2013 12:46, Alexandre Belloni
> <alexandre.belloni@free-electrons.com> wrote:
>> Other MMC hosts handle a regulator named vmmc-supply that allows to power the
>> MMC card or SDIO device before communicating on the bus.
>>
>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
>
>> ---
>>
>> Changes in v2:
>> - use mmc_regulator_get_supply instead of devm_regulator_get
>>
>> Changes in v3:
>> - en/disable the regulator in .set_ios using mmc_regulator_set_ocr
>>
>> drivers/mmc/host/atmel-mci.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
>> index 69e438e..a9e1ba6 100644
>> --- a/drivers/mmc/host/atmel-mci.c
>> +++ b/drivers/mmc/host/atmel-mci.c
>> @@ -1385,8 +1385,14 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>> clk_unprepare(host->mck);
>>
>> switch (ios->power_mode) {
>> + case MMC_POWER_OFF:
>> + if (!IS_ERR(mmc->supply.vmmc))
>> + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);
>> + break;
>> case MMC_POWER_UP:
>> set_bit(ATMCI_CARD_NEED_INIT, &slot->flags);
>> + if (!IS_ERR(mmc->supply.vmmc))
>> + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
>> break;
>> default:
>> /*
>> @@ -2196,6 +2202,7 @@ static int __init atmci_init_slot(struct atmel_mci *host,
>> }
>>
>> host->slot[id] = slot;
>> + mmc_regulator_get_supply(mmc);
>> mmc_add_host(mmc);
>>
>> if (gpio_is_valid(slot->detect_pin)) {
>> --
>> 1.8.1.2
>>
> --
> 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
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3] mmc: atmel-mci: add vmmc-supply support
2013-12-17 19:03 ` Alexandre Belloni
@ 2013-12-18 8:16 ` Ludovic Desroches
2014-01-13 17:43 ` Alexandre Belloni
0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Desroches @ 2013-12-18 8:16 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Ulf Hansson, Chris Ball, linux-mmc, linux-kernel@vger.kernel.org,
Ludovic Desroches
Hi Alexandre,
On Tue, Dec 17, 2013 at 08:03:12PM +0100, Alexandre Belloni wrote:
> Hi,
>
> It seems that patch never made it to the mainline. Is it still missing
> something ?
No reason on my side, maybe because my ack is missing but I thought I
gave it on a previous version, maybe I am wrong.
So Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Regards
Ludovic
>
> Regards,
>
> On 17/10/2013 15:56, Ulf Hansson wrote:
> > On 17 October 2013 12:46, Alexandre Belloni
> > <alexandre.belloni@free-electrons.com> wrote:
> >> Other MMC hosts handle a regulator named vmmc-supply that allows to power the
> >> MMC card or SDIO device before communicating on the bus.
> >>
> >> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
> >
> >> ---
> >>
> >> Changes in v2:
> >> - use mmc_regulator_get_supply instead of devm_regulator_get
> >>
> >> Changes in v3:
> >> - en/disable the regulator in .set_ios using mmc_regulator_set_ocr
> >>
> >> drivers/mmc/host/atmel-mci.c | 7 +++++++
> >> 1 file changed, 7 insertions(+)
> >>
> >> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> >> index 69e438e..a9e1ba6 100644
> >> --- a/drivers/mmc/host/atmel-mci.c
> >> +++ b/drivers/mmc/host/atmel-mci.c
> >> @@ -1385,8 +1385,14 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
> >> clk_unprepare(host->mck);
> >>
> >> switch (ios->power_mode) {
> >> + case MMC_POWER_OFF:
> >> + if (!IS_ERR(mmc->supply.vmmc))
> >> + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);
> >> + break;
> >> case MMC_POWER_UP:
> >> set_bit(ATMCI_CARD_NEED_INIT, &slot->flags);
> >> + if (!IS_ERR(mmc->supply.vmmc))
> >> + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
> >> break;
> >> default:
> >> /*
> >> @@ -2196,6 +2202,7 @@ static int __init atmci_init_slot(struct atmel_mci *host,
> >> }
> >>
> >> host->slot[id] = slot;
> >> + mmc_regulator_get_supply(mmc);
> >> mmc_add_host(mmc);
> >>
> >> if (gpio_is_valid(slot->detect_pin)) {
> >> --
> >> 1.8.1.2
> >>
> > --
> > 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
>
>
> --
> Alexandre Belloni, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3] mmc: atmel-mci: add vmmc-supply support
2013-12-18 8:16 ` Ludovic Desroches
@ 2014-01-13 17:43 ` Alexandre Belloni
2014-01-13 17:59 ` Chris Ball
0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Belloni @ 2014-01-13 17:43 UTC (permalink / raw)
To: Ulf Hansson, Chris Ball, linux-mmc, linux-kernel@vger.kernel.org
Hi,
I still don't see that on mmc.git, Any issue with that patch ? I would
prefer not missing the 3.14 merge window.
Regards
On 18/12/2013 09:16, Ludovic Desroches wrote:
> Hi Alexandre,
>
> On Tue, Dec 17, 2013 at 08:03:12PM +0100, Alexandre Belloni wrote:
>> Hi,
>>
>> It seems that patch never made it to the mainline. Is it still missing
>> something ?
>
> No reason on my side, maybe because my ack is missing but I thought I
> gave it on a previous version, maybe I am wrong.
>
> So Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
>
>
> Regards
>
> Ludovic
>
>>
>> Regards,
>>
>> On 17/10/2013 15:56, Ulf Hansson wrote:
>>> On 17 October 2013 12:46, Alexandre Belloni
>>> <alexandre.belloni@free-electrons.com> wrote:
>>>> Other MMC hosts handle a regulator named vmmc-supply that allows to power the
>>>> MMC card or SDIO device before communicating on the bus.
>>>>
>>>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>>> Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
>>>
>>>> ---
>>>>
>>>> Changes in v2:
>>>> - use mmc_regulator_get_supply instead of devm_regulator_get
>>>>
>>>> Changes in v3:
>>>> - en/disable the regulator in .set_ios using mmc_regulator_set_ocr
>>>>
>>>> drivers/mmc/host/atmel-mci.c | 7 +++++++
>>>> 1 file changed, 7 insertions(+)
>>>>
>>>> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
>>>> index 69e438e..a9e1ba6 100644
>>>> --- a/drivers/mmc/host/atmel-mci.c
>>>> +++ b/drivers/mmc/host/atmel-mci.c
>>>> @@ -1385,8 +1385,14 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>>>> clk_unprepare(host->mck);
>>>>
>>>> switch (ios->power_mode) {
>>>> + case MMC_POWER_OFF:
>>>> + if (!IS_ERR(mmc->supply.vmmc))
>>>> + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);
>>>> + break;
>>>> case MMC_POWER_UP:
>>>> set_bit(ATMCI_CARD_NEED_INIT, &slot->flags);
>>>> + if (!IS_ERR(mmc->supply.vmmc))
>>>> + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
>>>> break;
>>>> default:
>>>> /*
>>>> @@ -2196,6 +2202,7 @@ static int __init atmci_init_slot(struct atmel_mci *host,
>>>> }
>>>>
>>>> host->slot[id] = slot;
>>>> + mmc_regulator_get_supply(mmc);
>>>> mmc_add_host(mmc);
>>>>
>>>> if (gpio_is_valid(slot->detect_pin)) {
>>>> --
>>>> 1.8.1.2
>>>>
>>> --
>>> 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
>>
>>
>> --
>> Alexandre Belloni, Free Electrons
>> Embedded Linux, Kernel and Android engineering
>> http://free-electrons.com
>>
> --
> 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
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3] mmc: atmel-mci: add vmmc-supply support
2014-01-13 17:43 ` Alexandre Belloni
@ 2014-01-13 17:59 ` Chris Ball
0 siblings, 0 replies; 7+ messages in thread
From: Chris Ball @ 2014-01-13 17:59 UTC (permalink / raw)
To: Alexandre Belloni; +Cc: Ulf Hansson, linux-mmc, linux-kernel@vger.kernel.org
Hi,
On Mon, Jan 13 2014, Alexandre Belloni wrote:
> I still don't see that on mmc.git, Any issue with that patch ? I would
> prefer not missing the 3.14 merge window.
Sorry about that -- just pushed to mmc-next for 3.14 with ACKs from
Ulf and Ludovic. Thanks,
- Chris.
--
Chris Ball <chris@printf.net> <http://printf.net/>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3] mmc: atmel-mci: add vmmc-supply support
@ 2014-01-13 17:59 ` Chris Ball
0 siblings, 0 replies; 7+ messages in thread
From: Chris Ball @ 2014-01-13 17:59 UTC (permalink / raw)
To: Alexandre Belloni; +Cc: Ulf Hansson, linux-mmc, linux-kernel@vger.kernel.org
Hi,
On Mon, Jan 13 2014, Alexandre Belloni wrote:
> I still don't see that on mmc.git, Any issue with that patch ? I would
> prefer not missing the 3.14 merge window.
Sorry about that -- just pushed to mmc-next for 3.14 with ACKs from
Ulf and Ludovic. Thanks,
- Chris.
--
Chris Ball <chris@printf.net> <http://printf.net/>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-01-13 17:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17 10:46 [PATCHv3] mmc: atmel-mci: add vmmc-supply support Alexandre Belloni
2013-10-17 13:56 ` Ulf Hansson
2013-12-17 19:03 ` Alexandre Belloni
2013-12-18 8:16 ` Ludovic Desroches
2014-01-13 17:43 ` Alexandre Belloni
2014-01-13 17:59 ` Chris Ball
2014-01-13 17:59 ` Chris Ball
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.