Linux Documentation
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/6] hwmon: (pmbus/max20830): add support for enable GPIO
Date: Mon, 29 Jun 2026 20:50:02 -0700	[thread overview]
Message-ID: <836b833e-e503-4cbb-92f7-3574f3fb430f@roeck-us.net> (raw)
In-Reply-To: <20260630-dev-max20830c-v1-2-a02786bde470@analog.com>

On 6/29/26 19:46, Alexis Czezar Torreno wrote:
> Add support for the GPIO controlled EN pin. The EN pin is asserted high
> for device to operate.
> 
> Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>
> ---
>   drivers/hwmon/pmbus/max20830.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/hwmon/pmbus/max20830.c b/drivers/hwmon/pmbus/max20830.c
> index cb2c23672166d641852199ca07eb716924f4f286..cb3a39d747edee3aefb0fb4051ef957436b3c15b 100644
> --- a/drivers/hwmon/pmbus/max20830.c
> +++ b/drivers/hwmon/pmbus/max20830.c
> @@ -6,6 +6,7 @@
>    */
>   
>   #include <linux/errno.h>
> +#include <linux/gpio/consumer.h>
>   #include <linux/i2c.h>
>   #include <linux/mod_devicetable.h>
>   #include <linux/module.h>
> @@ -29,8 +30,14 @@ static struct pmbus_driver_info max20830_info = {
>   static int max20830_probe(struct i2c_client *client)
>   {
>   	u8 buf[I2C_SMBUS_BLOCK_MAX + 1] = {};
> +	struct gpio_desc *enable_gpio;
>   	int ret;
>   
> +	enable_gpio = devm_gpiod_get_optional(&client->dev, "enable", GPIOD_OUT_HIGH);
> +	if (IS_ERR(enable_gpio))
> +		return dev_err_probe(&client->dev, PTR_ERR(enable_gpio),
> +				     "Failed to get enable GPIO\n");
> +

The above code gets the gpio reference, and then it doesn't do anything
with it. What exactly is the point of this exercise ? Where is the
chip actually enabled ?

Do you have an actual customer with such a set-up or is this
"just in case" ? Have you tested this code to ensure that the chip
is actually enabled in this setup ?

If there is indeed a use case where a customer indeed connects the
enable pin to a gpio output, wouldn't that same customer also want
to connect the "pgood" output to a gpio pin ? And what about
the LDOIN pin ? Shouldn't that be connected to a power supply ?

Guenter


  reply	other threads:[~2026-06-30  3:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30  2:46 [PATCH 0/6] Add support for MAX20830C and MAX20840C step-down DC-DC switching regulator Alexis Czezar Torreno
2026-06-30  2:46 ` [PATCH 1/6] dt-bindings: hwmon: (pmbus/max20830): add enable-gpios property Alexis Czezar Torreno
2026-06-30  7:26   ` Krzysztof Kozlowski
2026-06-30  8:07     ` Torreno, Alexis Czezar
2026-06-30 15:48       ` Guenter Roeck
2026-07-01  1:16         ` Torreno, Alexis Czezar
2026-06-30  2:46 ` [PATCH 2/6] hwmon: (pmbus/max20830): add support for enable GPIO Alexis Czezar Torreno
2026-06-30  3:50   ` Guenter Roeck [this message]
2026-06-30  4:51     ` Guenter Roeck
2026-06-30  8:07     ` Torreno, Alexis Czezar
2026-06-30  2:46 ` [PATCH 3/6] dt-bindings: hwmon: (pmbus/max20830): add VOUT feedback resistor properties Alexis Czezar Torreno
2026-06-30  7:39   ` Krzysztof Kozlowski
2026-06-30  2:46 ` [PATCH 4/6] hwmon: (pmbus/max20830): add VOUT feedback resistor scaling support Alexis Czezar Torreno
2026-06-30  4:53   ` Guenter Roeck
2026-06-30  8:07     ` Torreno, Alexis Czezar
2026-06-30 15:34       ` Guenter Roeck
2026-07-01  1:16         ` Torreno, Alexis Czezar
2026-06-30  2:46 ` [PATCH 5/6] dt-bindings: hwmon: (pmbus/max20830): add max20830c and max20840c support Alexis Czezar Torreno
2026-06-30  7:41   ` Krzysztof Kozlowski
2026-06-30  8:07     ` Torreno, Alexis Czezar
2026-06-30 15:06       ` Guenter Roeck
2026-06-30  2:46 ` [PATCH 6/6] hwmon: (pmbus/max20830): add support for max20830c and max20840c Alexis Czezar Torreno
2026-06-30  3:43   ` Guenter Roeck
2026-06-30  8:07     ` Torreno, Alexis Czezar
2026-06-30 15:04       ` Guenter Roeck
2026-07-02  2:50         ` Torreno, Alexis Czezar
2026-07-02  4:43           ` Guenter Roeck
2026-07-02  7:28             ` Torreno, Alexis Czezar

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=836b833e-e503-4cbb-92f7-3574f3fb430f@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=alexisczezar.torreno@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.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