Skip to content

Commit

Permalink
drivers: regulator: npm1300: Fixed LDSW GPIO control
Browse files Browse the repository at this point in the history
The load switch / LDO pin configuration function now
correctly configures the associated GPIO pin.

Signed-off-by: Andy Sinclair <[email protected]>
  • Loading branch information
aasinclair authored and carlescufi committed Nov 9, 2023
1 parent 488f56c commit 0cbe029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/regulator_npm1300.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0cbe029

Please sign in to comment.