On Wed, Jan 24, 2024 at 06:28:33AM -0800, Nikunj Kela wrote: > > Let me try another shot to convince you :) Currently, driver is dealing with > clocks and regulators using individual framework APIs(e.g. set_clk_rate, > regulator_set_voltage etc.). With defining perf to group them in OPP APIs, > we need to now use set_opp. Therefore the driver needs to change to use OPP > framework APIs instead of clocks/regulator APIs hence this query on how to > distinguish the two configuration even though the hardware is same. > One option is to make dev_pm_opp_set_opp() work for both. IIUC, opp layer can deal with clocks and regulators. A quick look at dev_pm_opp_set_opp() seem to suggest that. Another option is to try both one after another. Here I am assuming that clk_get() will fail and return error. One could check if it has pm_domain with "perf" support and use opp APIs. I don't think we need DT changes to achieve what you have explained so far. At least not at a level of per device node compatible or extra property. -- Regards, Sudeep