diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index febe58f6f4..0e5b1c84cf 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -81,6 +81,14 @@ config CHARGE_ANIMATION help This adds a simple function for charge animation display. +config ROCKCHIP_PM + bool "Enable Rockchip power manager for charge animation" + depends on CHARGE_ANIMATION + default y + help + This adds power manage control of devices for low power + during system suspend in charge animation. + config AXP_DCDC1_VOLT int "axp pmic dcdc1 voltage" depends on AXP221_POWER || AXP809_POWER || AXP818_POWER diff --git a/drivers/power/Makefile b/drivers/power/Makefile index a80457bc37..0ad93a981f 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -13,6 +13,7 @@ obj-$(CONFIG_AXP221_POWER) += axp221.o obj-$(CONFIG_AXP809_POWER) += axp809.o obj-$(CONFIG_AXP818_POWER) += axp818.o obj-$(CONFIG_CHARGE_ANIMATION) += charge_animation.o +obj-$(CONFIG_ROCKCHIP_PM) += rockchip_pm.o obj-$(CONFIG_EXYNOS_TMU) += exynos-tmu.o obj-$(CONFIG_FTPMU010_POWER) += ftpmu010.o obj-$(CONFIG_SY8106A_POWER) += sy8106a.o diff --git a/drivers/power/charge_animation.c b/drivers/power/charge_animation.c index b462e4a84c..65a1c67133 100644 --- a/drivers/power/charge_animation.c +++ b/drivers/power/charge_animation.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -122,12 +123,16 @@ static int system_suspend_enter(struct charge_animation_pdata *pdata) putc('2'); irqs_suspend(); putc('3'); + device_suspend(); + putc('4'); putc('\n'); /* Trap into ATF for low power mode */ cpu_suspend(0, psci_system_suspend); putc('\n'); + putc('4'); + device_resume(); putc('3'); irqs_resume(); putc('2'); diff --git a/drivers/power/rockchip_pm.c b/drivers/power/rockchip_pm.c new file mode 100644 index 0000000000..2ec4e78cdc --- /dev/null +++ b/drivers/power/rockchip_pm.c @@ -0,0 +1,20 @@ +/* + * (C) Copyright 2018 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include + +int device_suspend(void) +{ + return 0; +} + +int device_resume(void) +{ + return 0; +} diff --git a/include/power/rockchip_pm.h b/include/power/rockchip_pm.h new file mode 100644 index 0000000000..65f008b2e1 --- /dev/null +++ b/include/power/rockchip_pm.h @@ -0,0 +1,13 @@ +/* + * (C) Copyright 2018 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _ROCKCHIP_PM_H_ +#define _ROCKCHIP_PM_H_ + +int device_suspend(void); +int device_resume(void); + +#endif