Skip to content

Commit 6cdd5b0

Browse files
sherryzongsre
authored andcommitted
power: reset: sc27xx: Power off the external subsystems' connection
When powering off the whole system, we should power off some external subsystems' connection firstly, otherwise some external subsystems will hold some power and result in powering down abnormally. Signed-off-by: Sherry Zong <[email protected]> Signed-off-by: Baolin Wang <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 9027f61 commit 6cdd5b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/power/reset/sc27xx-poweroff.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
#define SC27XX_PWR_PD_HW 0xc2c
1515
#define SC27XX_PWR_OFF_EN BIT(0)
16+
#define SC27XX_SLP_CTRL 0xdf0
17+
#define SC27XX_LDO_XTL_EN BIT(3)
1618

1719
static struct regmap *regmap;
1820

@@ -40,6 +42,9 @@ static struct syscore_ops poweroff_syscore_ops = {
4042

4143
static void sc27xx_poweroff_do_poweroff(void)
4244
{
45+
/* Disable the external subsys connection's power firstly */
46+
regmap_write(regmap, SC27XX_SLP_CTRL, SC27XX_LDO_XTL_EN);
47+
4348
regmap_write(regmap, SC27XX_PWR_PD_HW, SC27XX_PWR_OFF_EN);
4449
}
4550

0 commit comments

Comments
 (0)