All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Cc: Jisheng Zhang <jszhang@marvell.com>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
Date: Mon, 14 Sep 2015 12:34:32 +0200	[thread overview]
Message-ID: <CAPDyKFrpDPaCLNEdwP7vYM4CJfxyz-zwC8+9AJMcUG+O=GCBOA@mail.gmail.com> (raw)
In-Reply-To: <55F6969D.7090004@linaro.org>

On 14 September 2015 at 11:42, Vaibhav Hiremath
<vaibhav.hiremath@linaro.org> wrote:
>
>
> On Monday 14 September 2015 03:00 PM, Ulf Hansson wrote:
>>
>> [...]
>>
>>>>>>
>>>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>>>> pxa1928
>>>>>> voltage_switch hook is to operate the IO pad registers, this seems not
>>>>>> belong
>>>>>> to the SDHC IP core.
>>>>>>
>>>>>
>>>>> Not quite sure whether regulator would be right fit for this.
>>>>
>>>>
>>>>
>>>>   From the patche[3/3], this can be achieved by abstracting the IO PAD
>>>> as
>>>> regulators
>>>> then, we may not need to touch the core sdhci.c. But I'm not sure
>>>> whether
>>>> this
>>>> is the good solution or not.
>>>
>>>
>>>
>>> Exactly...
>>>
>>>> sdhci Maintainers and experts may have better
>>>> suggestions.
>>>>
>>>
>>> Thats is the reason I stamped it as a RFC :)
>>>
>>
>> [...]
>>
>>  From an mmc core perspective it would be preferred if you implement
>> this as a regulator (vqmmc).
>>
>> Especially since we will soon have an API for how to set the I/O
>> voltages - and the intelligence within that API is not something we
>> would like to implement for each and every host driver.
>> https://lkml.org/lkml/2015/8/31/367
>>
>
>
> I would still consider this as a regulator specific and may not address
> the IO configuration within the SoC which are module specific.
> The API regulator_set_voltage_triplet() will not have intelligence to
> differentiate whether the call is coming from MMC or somewhere else.
>
> Note that, the IO pad voltage configuration which I am referring to is
> MMC specific and applicable only when pad is configured in MMC mode. So
> technically it is not simply common pad voltage configuration.
>
>
> And I am still not sure regulator framework would be right fit for
> this. Pinctrl would have been right fit, but...since I saw f_sdh30
> driver is already doing this, which is easy fit; so adopted the same.

Pinctrl would work as well, or perhaps a combination of both pinctrl
and a regulator.

What I don't like is the solution you have suggested in patch3.

Kind regards
Uffe

WARNING: multiple messages have this Message-ID (diff)
From: ulf.hansson@linaro.org (Ulf Hansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
Date: Mon, 14 Sep 2015 12:34:32 +0200	[thread overview]
Message-ID: <CAPDyKFrpDPaCLNEdwP7vYM4CJfxyz-zwC8+9AJMcUG+O=GCBOA@mail.gmail.com> (raw)
In-Reply-To: <55F6969D.7090004@linaro.org>

On 14 September 2015 at 11:42, Vaibhav Hiremath
<vaibhav.hiremath@linaro.org> wrote:
>
>
> On Monday 14 September 2015 03:00 PM, Ulf Hansson wrote:
>>
>> [...]
>>
>>>>>>
>>>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>>>> pxa1928
>>>>>> voltage_switch hook is to operate the IO pad registers, this seems not
>>>>>> belong
>>>>>> to the SDHC IP core.
>>>>>>
>>>>>
>>>>> Not quite sure whether regulator would be right fit for this.
>>>>
>>>>
>>>>
>>>>   From the patche[3/3], this can be achieved by abstracting the IO PAD
>>>> as
>>>> regulators
>>>> then, we may not need to touch the core sdhci.c. But I'm not sure
>>>> whether
>>>> this
>>>> is the good solution or not.
>>>
>>>
>>>
>>> Exactly...
>>>
>>>> sdhci Maintainers and experts may have better
>>>> suggestions.
>>>>
>>>
>>> Thats is the reason I stamped it as a RFC :)
>>>
>>
>> [...]
>>
>>  From an mmc core perspective it would be preferred if you implement
>> this as a regulator (vqmmc).
>>
>> Especially since we will soon have an API for how to set the I/O
>> voltages - and the intelligence within that API is not something we
>> would like to implement for each and every host driver.
>> https://lkml.org/lkml/2015/8/31/367
>>
>
>
> I would still consider this as a regulator specific and may not address
> the IO configuration within the SoC which are module specific.
> The API regulator_set_voltage_triplet() will not have intelligence to
> differentiate whether the call is coming from MMC or somewhere else.
>
> Note that, the IO pad voltage configuration which I am referring to is
> MMC specific and applicable only when pad is configured in MMC mode. So
> technically it is not simply common pad voltage configuration.
>
>
> And I am still not sure regulator framework would be right fit for
> this. Pinctrl would have been right fit, but...since I saw f_sdh30
> driver is already doing this, which is easy fit; so adopted the same.

