rtc: zynqmp: Fix optional clock name property
authorMichal Simek <michal.simek@amd.com>
Wed, 27 Nov 2024 16:01:22 +0000 (17:01 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 12 Jan 2025 23:41:24 +0000 (00:41 +0100)
Clock description in DT binding introduced by commit f69060c14431
("dt-bindings: rtc: zynqmp: Add clock information") is talking about "rtc"
clock name but driver is checking "rtc_clk" name instead.
Because clock is optional property likely in was never handled properly by
the driver.

Fixes: 07dcc6f9c762 ("rtc: zynqmp: Add calibration set and get support")
Signed-off-by: Michal Simek <michal.simek@amd.com>
Cc: stable@kernel.org
Reviewed-by: Peter Korsgaard <peter@korsgaard.com>
Link: https://lore.kernel.org/r/cd5f0c9d01ec1f5a240e37a7e0d85b8dacb3a869.1732723280.git.michal.simek@amd.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-zynqmp.c

index 625f708a7cafc3581200ca129f676a4e8e5397a1..f39102b66eac216cc4465f8dee6dcef7cb0e02b9 100644 (file)
@@ -318,8 +318,8 @@ static int xlnx_rtc_probe(struct platform_device *pdev)
                return ret;
        }
 
-       /* Getting the rtc_clk info */
-       xrtcdev->rtc_clk = devm_clk_get_optional(&pdev->dev, "rtc_clk");
+       /* Getting the rtc info */
+       xrtcdev->rtc_clk = devm_clk_get_optional(&pdev->dev, "rtc");
        if (IS_ERR(xrtcdev->rtc_clk)) {
                if (PTR_ERR(xrtcdev->rtc_clk) != -EPROBE_DEFER)
                        dev_warn(&pdev->dev, "Device clock not found.\n");