From: Guenter Roeck <linux@roeck-us.net>
To: Mark Brown <broonie@kernel.org>,
Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Jean Delvare <jdelvare@suse.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] hwmon: (gpio-fan) Add regulator support
Date: Sun, 2 Mar 2025 09:01:54 -0800 [thread overview]
Message-ID: <b1133989-368a-4933-b326-43edbf179d5c@roeck-us.net> (raw)
In-Reply-To: <0c82f6dc-4f5b-4787-9e43-4990681ea6a2@sirena.org.uk>
On 2/10/25 07:26, Mark Brown wrote:
> On Mon, Feb 10, 2025 at 03:59:33PM +0100, Alexander Stein wrote:
>
>> + fan_data->supply = devm_regulator_get_optional(dev, "fan");
>> + if (IS_ERR(fan_data->supply)) {
>> + err = PTR_ERR(fan_data->supply);
>
> Unless fans are expected to operate without power (which does seem
> unlikely) the supply should really be mandatory.
Agreed. devm_regulator_get() returns a dummy regulator of none is
configured in devicetree, so this should be fine. Worse,
regulator_get_optional() returns an error pointer if regulator
support is disabled, while devm_regulator_get() returns NULL.
Guenter
prev parent reply other threads:[~2025-03-02 17:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 14:59 [PATCH 0/5] gpio-fan: " Alexander Stein
2025-02-10 14:59 ` [PATCH 1/5] dt-bindings: hwmon: gpio-fan: Add optional " Alexander Stein
2025-02-13 8:58 ` Krzysztof Kozlowski
2025-03-02 16:51 ` Guenter Roeck
2025-02-10 14:59 ` [PATCH 2/5] hwmon: (gpio-fan) Add missing mutex locks Alexander Stein
2025-03-02 16:52 ` Guenter Roeck
2025-02-10 14:59 ` [PATCH 3/5] hwmon: (gpio-fan) Ensure lock is held during set_fan_speed() Alexander Stein
2025-03-02 16:54 ` Guenter Roeck
2025-02-10 14:59 ` [PATCH 4/5] hwmon: (gpio-fan) Remove unnecessary comment Alexander Stein
2025-03-02 16:55 ` Guenter Roeck
2025-02-10 14:59 ` [PATCH 5/5] hwmon: (gpio-fan) Add regulator support Alexander Stein
2025-02-10 15:26 ` Mark Brown
2025-03-02 17:01 ` Guenter Roeck [this message]
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=b1133989-368a-4933-b326-43edbf179d5c@roeck-us.net \
--to=linux@roeck-us.net \
--cc=alexander.stein@ew.tq-group.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@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
all inboxes | Powered by JetHome®