Pinctrl would work as well, or perhaps a combination of both pinctrl
and a regulator.

What I don't like is the solution you have suggested in patch3.

Kind regards
Uffe

  reply	other threads:[~2015-09-14 10:34 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01 19:32 [RFC 0/3] mmc: sdhci: pass signal voltage as an argument to ->voltage_switch() Vaibhav Hiremath
2015-09-01 19:32 ` Vaibhav Hiremath
2015-09-01 19:32 ` [RFC 1/3] mmc: sdhci: pass signal_voltage as an argument to voltage_switch callback Vaibhav Hiremath
2015-09-01 19:32   ` Vaibhav Hiremath
2015-09-01 19:32 ` [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages Vaibhav Hiremath
2015-09-01 19:32   ` Vaibhav Hiremath
2015-09-02  7:04   ` Jisheng Zhang
2015-09-02  7:04     ` Jisheng Zhang
2015-09-02  7:04     ` Jisheng Zhang
2015-09-02  8:19     ` Vaibhav Hiremath
2015-09-02  8:19       ` Vaibhav Hiremath
2015-09-02  8:26       ` Jisheng Zhang
2015-09-02  8:26         ` Jisheng Zhang
2015-09-02  8:26         ` Jisheng Zhang
2015-09-02 11:43         ` Vaibhav Hiremath
2015-09-02 11:43           ` Vaibhav Hiremath
2015-09-14  9:30           ` Ulf Hansson
2015-09-14  9:30             ` Ulf Hansson
2015-09-14  9:30             ` Ulf Hansson
2015-09-14  9:42             ` Vaibhav Hiremath
2015-09-14  9:42               ` Vaibhav Hiremath
2015-09-14  9:42               ` Vaibhav Hiremath
2015-09-14 10:34               ` Ulf Hansson [this message]
2015-09-14 10:34                 ` Ulf Hansson
2015-09-14 10:34                 ` Ulf Hansson
2015-09-14 12:41                 ` Vaibhav Hiremath
2015-09-14 12:41                   ` Vaibhav Hiremath
2015-09-14 12:41                   ` Vaibhav Hiremath
2015-09-14 12:47                   ` Vaibhav Hiremath
2015-09-14 12:47                     ` Vaibhav Hiremath
2015-09-14 12:47                     ` Vaibhav Hiremath
2015-10-02 10:00       ` Linus Walleij
2015-10-02 10:00         ` Linus Walleij
2015-10-02 10:00         ` Linus Walleij
2015-09-01 19:32 ` [RFC 3/3] mmc: sdhci-pxav3: Add ->voltage_switch callback support Vaibhav Hiremath
2015-09-01 19:32   ` Vaibhav Hiremath
2015-09-02 13:51   ` Shawn Lin
2015-09-02 14:32     ` Vaibhav Hiremath
2015-09-02 14:32       ` Vaibhav Hiremath
2015-09-03 18:35     ` Vaibhav Hiremath
2015-09-03 18:35       ` Vaibhav Hiremath

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='CAPDyKFrpDPaCLNEdwP7vYM4CJfxyz-zwC8+9AJMcUG+O=GCBOA@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=jszhang@marvell.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=vaibhav.hiremath@linaro.org \
    /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.