Skip to content

Commit 1d8ef88

Browse files
seov-nordickartben
authored andcommitted
drivers: npm2100: remove SHPHLD button reconfiguration
Do not reconfigure the SHPHLD button behavior by writing to the sticky register in drivers: mfd, regulator: npm2100. This is removed to avoid unexpected behaviors during or after the ship or hibernation modes. Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
1 parent 5aeae41 commit 1d8ef88

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

drivers/mfd/mfd_npm2100.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -355,17 +355,6 @@ int mfd_npm2100_hibernate(const struct device *dev, uint32_t time_ms, bool pass_
355355
}
356356
}
357357

358-
/* Ensure shiphold button is enabled so that wakeup will work */
359-
ret = i2c_reg_write_byte_dt(&config->i2c, RESET_WRITESTICKY, 0);
360-
if (ret < 0) {
361-
return ret;
362-
}
363-
364-
ret = i2c_reg_write_byte_dt(&config->i2c, RESET_STROBESTICKY, 1U);
365-
if (ret < 0) {
366-
return ret;
367-
}
368-
369358
return i2c_reg_write_byte_dt(
370359
&config->i2c, pass_through ? HIBERNATE_TASKS_HIBERPT : HIBERNATE_TASKS_HIBER, 1U);
371360
}

drivers/regulator/regulator_npm2100.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -642,18 +642,6 @@ static int regulator_npm2100_ship_mode(const struct device *dev)
642642
{
643643
const struct regulator_npm2100_pconfig *pconfig = dev->config;
644644

645-
/* Ensure shiphold button is enabled so that wakeup will work */
646-
int ret = i2c_reg_write_byte_dt(&pconfig->i2c, RESET_WRITESTICKY, 0);
647-
648-
if (ret < 0) {
649-
return ret;
650-
}
651-
652-
ret = i2c_reg_write_byte_dt(&pconfig->i2c, RESET_STROBESTICKY, 1U);
653-
if (ret < 0) {
654-
return ret;
655-
}
656-
657645
return i2c_reg_write_byte_dt(&pconfig->i2c, SHIP_TASK_SHIP, 1U);
658646
}
659647

0 commit comments

Comments
 (0)