diff options
| author | João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com> | 2025-04-20 15:28:02 -0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-27 11:08:43 +0100 |
| commit | 278a92b8746309b7c6db4e9b57ef61e9724b7375 (patch) | |
| tree | ba265c6b36102c6c7bd2e4324a5076f0d8827ac8 /drivers/regulator | |
| parent | 420f6942f109a68d20a9b372735daf2e20b06b39 (diff) | |
| download | linux-278a92b8746309b7c6db4e9b57ef61e9724b7375.tar.gz linux-278a92b8746309b7c6db4e9b57ef61e9724b7375.tar.bz2 linux-278a92b8746309b7c6db4e9b57ef61e9724b7375.zip | |
regulator: max20086: Change enable gpio to optional
commit e8ac7336dd62f0443a675ed80b17f0f0e6846e20 upstream.
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>
Link: https://patch.msgid.link/20250420-fix-max20086-v1-2-8cc9ee0d5a08@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/regulator')
| -rw-r--r-- | drivers/regulator/max20086-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/max20086-regulator.c b/drivers/regulator/max20086-regulator.c index deb1bae5a3e5..8fcca52026bf 100644 --- a/drivers/regulator/max20086-regulator.c +++ b/drivers/regulator/max20086-regulator.c @@ -264,7 +264,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); |
