Skip to content

Commit a380a02

Browse files
johnkeepingalexandrebelloni
authored andcommitted
rtc: pcf8563: use correct of_node for output clock
When switching to regmap, the i2c_client pointer was removed from struct pcf8563 so this function switched to using the RTC device instead. But the RTC device is a child of the original I2C device and does not have an associated of_node. Reference the correct device's of_node to ensure that the output clock can be found when referenced by other devices and so that the override clock name is read correctly. Cc: stable@vger.kernel.org Fixes: 00f1bb9 ("rtc: pcf8563: Switch to regmap") Signed-off-by: John Keeping <jkeeping@inmusicbrands.com> Link: https://patch.msgid.link/20260108184749.3413348-1-jkeeping@inmusicbrands.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent d5aca9a commit a380a02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/rtc/rtc-pcf8563.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ static const struct clk_ops pcf8563_clkout_ops = {
424424

425425
static struct clk *pcf8563_clkout_register_clk(struct pcf8563 *pcf8563)
426426
{
427-
struct device_node *node = pcf8563->rtc->dev.of_node;
427+
struct device_node *node = pcf8563->rtc->dev.parent->of_node;
428428
struct clk_init_data init;
429429
struct clk *clk;
430430
int ret;

0 commit comments

Comments
 (0)