Skip to content

Commit e8ac733

Browse files
JPSGoncalvesbroonie
authored andcommitted
regulator: max20086: Change enable gpio to optional
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: [email protected] Fixes: bfff546 ("regulator: Add MAX20086-MAX20089 driver") Signed-off-by: João Paulo Gonçalves <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 71406b6 commit e8ac733

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/max20086-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static int max20086_i2c_probe(struct i2c_client *i2c)
259259
* shutdown.
260260
*/
261261
flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
262-
chip->ena_gpiod = devm_gpiod_get(chip->dev, "enable", flags);
262+
chip->ena_gpiod = devm_gpiod_get_optional(chip->dev, "enable", flags);
263263
if (IS_ERR(chip->ena_gpiod)) {
264264
ret = PTR_ERR(chip->ena_gpiod);
265265
dev_err(chip->dev, "Failed to get enable GPIO: %d\n", ret);

0 commit comments

Comments
 (0)