From: "João Paulo Gonçalves" <jpaulo.silvagoncalves@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Watson Chow <watson.chow@avnet.com>
Cc: linux-kernel@vger.kernel.org,
"João Paulo Gonçalves" <jpaulo.silvagoncalves@gmail.com>,
stable@vger.kernel.org
Subject: [PATCH 2/2] regulator: max20086: Change enable gpio to optional
Date: Sun, 20 Apr 2025 15:28:02 -0300 [thread overview]
Message-ID: <20250420-fix-max20086-v1-2-8cc9ee0d5a08@gmail.com> (raw)
In-Reply-To: <20250420-fix-max20086-v1-0-8cc9ee0d5a08@gmail.com>
The enable pin can be configured as always enabled by the hardware. Make
the enable gpio request optional so the driver doesn't fail to probe
when `enable-gpios` property is not present in the device tree.
Cc: stable@vger.kernel.org
Fixes: bfff546aae50 ("regulator: Add MAX20086-MAX20089 driver")
Signed-off-by: João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com>
---
drivers/regulator/max20086-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/max20086-regulator.c b/drivers/regulator/max20086-regulator.c
index f8081e54815d5045368a43791328b3327cf0b75f..62e9119f446c7a22be9947fa4aafa0c0401d9f12 100644
--- a/drivers/regulator/max20086-regulator.c
+++ b/drivers/regulator/max20086-regulator.c
@@ -259,7 +259,7 @@ static int max20086_i2c_probe(struct i2c_client *i2c)
* shutdown.
*/
flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
- chip->ena_gpiod = devm_gpiod_get(chip->dev, "enable", flags);
+ chip->ena_gpiod = devm_gpiod_get_optional(chip->dev, "enable", flags);
if (IS_ERR(chip->ena_gpiod)) {
ret = PTR_ERR(chip->ena_gpiod);
dev_err(chip->dev, "Failed to get enable GPIO: %d\n", ret);
--
2.43.0
next prev parent reply other threads:[~2025-04-20 18:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-20 18:28 [PATCH 0/2] regulator: max20086: Fixes chip id and enable gpio João Paulo Gonçalves
2025-04-20 18:28 ` [PATCH 1/2] regulator: max20086: Fix MAX200086 chip id João Paulo Gonçalves
2025-04-20 18:28 ` João Paulo Gonçalves [this message]
2025-04-23 13:49 ` [PATCH 0/2] regulator: max20086: Fixes chip id and enable gpio 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=20250420-fix-max20086-v1-2-8cc9ee0d5a08@gmail.com \
--to=jpaulo.silvagoncalves@gmail.com \
--cc=broonie@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=watson.chow@avnet.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 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®