Skip to content

Commit 6eda124

Browse files
CkovMknashif
authored andcommitted
drivers: gpio: adp5585: fix wrong reg during pin configure
The ADP5585_GPO_OUT_MODE_A is used when configuring initial output during pin configuration, causing pins configured HIGH is incorrectly configured as open-drain. Replacing the reg with ADP5585_GPO_DATA_OUT fixes the issue. Signed-off-by: Chekhov Ma <[email protected]> (cherry picked from commit c87900a)
1 parent f23e4e1 commit 6eda124

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpio/gpio_adp5585.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ static int gpio_adp5585_config(const struct device *dev, gpio_pin_t pin, gpio_fl
143143
data->output |= BIT(pin);
144144
}
145145
if (bank == 0) {
146-
/* reg_value for ADP5585_GPO_OUT_MODE */
146+
/* reg_value for ADP5585_GPO_DATA_OUT */
147147
reg_value = (uint8_t)data->output;
148148
} else {
149-
/* reg_value for ADP5585_GPO_OUT_MODE */
149+
/* reg_value for ADP5585_GPO_DATA_OUT */
150150
reg_value = (uint8_t)(data->output >> 8);
151151
}
152152
ret = i2c_reg_write_byte_dt(&parent_cfg->i2c_bus,
153-
ADP5585_GPO_OUT_MODE_A + bank,
153+
ADP5585_GPO_DATA_OUT_A + bank,
154154
reg_value);
155155
if (ret != 0) {
156156
goto out;

0 commit comments

Comments
 (0)