Re: [PATCH RFC 3/4] Input: gpio-keys - add regulator to gpio_keys

From: Griffin Kroah-Hartman

Date: Fri May 15 2026 - 07:48:36 EST


On 5/8/26 15:44, Mark Brown wrote:
On Fri, May 08, 2026 at 02:53:15PM +0200, Griffin Kroah-Hartman wrote:

+ if (fwnode_property_present(child, "vdd-supply")) {
+ button->regulator = devm_fwnode_regulator_get_optional(dev, child, "vdd");
+ if (IS_ERR(button->regulator)) {

As well as the issue I mentioned on a prior thread with this assigning a
non-physical "vdd" name to the single supply that these components can
have (which has had issues in the past

Our Hall Effect sensor IC does have a named "vdd" pin, but we are totally open to changing this to power-supply or whatever best follows the standard.

painful) the fact that this is fwnode means that this opens up support
for using this with ACPI which is very problematic given that ACPI has a
strong model of how regulators should work which is that they should not
be OS visible at all.

Would it be more appropriate to drop the devm_fwnode_regulator_get() and replace it with a type-casted devm_of_regulator_get()?

That probably needs more addressing in the prior regulator patch, that needs a bit more motivation and discussion about the issues with trying
to do a regulator interface firmware neutrally.
Thank you for your response and feedback!