From: Heiko Stuebner <heiko@sntech.de>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Shawn Lin <shawn.lin@rock-chips.com>,
Andrew Murray <andrew.murray@arm.com>,
Vidya Sagar <vidyas@nvidia.com>,
linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] PCI: rockchip: Properly handle optional regulators
Date: Wed, 28 Aug 2019 20:15:15 +0200 [thread overview]
Message-ID: <1801971.F4Ds6vmZ8I@phil> (raw)
In-Reply-To: <20190828150737.30285-1-thierry.reding@gmail.com>
Am Mittwoch, 28. August 2019, 17:07:37 CEST schrieb Thierry Reding:
> From: Thierry Reding <treding@nvidia.com>
>
> regulator_get_optional() can fail for a number of reasons besides probe
> deferral. It can for example return -ENOMEM if it runs out of memory as
> it tries to allocate data structures. Propagating only -EPROBE_DEFER is
> problematic because it results in these legitimately fatal errors being
> treated as "regulator not specified in DT".
>
> What we really want is to ignore the optional regulators only if they
> have not been specified in DT. regulator_get_optional() returns -ENODEV
> in this case, so that's the special case that we need to handle. So we
> propagate all errors, except -ENODEV, so that real failures will still
> cause the driver to fail probe.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
on a rk3399-gru-scarlet with no 12v regulator defined and pcie-wifi
keeping on working with this patch:
Tested-by: Heiko Stuebner <heiko@sntech.de>
Change itself also looks correct,
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Thanks for doing that cleanup
Heiko
WARNING: multiple messages have this Message-ID (diff)
From: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
To: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Lorenzo Pieralisi
<lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>,
linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
Vidya Sagar <vidyas-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Andrew Murray <andrew.murray-5wv7dgnIgG8@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] PCI: rockchip: Properly handle optional regulators
Date: Wed, 28 Aug 2019 20:15:15 +0200 [thread overview]
Message-ID: <1801971.F4Ds6vmZ8I@phil> (raw)
In-Reply-To: <20190828150737.30285-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Am Mittwoch, 28. August 2019, 17:07:37 CEST schrieb Thierry Reding:
> From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> regulator_get_optional() can fail for a number of reasons besides probe
> deferral. It can for example return -ENOMEM if it runs out of memory as
> it tries to allocate data structures. Propagating only -EPROBE_DEFER is
> problematic because it results in these legitimately fatal errors being
> treated as "regulator not specified in DT".
>
> What we really want is to ignore the optional regulators only if they
> have not been specified in DT. regulator_get_optional() returns -ENODEV
> in this case, so that's the special case that we need to handle. So we
> propagate all errors, except -ENODEV, so that real failures will still
> cause the driver to fail probe.
>
> Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
on a rk3399-gru-scarlet with no 12v regulator defined and pcie-wifi
keeping on working with this patch:
Tested-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Change itself also looks correct,
Reviewed-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Thanks for doing that cleanup
Heiko
WARNING: multiple messages have this Message-ID (diff)
From: Heiko Stuebner <heiko@sntech.de>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
linux-pci@vger.kernel.org, Shawn Lin <shawn.lin@rock-chips.com>,
Vidya Sagar <vidyas@nvidia.com>,
linux-rockchip@lists.infradead.org,
Bjorn Helgaas <bhelgaas@google.com>,
Andrew Murray <andrew.murray@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] PCI: rockchip: Properly handle optional regulators
Date: Wed, 28 Aug 2019 20:15:15 +0200 [thread overview]
Message-ID: <1801971.F4Ds6vmZ8I@phil> (raw)
In-Reply-To: <20190828150737.30285-1-thierry.reding@gmail.com>
Am Mittwoch, 28. August 2019, 17:07:37 CEST schrieb Thierry Reding:
> From: Thierry Reding <treding@nvidia.com>
>
> regulator_get_optional() can fail for a number of reasons besides probe
> deferral. It can for example return -ENOMEM if it runs out of memory as
> it tries to allocate data structures. Propagating only -EPROBE_DEFER is
> problematic because it results in these legitimately fatal errors being
> treated as "regulator not specified in DT".
>
> What we really want is to ignore the optional regulators only if they
> have not been specified in DT. regulator_get_optional() returns -ENODEV
> in this case, so that's the special case that we need to handle. So we
> propagate all errors, except -ENODEV, so that real failures will still
> cause the driver to fail probe.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
on a rk3399-gru-scarlet with no 12v regulator defined and pcie-wifi
keeping on working with this patch:
Tested-by: Heiko Stuebner <heiko@sntech.de>
Change itself also looks correct,
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Thanks for doing that cleanup
Heiko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-08-28 18:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 15:07 [PATCH] PCI: rockchip: Properly handle optional regulators Thierry Reding
2019-08-28 15:07 ` Thierry Reding
2019-08-28 15:07 ` Thierry Reding
2019-08-28 15:32 ` Andrew Murray
2019-08-28 15:32 ` Andrew Murray
2019-08-28 15:32 ` Andrew Murray
2019-08-28 15:41 ` Thierry Reding
2019-08-28 15:41 ` Thierry Reding
2019-08-28 15:41 ` Thierry Reding
2019-08-28 18:15 ` Heiko Stuebner [this message]
2019-08-28 18:15 ` Heiko Stuebner
2019-08-28 18:15 ` Heiko Stuebner
2019-08-29 2:31 ` [PATCH] PCI: rockchip: Properly handle optional regulators【请注意,邮件由linux-rockchip-bounces+shawn.lin=rock-chips.com@lists.infradead.org代发】 Shawn Lin
2019-08-29 2:31 ` Shawn Lin
2019-08-29 2:31 ` Shawn Lin
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=1801971.F4Ds6vmZ8I@phil \
--to=heiko@sntech.de \
--cc=andrew.murray@arm.com \
--cc=bhelgaas@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=shawn.lin@rock-chips.com \
--cc=thierry.reding@gmail.com \
--cc=vidyas@nvidia.com \
/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.