summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-07-07 15:32:08 +0300
committerArnd Bergmann <arnd@arndb.de>2016-07-07 15:32:08 +0300
commit82be1178ee839ac93f8bb90550892c478d53e6e5 (patch)
treedfa5ce78e09e514606c75917f45951ce857bb949 /drivers/pwm
parent7dccd2ec967dbf64464c4681d81d0af07edfac34 (diff)
parent79cdad3635b3a253d712aba115fa274ef94a8c6b (diff)
downloadlinux-82be1178ee839ac93f8bb90550892c478d53e6e5.tar.xz
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)
struct pwm_omap_dmtimer_chip *omap;
struct pwm_omap_dmtimer_pdata *pdata;
pwm_omap_dmtimer *dm_timer;
- u32 prescaler;
+ u32 v;
int status;
pdata = dev_get_platdata(&pdev->dev);
@@ -306,10 +306,12 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
if (pm_runtime_active(&omap->dm_timer_pdev->dev))
omap->pdata->stop(omap->dm_timer);
- /* setup dmtimer prescaler */
- if (!of_property_read_u32(pdev->dev.of_node, "ti,prescaler",
- &prescaler))
- omap->pdata->set_prescaler(omap->dm_timer, prescaler);
+ if (!of_property_read_u32(pdev->dev.of_node, "ti,prescaler", &v))
+ omap->pdata->set_prescaler(omap->dm_timer, v);
+
+ /* setup dmtimer clock source */
+ if (!of_property_read_u32(pdev->dev.of_node, "ti,clock-source", &v))
+ omap->pdata->set_source(omap->dm_timer, v);
omap->chip.dev = &pdev->dev;
omap->chip.ops = &pwm_omap_dmtimer_ops;