aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-07-07 08:32:08 -0400
committerArnd Bergmann <arnd@arndb.de>2016-07-07 08:32:08 -0400
commit82be1178ee839ac93f8bb90550892c478d53e6e5 (patch)
treedfa5ce78e09e514606c75917f45951ce857bb949 /drivers/pwm
parent7dccd2ec967dbf64464c4681d81d0af07edfac34 (diff)
parent79cdad3635b3a253d712aba115fa274ef94a8c6b (diff)
Merge tag 'omap-for-v4.8/ir-rx51-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers
Merge "omap ir-rx51 driver fixes for multiarch for v4.8 merge window" from Tony Lindgren: Fix a long time regression for ir-rx51 driver for n900 device tree booting. This driver has been unusable with multiarch because of the hardware timer access. With the recent PWM changes, we can finally fix the driver for multiarch and device tree support. And naturally there is no rush for these for the -rc cycle, these can wait for the merge window. The PWM changes have been acked by Thierry. For the media changes I did not get an ack from Mauro but he was Cc'd in the discussion and these changes do not conflict with other media changes. After this series we can drop the remaining omap3 legacy booting board files finally. * tag 'omap-for-v4.8/ir-rx51-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ir-rx51: use hrtimer instead of dmtimer ir-rx51: add DT support to driver ir-rx51: use PWM framework instead of OMAP dmtimer pwm: omap-dmtimer: Allow for setting dmtimer clock source ir-rx51: Fix build after multiarch changes broke it
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-omap-dmtimer.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
index 3e95090cd7cf..5ad42f33e70c 100644
--- a/drivers/pwm/pwm-omap-dmtimer.c
+++ b/drivers/pwm/pwm-omap-dmtimer.c
@@ -245,7 +245,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
245 struct pwm_omap_dmtimer_chip *omap; 245 struct pwm_omap_dmtimer_chip *omap;
246 struct pwm_omap_dmtimer_pdata *pdata; 246 struct pwm_omap_dmtimer_pdata *pdata;
247 pwm_omap_dmtimer *dm_timer; 247 pwm_omap_dmtimer *dm_timer;
248 u32 prescaler; 248 u32 v;
249 int status; 249 int status;
250 250
251 pdata = dev_get_platdata(&pdev->dev); 251 pdata = dev_get_platdata(&pdev->dev);
@@ -306,10 +306,12 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
306 if (pm_runtime_active(&omap->dm_timer_pdev->dev)) 306 if (pm_runtime_active(&omap->dm_timer_pdev->dev))
307 omap->pdata->stop(omap->dm_timer); 307 omap->pdata->stop(omap->dm_timer);
308 308
309 /* setup dmtimer prescaler */ 309 if (!of_property_read_u32(pdev->dev.of_node, "ti,prescaler", &v))
310 if (!of_property_read_u32(pdev->dev.of_node, "ti,prescaler", 310 omap->pdata->set_prescaler(omap->dm_timer, v);
311 &prescaler)) 311
312 omap->pdata->set_prescaler(omap->dm_timer, prescaler); 312 /* setup dmtimer clock source */
313 if (!of_property_read_u32(pdev->dev.of_node, "ti,clock-source", &v))
314 omap->pdata->set_source(omap->dm_timer, v);
313 315
314 omap->chip.dev = &pdev->dev; 316 omap->chip.dev = &pdev->dev;
315 omap->chip.ops = &pwm_omap_dmtimer_ops; 317 omap->chip.ops = &pwm_omap_dmtimer_ops;