From: Kang KyungWoo Date: Tue, 13 Dec 2016 08:09:44 +0000 (+0900) Subject: [COMMON] drivers: pwm: Fix pwm driver to save and restore. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=69814a67f6824b36f15a466f12384d83a8317c84;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] drivers: pwm: Fix pwm driver to save and restore. This patch is for fixing pwm driver which influences pwm malfunction after suspend & resume funtcion. Checking Enable count is originally for LPA mode which is not exist anymore. Change-Id: I330362bdd10af00f15761cd9dc7613b21d107d35 Signed-off-by: Kang KyungWoo --- diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c index 6620c73b5ad3..b1594ba08a25 100755 --- a/drivers/pwm/pwm-samsung.c +++ b/drivers/pwm/pwm-samsung.c @@ -758,8 +758,7 @@ static int pwm_samsung_suspend(struct device *dev) chan->duty_ns = -1; } /* Save pwm registers*/ - if (chip->enable_cnt) - chip->reg_tcfg0 = __raw_readl(chip->base + REG_TCFG0); + chip->reg_tcfg0 = __raw_readl(chip->base + REG_TCFG0); clk_disable_unprepare(chip->base_clk); exynos_update_ip_idle_status(chip->idle_ip_index, 1); @@ -776,8 +775,7 @@ static int pwm_samsung_resume(struct device *dev) clk_prepare_enable(chip->base_clk); /* Restore pwm registers*/ - if (chip->enable_cnt) - __raw_writel(chip->reg_tcfg0, chip->base + REG_TCFG0); + __raw_writel(chip->reg_tcfg0, chip->base + REG_TCFG0); for (chan = 0; chan < SAMSUNG_PWM_NUM; ++chan) { if (chip->variant.output_mask & BIT(chan)) {