[PATCH v2 3/9] soc: qcom: geni-se: Add helper to set SE clock rate via OPP
Konrad Dybcio
konrad.dybcio at oss.qualcomm.com
Fri Sep 4 02:01:05 PDT 2026
On 8/27/26 7:59 PM, Praveen Talari wrote:
> GENI protocol drivers need a common way to scale the SE source clock
> through the OPP framework. However, the device that owns the OPP table
> differs depending on how the SE resources are managed. For Linux clock
> managed platforms, the OPP table is associated with the SE device,
> whereas on firmware-managed platforms it is associated with the
> performance power-domain device. This requires protocol drivers to be
> aware of the underlying resource management model when requesting
> frequency changes.
[...]
> +int geni_se_set_rate(struct geni_se *se, unsigned long freq)
> +{
> + struct device *perf_dev = se->dev;
> +
> + if (se->pd_list && se->pd_list->pd_devs[DOMAIN_IDX_PERF])
> + perf_dev = se->pd_list->pd_devs[DOMAIN_IDX_PERF];
> +
> + return se->has_opp ? dev_pm_opp_set_rate(perf_dev, freq) : 0;
For !se->has_opp, this silently does nothing, which presumably
may have bad consequences if the caller is unaware
Konrad
More information about the linux-arm-kernel
mailing list