Skip to content

Commit

Permalink
pwm: img: fix pwm clock lookup
Browse files Browse the repository at this point in the history
22e8e19 has introduced a regression in the imgchip->pwm_clk lookup, whereas
the clock name has also been renamed to "imgchip". This causes the driver
failing to load:

[    0.546905] img-pwm 18101300.pwm: failed to get imgchip clock
[    0.553418] img-pwm: probe of 18101300.pwm failed with error -2

Fix this lookup by reverting the clock name back to "pwm".

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Link: https://lore.kernel.org/r/20240320083602.81592-1-wigyori@uid0.hu
Fixes: 22e8e19 ("pwm: img: Rename variable pointing to driver private data")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
  • Loading branch information
wigyori authored and Uwe Kleine-König committed Mar 25, 2024
1 parent 4cece76 commit 9eb0587
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pwm/pwm-img.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ static int img_pwm_probe(struct platform_device *pdev)
return PTR_ERR(imgchip->sys_clk);
}

imgchip->pwm_clk = devm_clk_get(&pdev->dev, "imgchip");
imgchip->pwm_clk = devm_clk_get(&pdev->dev, "pwm");
if (IS_ERR(imgchip->pwm_clk)) {
dev_err(&pdev->dev, "failed to get imgchip clock\n");
dev_err(&pdev->dev, "failed to get pwm clock\n");
return PTR_ERR(imgchip->pwm_clk);
}

Expand Down

0 comments on commit 9eb0587

Please sign in to comment.