+static __sramdata u32 rkpm_pwm_duty0;
+static __sramdata u32 rkpm_pwm_duty1;
+static __sramdata u32 rkpm_pwm_duty2;
+#define PWM_VOLTAGE 0x600
+
+void PIE_FUNC(pwm_regulator_suspend)(void)
+{
+ if (rkpm_chk_sram_ctrbit(RKPM_CTR_VOL_PWM0)) {
+ rkpm_pwm_duty0 = readl_relaxed(RK_PWM_VIRT + 0x08);
+ writel_relaxed(PWM_VOLTAGE, RK_PWM_VIRT + 0x08);
+ }
+
+ if (rkpm_chk_sram_ctrbit(RKPM_CTR_VOL_PWM1)) {
+ rkpm_pwm_duty1 = readl_relaxed(RK_PWM_VIRT + 0x18);
+ writel_relaxed(PWM_VOLTAGE, RK_PWM_VIRT + 0x18);
+ }
+
+ if (rkpm_chk_sram_ctrbit(RKPM_CTR_VOL_PWM2)) {
+ FUNC(sram_printch)('p');
+ FUNC(sram_printch)('o');
+ FUNC(sram_printch)('l');
+ rkpm_pwm_duty2 = readl_relaxed(RK_PWM_VIRT + 0x28);
+ writel_relaxed(PWM_VOLTAGE, RK_PWM_VIRT + 0x28);
+ }
+ rkpm_udelay(30);
+}
+
+void PIE_FUNC(pwm_regulator_resume)(void)
+{
+ rkpm_udelay(30);
+
+
+ if (rkpm_chk_sram_ctrbit(RKPM_CTR_VOL_PWM0))
+ writel_relaxed(rkpm_pwm_duty0, RK_PWM_VIRT + 0x08);
+
+ if (rkpm_chk_sram_ctrbit(RKPM_CTR_VOL_PWM1))
+ writel_relaxed(rkpm_pwm_duty1, RK_PWM_VIRT + 0x18);
+
+ if (rkpm_chk_sram_ctrbit(RKPM_CTR_VOL_PWM2))
+ writel_relaxed(rkpm_pwm_duty2, RK_PWM_VIRT + 0x28);
+ rkpm_udelay(30);
+}
+