From: Jens Axboe <axboe@kernel.dk>
To: Mark Brown <broonie@kernel.org>, Hans de Goede <hdegoede@redhat.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] ata: libahci_platform: Fix regulator_get_optional() misuse
Date: Fri, 25 Oct 2019 14:22:33 -0600 [thread overview]
Message-ID: <4534ef28-5192-cce3-62d8-db387eb87abc@kernel.dk> (raw)
In-Reply-To: <20191016105105.7791-1-broonie@kernel.org>
On 10/16/19 4:51 AM, Mark Brown wrote:
> This driver is using regulator_get_optional() to handle all the supplies
> that it handles, and only ever enables and disables all supplies en masse
> without ever doing any other configuration of the device to handle missing
> power. These are clear signs that the API is being misused - it should only
> be used for supplies that may be physically absent from the system and in
> these cases the hardware usually needs different configuration if the
> supply is missing. Instead use normal regualtor_get(), if the supply is
> not described in DT then the framework will substitute a dummy regulator in
> so no special handling is needed by the consumer driver.
>
> In the case of the PHY regulator the handling in the driver is a hack to
> deal with integrated PHYs; the supplies are only optional in the sense
> that that there's some confusion in the code about where they're bound to.
> From a code point of view they function exactly as normal supplies so can
> be treated as such. It'd probably be better to model this by instantiating
> a PHY object for integrated PHYs.
Applied, thanks.
--
Jens Axboe
next prev parent reply other threads:[~2019-10-25 20:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 10:51 [PATCH] ata: libahci_platform: Fix regulator_get_optional() misuse Mark Brown
2019-10-17 12:07 ` Hans de Goede
2019-10-25 20:22 ` Jens Axboe [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-09-02 17:22 Mark Brown
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=4534ef28-5192-cce3-62d8-db387eb87abc@kernel.dk \
--to=axboe@kernel.dk \
--cc=broonie@kernel.org \
--cc=hdegoede@redhat.com \
--cc=linux-ide@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).