Commit 028783ba authored by Michal Simek's avatar Michal Simek Committed by Wentao Guan
Browse files

rtc: zynqmp: Fix optional clock name property

stable inclusion
from stable-v6.6.78
commit ec8aa93c30f487b29781627a825cb660faed6e56
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBX1M5

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ec8aa93c30f487b29781627a825cb660faed6e56



--------------------------------

commit 2a388ff22d2cbfc5cbd628ef085bdcd3b7dc64f5 upstream.

Clock description in DT binding introduced by commit f69060c1
("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: 07dcc6f9 ("rtc: zynqmp: Add calibration set and get support")
Signed-off-by: default avatarMichal Simek <michal.simek@amd.com>
Cc: stable@kernel.org
Reviewed-by: default avatarPeter Korsgaard <peter@korsgaard.com>
Link: https://lore.kernel.org/r/cd5f0c9d01ec1f5a240e37a7e0d85b8dacb3a869.1732723280.git.michal.simek@amd.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ec8aa93c30f487b29781627a825cb660faed6e56)
Signed-off-by: default avatarWentao Guan <guanwentao@uniontech.com>
parent 61fb1adc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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");