mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
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: stable@vger.kernel.org
Fixes: bfff546aae ("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>
This commit is contained in:
parent
71406b6d11
commit
e8ac7336dd
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user