Commit 1d8ef88b authored by Sergei Ovchinnikov's avatar Sergei Ovchinnikov Committed by Benjamin Cabé
Browse files

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: default avatarSergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
parent 5aeae417
Loading
Loading
Loading
Loading
+0 −11
Changes for drivers/mfd/mfd_npm2100.c: 0 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -355,17 +355,6 @@ int mfd_npm2100_hibernate(const struct device *dev, uint32_t time_ms, bool pass_
		}
	}

	/* Ensure shiphold button is enabled so that wakeup will work */
	ret = i2c_reg_write_byte_dt(&config->i2c, RESET_WRITESTICKY, 0);
	if (ret < 0) {
		return ret;
	}

	ret = i2c_reg_write_byte_dt(&config->i2c, RESET_STROBESTICKY, 1U);
	if (ret < 0) {
		return ret;
	}

	return i2c_reg_write_byte_dt(
		&config->i2c, pass_through ? HIBERNATE_TASKS_HIBERPT : HIBERNATE_TASKS_HIBER, 1U);
}
+0 −12
Changes for drivers/regulator/regulator_npm2100.c: 0 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -642,18 +642,6 @@ static int regulator_npm2100_ship_mode(const struct device *dev)
{
	const struct regulator_npm2100_pconfig *pconfig = dev->config;

	/* Ensure shiphold button is enabled so that wakeup will work */
	int ret = i2c_reg_write_byte_dt(&pconfig->i2c, RESET_WRITESTICKY, 0);

	if (ret < 0) {
		return ret;
	}

	ret = i2c_reg_write_byte_dt(&pconfig->i2c, RESET_STROBESTICKY, 1U);
	if (ret < 0) {
		return ret;
	}

	return i2c_reg_write_byte_dt(&pconfig->i2c, SHIP_TASK_SHIP, 1U);
}