All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Kryger <tim.kryger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Andrew Bresticker <abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Chris Ball <chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org>,
	Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ARM Kernel List
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	mike.looijmans-Oq418RWZeHk@public.gmane.org
Subject: Re: [PATCH 3/4] mmc: sdhci: defer probing on regulator_get_optional() failures
Date: Tue, 15 Apr 2014 12:03:49 -0700	[thread overview]
Message-ID: <CAAYSxhrmCbGLsu43mK15ParXHa_FJ9OVQiCPUdqyWEpTE=r1uw@mail.gmail.com> (raw)
In-Reply-To: <1397526163-20126-4-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>

On Mon, Apr 14, 2014 at 6:42 PM, Andrew Bresticker
<abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
> If regulator_get_optional() returns EPROBE_DEFER, it indicates
> that the regulator may show up later (e.g. the DT property is
> present but the corresponding regulator may not have probed).
> Instead of continuing without the regulator, return EPROBE_DEFER
> from sdhci_add_host().  Also, fix regulator leaks in the error
> paths in sdhci_add_host().
>
> Signed-off-by: Andrew Bresticker <abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> ---
>  drivers/mmc/host/sdhci.c | 19 ++++++++++++++++---
>  1 file changed, 16 insertions(+), 3 deletions(-)

This appears to be an improvement on Mike Looijmans patch:

https://lkml.org/lkml/2014/4/7/34

The regulator_put() calls are appropriate but I wonder if we should
take this a step farther.  Ulf is sure to point out that
mmc_regulator_get_supply() can be used to get regulators (though it
does stuff the pointers in host->mmc->supply.vmmc/vqmmc instead of
host->vmmc/vqmmc).  However, that function doesn't put back the
reference to vmmc if the request for vqmmc returns EPROBE_DEFER.  If
it did, it believe it could be used here to simplify the error
handling as all the regulator checks would happen up front.  What do
you think?

-Tim

WARNING: multiple messages have this Message-ID (diff)
From: Tim Kryger <tim.kryger@linaro.org>
To: Andrew Bresticker <abrestic@chromium.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Chris Ball <chris@printf.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	linux-tegra@vger.kernel.org,
	ARM Kernel List <linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	mike.looijmans@topic.nl
Subject: Re: [PATCH 3/4] mmc: sdhci: defer probing on regulator_get_optional() failures
Date: Tue, 15 Apr 2014 12:03:49 -0700	[thread overview]
Message-ID: <CAAYSxhrmCbGLsu43mK15ParXHa_FJ9OVQiCPUdqyWEpTE=r1uw@mail.gmail.com> (raw)
In-Reply-To: <1397526163-20126-4-git-send-email-abrestic@chromium.org>

On Mon, Apr 14, 2014 at 6:42 PM, Andrew Bresticker
<abrestic@chromium.org> wrote:
> If regulator_get_optional() returns EPROBE_DEFER, it indicates
> that the regulator may show up later (e.g. the DT property is
> present but the corresponding regulator may not have probed).
> Instead of continuing without the regulator, return EPROBE_DEFER
> from sdhci_add_host().  Also, fix regulator leaks in the error
> paths in sdhci_add_host().
>
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> ---
>  drivers/mmc/host/sdhci.c | 19 ++++++++++++++++---
>  1 file changed, 16 insertions(+), 3 deletions(-)

This appears to be an improvement on Mike Looijmans patch:

https://lkml.org/lkml/2014/4/7/34

The regulator_put() calls are appropriate but I wonder if we should
take this a step farther.  Ulf is sure to point out that
mmc_regulator_get_supply() can be used to get regulators (though it
does stuff the pointers in host->mmc->supply.vmmc/vqmmc instead of
host->vmmc/vqmmc).  However, that function doesn't put back the
reference to vmmc if the request for vqmmc returns EPROBE_DEFER.  If
it did, it believe it could be used here to simplify the error
handling as all the regulator checks would happen up front.  What do
you think?

-Tim

WARNING: multiple messages have this Message-ID (diff)
From: tim.kryger@linaro.org (Tim Kryger)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] mmc: sdhci: defer probing on regulator_get_optional() failures
Date: Tue, 15 Apr 2014 12:03:49 -0700	[thread overview]
Message-ID: <CAAYSxhrmCbGLsu43mK15ParXHa_FJ9OVQiCPUdqyWEpTE=r1uw@mail.gmail.com> (raw)
In-Reply-To: <1397526163-20126-4-git-send-email-abrestic@chromium.org>

On Mon, Apr 14, 2014 at 6:42 PM, Andrew Bresticker
<abrestic@chromium.org> wrote:
> If regulator_get_optional() returns EPROBE_DEFER, it indicates
> that the regulator may show up later (e.g. the DT property is
> present but the corresponding regulator may not have probed).
> Instead of continuing without the regulator, return EPROBE_DEFER
> from sdhci_add_host().  Also, fix regulator leaks in the error
> paths in sdhci_add_host().
>
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> ---
>  drivers/mmc/host/sdhci.c | 19 ++++++++++++++++---
>  1 file changed, 16 insertions(+), 3 deletions(-)

This appears to be an improvement on Mike Looijmans patch:

https://lkml.org/lkml/2014/4/7/34

The regulator_put() calls are appropriate but I wonder if we should
take this a step farther.  Ulf is sure to point out that
mmc_regulator_get_supply() can be used to get regulators (though it
does stuff the pointers in host->mmc->supply.vmmc/vqmmc instead of
host->vmmc/vqmmc).  However, that function doesn't put back the
reference to vmmc if the request for vqmmc returns EPROBE_DEFER.  If
it did, it believe it could be used here to simplify the error
handling as all the regulator checks would happen up front.  What do
you think?

