Re: BD71847 clk driver disables clk-32k-out causing RTC/WDT failure
From: Matti Vaittinen
Date: Mon Sep 12 2022 - 16:40:54 EST
On 9/12/22 20:15, Tim Harvey wrote:
On Mon, Sep 12, 2022 at 12:40 AM Peng Fan <peng.fan@xxxxxxxxxxx> wrote:
//snip
After a thought, maybe an easier way is to add a optional property
xxx,32k-always-on to the pmic node/driver.
Yes, that would be easy. Yet, creating a driver specific DT-property
feels a tad wrong. I don't think the BD718xx is in any way special so it
should not need such a vendor specific property. It might be better to
find more generic solution.
Is there simply a way to add the clk to the snvs_rtc and the wdog dt
nodes so they have a use count and don't get disabled?
To me that does sound like the right thing to do. If we have a consumer
which requires the clock, then describing this dependency in DT sounds
like a correct approach - assuming this keeps the clock enabled without
a race between instantiating the PMIC and finding the clock consumers.
Finally, if adding the consumers does not help, and if there will be no
consensus regarding the generic property - then I think it's better to
have a vendor specific property (as Peng suggested) than it is having
the boards broken. Eg, if all else fails and if there is a buy-in for
the vendor specific propety from Rob and Stephen - then I can also live
with it (even if it sure significantly decreases my happiness level :p)
Yours,
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~