[PATCH 0/7] OPP/pmdomain: Assign required_devs for required OPPs through genpd

Konrad Dybcio konrad.dybcio at linaro.org
Sat Jun 22 05:18:05 PDT 2024


On 19.06.2024 4:08 PM, Ulf Hansson wrote:
> Through dev_pm_opp_set_config() the _opp_attach_genpd() allows consumer
> drivers to hook up a device to its PM domains. This works for both a single
> and multiple PM domains. Their corresponding virtual devices that are
> created by genpd during attach, are later being assigned as the
> required_devs for the corresponding required OPPs.
> 
> In principle this works fine, but there are some problems. Especially as
> the index for a "required-opps" may not necessarily need to match the index
> for the "power-domain" in DT, in which case things gets screwed up.

So, is this series essentially tackling a problem like this:

pdp_A: power-domain-provider at aaaaaa {
	[...]

	opp-table {
		pdp_A_opp0: opp-0 {
			opp-level = <0>;
		};
	};
};

pdp_B: power-domain-provider at bbbbbbb {
	[...]

	opp-table {
		pdp_B_opp0: opp-0 {
			opp-level = <0>;
		};
	};
};

nice-device at ccccccc {
	[...]

	power-domains = <&pdp_A>,
			<&pdp_B>;
	// order doesn't match /\
	required-opps = <&pdp_B_opp0>,
			<&pdp_A_opp0>;
};


?

Konrad



More information about the linux-arm-kernel mailing list