Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 06ebbce

Browse files
committed
Merge tag 'counter-fixes-for-6.10' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-linus
William writes: Counter fixes for 6.10 A fix to enable the TI eQEP clock explicitly in the probe callback rather than hope it's already enabled by something else on the system by the time we need it. * tag 'counter-fixes-for-6.10' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: ti-eqep: enable clock at probe
2 parents 8fe050e + 0cf81c7 commit 06ebbce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/counter/ti-eqep.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include <linux/bitops.h>
9+
#include <linux/clk.h>
910
#include <linux/counter.h>
1011
#include <linux/kernel.h>
1112
#include <linux/mod_devicetable.h>
@@ -376,6 +377,7 @@ static int ti_eqep_probe(struct platform_device *pdev)
376377
struct counter_device *counter;
377378
struct ti_eqep_cnt *priv;
378379
void __iomem *base;
380+
struct clk *clk;
379381
int err;
380382

381383
counter = devm_counter_alloc(dev, sizeof(*priv));
@@ -415,6 +417,10 @@ static int ti_eqep_probe(struct platform_device *pdev)
415417
pm_runtime_enable(dev);
416418
pm_runtime_get_sync(dev);
417419

420+
clk = devm_clk_get_enabled(dev, NULL);
421+
if (IS_ERR(clk))
422+
return dev_err_probe(dev, PTR_ERR(clk), "failed to enable clock\n");
423+
418424
err = counter_add(counter);
419425
if (err < 0) {
420426
pm_runtime_put_sync(dev);

0 commit comments

Comments
 (0)