From 7bef81302300a811ea75dfca1e5691700962f331 Mon Sep 17 00:00:00 2001 From: David Wu Date: Wed, 24 Aug 2016 11:12:58 +0800 Subject: [PATCH] pwm: rockchip: add rk_fb config_done for voppwm Change-Id: Iea012bfcec972f4b722950ea06713d2df4690242 Signed-off-by: David Wu --- drivers/pwm/pwm-rockchip.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c index beab624fb9d9..3227426ca894 100644 --- a/drivers/pwm/pwm-rockchip.c +++ b/drivers/pwm/pwm-rockchip.c @@ -17,6 +17,7 @@ #include #include #include +#include #define PWM_CTRL_TIMER_EN (1 << 0) #define PWM_CTRL_OUTPUT_EN (1 << 3) @@ -132,6 +133,14 @@ static int rockchip_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, clk_disable(pc->clk); +#ifdef CONFIG_FB_ROCKCHIP + if (!pc->data->regs.ctrl) { + ret = rk_fb_set_vop_pwm(); + if (ret) + dev_err(pc->chip.dev, "rk_fb_set_vop_pwm failed: %d\n", ret); + } +#endif + return 0; } -- 2.34.1