From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Addy Ke <addy.ke-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
Andrew Gabbasov
<andrew_gabbasov-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>,
Alexandru Stan <amstan-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
Seungwon Jeon <tgih.jun-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
linux-mmc <linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
Chris Ball <chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org>,
Jaehoon Chung
<jh80.chung-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Andrew Bresticker
<abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
Tim Kryger <tim.kryger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Alim Akhtar <alim.akhtar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Johan Rudholm <johan.rudholm-VrBV9hrLPhE@public.gmane.org>,
Adrian Hunter
<adrian.hunter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Sonny Rao <sonnyrao-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
Javier Martinez Canillas
<javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Subject: Re: [PATCH v4 2/4] mmc: core: Add mmc_regulator_set_vqmmc()
Date: Fri, 20 Mar 2015 11:28:28 +0000 [thread overview]
Message-ID: <20150320112828.GF2869@sirena.org.uk> (raw)
In-Reply-To: <CAPDyKFroe9N3j9oMWKknH5huv7j8fkrBr5UKjjp190hkqNsNRg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1892 bytes --]
On Fri, Mar 20, 2015 at 11:55:50AM +0100, Ulf Hansson wrote:
> On 19 March 2015 at 12:36, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> > The implementation *should* do that anyway, it's just not trivial to
> > implement in an efficient fashion with the current information we have
> > from drivers.
> The APIs regulator_count_voltages() and regulator_list_voltage(), are
> currently used from the mmc core to find out which voltages that is
> supported (with 0.1V granularity). Then that information can be used
> when trying to set a new voltage.
> But I guess such a wrapper API is out of the question?
> Anyway, I get the feeling that we will need to do the same for this case.
As previously discussed the problem is that there can be a *lot* of
voltages on a modern regulator with fine grained voltage steps and
tolerances are also used for things like cpufreq where we care about
performance. We need something that doesn't require a linear scan of
possible values.
> >> would be good to allow both upper and lower limits to be zero.
> > The lower limit can be zero already though it isn't clear to me that
> > this is useful. Setting an upper limit of zero seems nonsensical, an
> > upper limit that is lower than the lower limit isn't terribly obvious
> > and removing the upper limit isn't safe - it means that we'll happily
> > oversupply things which is a road to physical damage.
> I am not sure I follow here. In the regulator_set_voltage_tol() you
> can only specifiy one limit (tolerance?). What Dough proposed was to
> add a new API which can have both a low tolerance value and a high
> tolerance value.
Tolerances are not limits - when you say "limit" that sounds like a hard
value. I can't see any reason why the code would prevent anyone setting
a tolerance of zero, though it should be rare that this is actually the
best thing to do.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 200 bytes --]
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 2/4] mmc: core: Add mmc_regulator_set_vqmmc()
Date: Fri, 20 Mar 2015 11:28:28 +0000 [thread overview]
Message-ID: <20150320112828.GF2869@sirena.org.uk> (raw)
In-Reply-To: <CAPDyKFroe9N3j9oMWKknH5huv7j8fkrBr5UKjjp190hkqNsNRg@mail.gmail.com>
On Fri, Mar 20, 2015 at 11:55:50AM +0100, Ulf Hansson wrote:
> On 19 March 2015 at 12:36, Mark Brown <broonie@kernel.org> wrote:
> > The implementation *should* do that anyway, it's just not trivial to
> > implement in an efficient fashion with the current information we have
> > from drivers.
> The APIs regulator_count_voltages() and regulator_list_voltage(), are
> currently used from the mmc core to find out which voltages that is
> supported (with 0.1V granularity). Then that information can be used
> when trying to set a new voltage.
> But I guess such a wrapper API is out of the question?
> Anyway, I get the feeling that we will need to do the same for this case.
As previously discussed the problem is that there can be a *lot* of
voltages on a modern regulator with fine grained voltage steps and
tolerances are also used for things like cpufreq where we care about
performance. We need something that doesn't require a linear scan of
possible values.
> >> would be good to allow both upper and lower limits to be zero.
> > The lower limit can be zero already though it isn't clear to me that
> > this is useful. Setting an upper limit of zero seems nonsensical, an
> > upper limit that is lower than the lower limit isn't terribly obvious
> > and removing the upper limit isn't safe - it means that we'll happily
> > oversupply things which is a road to physical damage.
> I am not sure I follow here. In the regulator_set_voltage_tol() you
> can only specifiy one limit (tolerance?). What Dough proposed was to
> add a new API which can have both a low tolerance value and a high
> tolerance value.
Tolerances are not limits - when you say "limit" that sounds like a hard
value. I can't see any reason why the code would prevent anyone setting
a tolerance of zero, though it should be rare that this is actually the
best thing to do.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150320/295ed9f1/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Doug Anderson <dianders@chromium.org>,
Heiko Stuebner <heiko@sntech.de>,
Jaehoon Chung <jh80.chung@samsung.com>,
Seungwon Jeon <tgih.jun@samsung.com>,
Alexandru Stan <amstan@chromium.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Sonny Rao <sonnyrao@chromium.org>,
Andrew Bresticker <abrestic@chromium.org>,
Addy Ke <addy.ke@rock-chips.com>,
Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Chris Ball <chris@printf.net>,
Johan Rudholm <johan.rudholm@axis.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Tim Kryger <tim.kryger@gmail.com>,
Andrew Gabbasov <andrew_gabbasov@mentor.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
linux-mmc <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/4] mmc: core: Add mmc_regulator_set_vqmmc()
Date: Fri, 20 Mar 2015 11:28:28 +0000 [thread overview]
Message-ID: <20150320112828.GF2869@sirena.org.uk> (raw)
In-Reply-To: <CAPDyKFroe9N3j9oMWKknH5huv7j8fkrBr5UKjjp190hkqNsNRg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1863 bytes --]
On Fri, Mar 20, 2015 at 11:55:50AM +0100, Ulf Hansson wrote:
> On 19 March 2015 at 12:36, Mark Brown <broonie@kernel.org> wrote:
> > The implementation *should* do that anyway, it's just not trivial to
> > implement in an efficient fashion with the current information we have
> > from drivers.
> The APIs regulator_count_voltages() and regulator_list_voltage(), are
> currently used from the mmc core to find out which voltages that is
> supported (with 0.1V granularity). Then that information can be used
> when trying to set a new voltage.
> But I guess such a wrapper API is out of the question?
> Anyway, I get the feeling that we will need to do the same for this case.
As previously discussed the problem is that there can be a *lot* of
voltages on a modern regulator with fine grained voltage steps and
tolerances are also used for things like cpufreq where we care about
performance. We need something that doesn't require a linear scan of
possible values.
> >> would be good to allow both upper and lower limits to be zero.
> > The lower limit can be zero already though it isn't clear to me that
> > this is useful. Setting an upper limit of zero seems nonsensical, an
> > upper limit that is lower than the lower limit isn't terribly obvious
> > and removing the upper limit isn't safe - it means that we'll happily
> > oversupply things which is a road to physical damage.
> I am not sure I follow here. In the regulator_set_voltage_tol() you
> can only specifiy one limit (tolerance?). What Dough proposed was to
> add a new API which can have both a low tolerance value and a high
> tolerance value.
Tolerances are not limits - when you say "limit" that sounds like a hard
value. I can't see any reason why the code would prevent anyone setting
a tolerance of zero, though it should be rare that this is actually the
best thing to do.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-03-20 11:28 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 22:15 [PATCH v4 1/4] mmc: dw_mmc: Don't try to enable the CD until we're sure we're not deferring Doug Anderson
2015-03-11 22:15 ` Doug Anderson
2015-03-11 22:15 ` [PATCH v4 2/4] mmc: core: Add mmc_regulator_set_vqmmc() Doug Anderson
2015-03-11 22:15 ` Doug Anderson
2015-03-16 14:05 ` Ulf Hansson
2015-03-16 14:05 ` Ulf Hansson
2015-03-16 15:12 ` Doug Anderson
2015-03-16 15:12 ` Doug Anderson
2015-03-17 10:23 ` Ulf Hansson
2015-03-17 10:23 ` Ulf Hansson
2015-03-17 10:38 ` Mark Brown
2015-03-17 10:38 ` Mark Brown
2015-03-17 10:38 ` Mark Brown
2015-03-17 11:28 ` Ulf Hansson
2015-03-17 11:28 ` Ulf Hansson
2015-03-17 11:28 ` Ulf Hansson
2015-03-19 4:09 ` Doug Anderson
2015-03-19 4:09 ` Doug Anderson
2015-03-19 4:09 ` Doug Anderson
2015-03-19 11:14 ` Ulf Hansson
2015-03-19 11:14 ` Ulf Hansson
[not found] ` <CAPDyKFrkznbW7k_=BDo99jJhWzDbUgbeU+MXWB_E_UWXh=56Eg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-19 11:36 ` Mark Brown
2015-03-19 11:36 ` Mark Brown
2015-03-19 11:36 ` Mark Brown
2015-03-20 10:55 ` Ulf Hansson
2015-03-20 10:55 ` Ulf Hansson
2015-03-20 10:55 ` Ulf Hansson
[not found] ` <CAPDyKFroe9N3j9oMWKknH5huv7j8fkrBr5UKjjp190hkqNsNRg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-20 11:28 ` Mark Brown [this message]
2015-03-20 11:28 ` Mark Brown
2015-03-20 11:28 ` Mark Brown
2015-04-07 20:05 ` Doug Anderson
2015-04-07 20:05 ` Doug Anderson
2015-04-07 20:05 ` Doug Anderson
[not found] ` <CAD=FV=WpDE_iEFWFw094WBfBH2TgRi+1OGk3E3qQ3t1EfyrnJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-08 11:28 ` Mark Brown
2015-04-08 11:28 ` Mark Brown
2015-04-08 11:28 ` Mark Brown
2015-03-11 22:15 ` [PATCH v4 3/4] mmc: dw_mmc: Use mmc_regulator_set_vqmmc in start_signal_voltage_switch Doug Anderson
2015-03-11 22:15 ` Doug Anderson
2015-03-11 22:15 ` [PATCH v4 4/4] ARM: dts: Specify VMMC and VQMMC on rk3288-evb Doug Anderson
2015-03-11 22:15 ` Doug Anderson
2015-03-11 22:15 ` Doug Anderson
2015-03-11 23:30 ` Heiko Stuebner
2015-03-11 23:30 ` Heiko Stuebner
2015-04-07 21:37 ` Heiko Stübner
2015-04-07 21:37 ` Heiko Stübner
2015-03-13 11:32 ` [PATCH v4 1/4] mmc: dw_mmc: Don't try to enable the CD until we're sure we're not deferring Jaehoon Chung
2015-03-13 11:32 ` Jaehoon Chung
2015-03-13 12:10 ` Heiko Stuebner
2015-03-13 12:10 ` Heiko Stuebner
2015-03-13 12:10 ` Heiko Stuebner
2015-03-16 2:09 ` Jaehoon Chung
2015-03-16 2:09 ` Jaehoon Chung
2015-03-27 5:55 ` Jaehoon Chung
2015-03-27 5:55 ` Jaehoon Chung
2015-03-27 15:46 ` Doug Anderson
2015-03-27 15:46 ` Doug Anderson
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=20150320112828.GF2869@sirena.org.uk \
--to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=addy.ke-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=adrian.hunter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=alim.akhtar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=amstan-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=andrew_gabbasov-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org \
--cc=chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org \
--cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org \
--cc=jh80.chung-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=johan.rudholm-VrBV9hrLPhE@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=sonnyrao-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=tgih.jun-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=tim.kryger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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.