On 28/03/2024 07:06, Yu-chang Lee (李禹璋) wrote: > On Wed, 2024-03-27 at 12:55 +0100, Alexandre Mergnat wrote: >> >> External email : Please do not click links or open attachments until >> you have verified the sender or the content. >> Hello Yu-chang Lee, >> >> SMI LARB must have a power domain, according to "mediatek,smi- >> larb.yaml" >> Now you try to create a link from power domain to larb. >> >> Here is my understanding: when you enable/disable power domain, the >> larb linked to this power domain may have an issue. Then you want to >> retrieve de LARB linked to the power domain though the dts to manage >> the LARB. > > Yes, this is what I am trying to do. > >> IMHO, using the dts to have this information into the power >> driver isn't necessary and may introduce some bugs if the LARB node >> and power node in the DTS aren't aligned. >> >> It seems not implemented today but during the LARB probe, it should >> "subscribe" to the linked power domain. Then, when the power domain >> status is changing, it is able to "notify" (callback) the LARB, then >> implement the good stuff to handle this power domain status change >> into LARB driver. >> > > The problem with this method and why "smi clamp" is in power domain > driver is that our HW designer gave us a programming guide strictly > states the sequence of what we need to do to power on/off power domain. > Using callback, this sequence is no longer guaranteed and the side > effect is unknown... > > So I would like to stick with adding larbs just like smi into powe You want your power domain driver to poke, asynchronously, without locking into registers of another device. And how does this not cause issues? No, work with your hardware engineers or Linux engineers on sane behavior. Best regards, Krzysztof