drivers: regulator: npm1300: Fixed LDSW GPIO control

The load switch / LDO pin configuration function now
correctly configures the associated GPIO pin.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
This commit is contained in:
Andy Sinclair 2023-11-08 11:00:08 +00:00 committed by Carles Cufí
parent 488f56c033
commit 0cbe0298cb

View file

@ -439,7 +439,7 @@ static int regulator_npm1300_set_ldsw_pin_ctrl(const struct device *dev, uint8_t
ctrl = (pin + 1U) | (inv << 3U);
return mfd_npm1300_reg_write(config->mfd, LDSW_BASE, LDSW_OFFSET_GPISEL + chan, type);
return mfd_npm1300_reg_write(config->mfd, LDSW_BASE, LDSW_OFFSET_GPISEL + chan, ctrl);
}
int regulator_npm1300_set_pin_ctrl(const struct device *dev, const struct gpio_dt_spec *spec,