-Tim

  parent reply	other threads:[~2014-04-15 19:03 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15  1:42 [PATCH 0/4] Tegra SD/MMC fixes Andrew Bresticker
2014-04-15  1:42 ` Andrew Bresticker
2014-04-15  1:42 ` [PATCH 1/4] mmc: tegra: disable UHS modes Andrew Bresticker
2014-04-15  1:42   ` Andrew Bresticker
2014-04-15  1:42 ` [PATCH 2/4] mmc: tegra: fix reporting of base clock frequency Andrew Bresticker
2014-04-15  1:42   ` Andrew Bresticker
2014-04-15 18:25   ` Stephen Warren
2014-04-15 18:25     ` Stephen Warren
     [not found]     ` <534D797D.7030201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-04-15 19:36       ` Andrew Bresticker
2014-04-15 19:36         ` Andrew Bresticker
2014-04-15 19:36         ` Andrew Bresticker
     [not found] ` <1397526163-20126-1-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-04-15  1:42   ` [PATCH 3/4] mmc: sdhci: defer probing on regulator_get_optional() failures Andrew Bresticker
2014-04-15  1:42     ` Andrew Bresticker
2014-04-15  1:42     ` Andrew Bresticker
2014-04-15  6:06     ` Alexandre Courbot
2014-04-15  6:06       ` Alexandre Courbot
2014-04-15  6:06       ` Alexandre Courbot
2014-04-15 22:56       ` Andrew Bresticker
2014-04-15 22:56         ` Andrew Bresticker
2014-04-15 22:56         ` Andrew Bresticker
     [not found]     ` <1397526163-20126-4-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-04-15 18:28       ` Stephen Warren
2014-04-15 18:28         ` Stephen Warren
2014-04-15 18:28         ` Stephen Warren
     [not found]         ` <534D7A5D.9090707-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-04-15 19:59           ` Andrew Bresticker
2014-04-15 19:59             ` Andrew Bresticker
2014-04-15 19:59             ` Andrew Bresticker
2014-04-15 20:42             ` Russell King - ARM Linux
2014-04-15 20:42               ` Russell King - ARM Linux
2014-04-15 20:42               ` Russell King - ARM Linux
2014-04-15 19:03       ` Tim Kryger [this message]
2014-04-15 19:03         ` Tim Kryger
2014-04-15 19:03         ` Tim Kryger
     [not found]         ` <CAAYSxhrmCbGLsu43mK15ParXHa_FJ9OVQiCPUdqyWEpTE=r1uw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-15 19:44           ` Andrew Bresticker
2014-04-15 19:44             ` Andrew Bresticker
2014-04-15 19:44             ` Andrew Bresticker
2014-04-15  1:42   ` [PATCH 4/4] ARM: tegra: fix Venice2 VQMMC regulators Andrew Bresticker
2014-04-15  1:42     ` Andrew Bresticker
2014-04-15  1:42     ` Andrew Bresticker
2014-04-15 18:31     ` Stephen Warren
2014-04-15 18:31       ` Stephen Warren
2014-04-15 19:12       ` Chris Ball
2014-04-15 19:12         ` Chris Ball
     [not found]     ` <1397526163-20126-5-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-04-16  0:29       ` Andrew Bresticker
2014-04-16  0:29         ` Andrew Bresticker
2014-04-16  0:29         ` Andrew Bresticker
2014-04-16 16:19         ` Stephen Warren
2014-04-16 16:19           ` Stephen Warren
2014-04-16 16:19           ` Stephen Warren
     [not found]           ` <534EAD91.90704-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-04-16 20:24             ` Andrew Bresticker
2014-04-16 20:24               ` Andrew Bresticker
2014-04-16 20:24               ` Andrew Bresticker
2014-04-16 23:08 ` [PATCH v2 0/3] Tegra SD/MMC fixes Andrew Bresticker
2014-04-16 23:08   ` Andrew Bresticker
2014-04-16 23:08   ` Andrew Bresticker
2014-04-16 23:08   ` [PATCH v2 1/3] mmc: tegra: disable UHS modes Andrew Bresticker
2014-04-16 23:08     ` Andrew Bresticker
2014-05-20 17:25     ` Stephen Warren
2014-05-20 17:25       ` Stephen Warren
2014-05-21  0:43       ` Chris Ball
2014-05-21  0:43         ` Chris Ball
2014-05-22 11:00         ` Ulf Hansson
2014-05-22 11:00           ` Ulf Hansson
2014-05-22 11:00           ` Ulf Hansson
2014-05-22 15:25           ` Andrew Bresticker
2014-05-22 15:25             ` Andrew Bresticker
2014-05-22 15:25             ` Andrew Bresticker
     [not found]   ` <1397689719-28882-1-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-04-16 23:08     ` [PATCH v2 2/3] mmc: tegra: fix reporting of base clock frequency Andrew Bresticker
2014-04-16 23:08       ` Andrew Bresticker
2014-04-16 23:08       ` Andrew Bresticker
2014-04-16 23:08   ` [PATCH v2 3/3] ARM: tegra: fix Venice2 SD card VQMMC supply Andrew Bresticker
2014-04-16 23:08     ` Andrew Bresticker
2014-04-16 23:16     ` Stephen Warren
2014-04-16 23:16       ` Stephen Warren

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='CAAYSxhrmCbGLsu43mK15ParXHa_FJ9OVQiCPUdqyWEpTE=r1uw@mail.gmail.com' \
    --to=tim.kryger-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=chris-OsFVWbfNK3isTnJN9+BGXg@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-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mike.looijmans-Oq418RWZeHk@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-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.