From: David Wu Date: Wed, 24 Aug 2016 03:12:58 +0000 (+0800) Subject: pwm: rockchip: add rk_fb config_done for voppwm X-Git-Tag: firefly_0821_release~1641 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7bef81302300a811ea75dfca1e5691700962f331;p=firefly-linux-kernel-4.4.55.git pwm: rockchip: add rk_fb config_done for voppwm Change-Id: Iea012bfcec972f4b722950ea06713d2df4690242 Signed-off-by: David Wu --- 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; }