diff mbox series

[v3,3/7] pwm: rockchip: Replace "bus clk" with "PWM clk"

Message ID 1c2f85dafab03d6f5cdbcac37e7288de8f90e6d8.1608735481.git.simon@simonsouth.net (mailing list archive)
State New, archived
Headers show
Series pwm: rockchip: Eliminate potential race condition when probing | expand

Commit Message

Simon South Dec. 23, 2020, 4:01 p.m. UTC
Clarify the Rockchip PWM driver's error messages by referring to the clock
that operates a PWM device as the "PWM" clock, rather than the "bus"
clock (which is especially misleading in the case of devices that also use
a separate clock for bus access).

Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Simon South <simon@simonsouth.net>
---
 drivers/pwm/pwm-rockchip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Uwe Kleine-K├Ânig Jan. 13, 2021, 7:33 a.m. UTC | #1
Hello Simon,

On Wed, Dec 23, 2020 at 11:01:05AM -0500, Simon South wrote:
> Clarify the Rockchip PWM driver's error messages by referring to the clock
> that operates a PWM device as the "PWM" clock, rather than the "bus"
> clock (which is especially misleading in the case of devices that also use
> a separate clock for bus access).

Maybe mention that this is the clock that is named "pwm" in the
devicetree and so matches to that, too.

Other than that the patch is fine.

Best regards
Uwe
diff mbox series

Patch

diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index 0c940c7508ea..3b1aa5daafff 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -309,7 +309,7 @@  static int rockchip_pwm_probe(struct platform_device *pdev)
 		pc->clk = devm_clk_get(&pdev->dev, NULL);
 		if (IS_ERR(pc->clk))
 			return dev_err_probe(&pdev->dev, PTR_ERR(pc->clk),
-					     "Can't get bus clk\n");
+					     "Can't get PWM clk\n");
 	}
 
 	count = of_count_phandle_with_args(pdev->dev.of_node,
@@ -328,7 +328,7 @@  static int rockchip_pwm_probe(struct platform_device *pdev)
 
 	ret = clk_prepare_enable(pc->clk);
 	if (ret) {
-		dev_err(&pdev->dev, "Can't prepare enable bus clk: %d\n", ret);
+		dev_err(&pdev->dev, "Can't prepare enable PWM clk: %d\n", ret);
 		return ret;
 	}