Skip to contentSkip to conversation

mfd: tps65910: Properly disable the power on state

PATCH New Robert Yang 1 participant 1 message Feb 28, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: tps65910: Properly disable the power on state

In the tps65910/1 datasheets under "Device POWER ON Disable Conditions". There are four conditions which can disable power on:
Long press interrupt (PWRON_LP_IT) OR thermal trip OR DEV_OFF bit OR DEV_OFF_RST bit.

The Ouya game console has TPS65911. Before this patch the device will not power off through the pm_power_off call. The power light stays on and the device heatsink is warm. Long pressing the power button can power off the device. After this patch the device powers off correctly when calling power off through userspace software.

---
 drivers/mfd/tps65910.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/mfd/tps65910.c +6 -2
index aa3d472a10ff..c067dcacbe61 100644
@@ -445,8 +445,12 @@ static void tps65910_power_off(void)
 			DEVCTRL_PWR_OFF_MASK) < 0)
 		return;
 
-	tps65910_reg_clear_bits(tps65910, TPS65910_DEVCTRL,
-			DEVCTRL_DEV_ON_MASK);
+	if (tps65910_reg_clear_bits(tps65910, TPS65910_DEVCTRL,
+			DEVCTRL_DEV_ON_MASK) < 0)
+		return;
+
+	tps65910_reg_set_bits(tps65910, TPS65910_DEVCTRL,
+		DEVCTRL_DEV_OFF_MASK);
 }
 
 static int tps65910_i2c_probe(struct i2c_client *i2c,
Signature · 1 line
2.17.1