01.11.2020 18:44, Chanwoo Choi пишет:
I recommend that you use dev_pm_opp_of_get_opp_desc_node(&pdev->dev) to check whether a device contains opp-table or not.
I'm not sure what are the benefits, this will make code less expressive/readable and we will need to add extra of_node_put(), which device_property_present() handles for us.
Could you please give the rationale?
IMO, 'operating-points-v2' word was defined on OPP core. I think that the external user of OPP better to use the public helper function instead of using the interval definition or value of OPP core directly. Basically, I prefer the provided helper function if there. But, it is not critical and doesn't affect the operation. If you want to keep, it is ok.
I'll prefer to keep it since it's better for the readability of the code, thanks.