diff options
author | Thierry Reding <thierry.reding@gmail.com> | 2016-05-17 15:57:58 +0300 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-05-17 15:57:58 +0300 |
commit | 18c588786c08458f5d965d8735ab48f9e51e0b4b (patch) | |
tree | 925893d58c00432f93830d1b83405c9d44d79bb8 /drivers/video/fbdev/ssd1307fb.c | |
parent | d2a3f206846b4b140aa1fe5be29499e9191fb1fe (diff) | |
parent | 23e3523f5d3a980edf7f189743cf4bb9490400a9 (diff) | |
download | linux-18c588786c08458f5d965d8735ab48f9e51e0b4b.tar.xz |
Merge branch 'for-4.7/pwm-atomic' into for-next
Diffstat (limited to 'drivers/video/fbdev/ssd1307fb.c')
-rw-r--r-- | drivers/video/fbdev/ssd1307fb.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index fa3480815cdb..652f68880d60 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -286,6 +286,7 @@ static int ssd1307fb_init(struct ssd1307fb_par *par) { int ret; u32 precharge, dclk, com_invdir, compins; + struct pwm_args pargs; if (par->device_info->need_pwm) { par->pwm = pwm_get(&par->client->dev, NULL); @@ -294,7 +295,15 @@ static int ssd1307fb_init(struct ssd1307fb_par *par) return PTR_ERR(par->pwm); } - par->pwm_period = pwm_get_period(par->pwm); + /* + * FIXME: pwm_apply_args() should be removed when switching to + * the atomic PWM API. + */ + pwm_apply_args(par->pwm); + + pwm_get_args(par->pwm, &pargs); + + par->pwm_period = pargs.period; /* Enable the PWM */ pwm_config(par->pwm, par->pwm_period / 2, par->pwm_period); pwm_enable(par->pwm); |