mbox series

[v4,0/2] add device managed version of dev_pm_domain_attach|detach_list()

Message ID 1724063350-11993-1-git-send-email-quic_dikshita@quicinc.com (mailing list archive)
Headers show
Series add device managed version of dev_pm_domain_attach|detach_list() | expand

Message

Dikshita Agarwal Aug. 19, 2024, 10:29 a.m. UTC
These patches add the devres-enabled version of
dev_pm_domain_attach|detach_list in pm domain framework and
use the same APIs in venus driver.

If any client drivers use devm_pm_domain_attach_list() to
attach the PM domains, devm_pm_domain_detach_list() will be
invoked implicitly during remove phase.

Changes since v3:
 - updated null check for num_pds to num_pds <=0.

Changes since v2:
 - made devm_pm_domain_detach_list as static and no
   longer export this API.
 - added null checks for num_pds to avoid adding a
   devres callback for the same.
 - added bryan's reviewed-by from v1.

Changes since v1:
 - fixed the warnings reported by kernel test robot.
 - added stub functions for !CONFIG_PM case.
 - removed un-necessasry type casting.
 - fixed the issue with remove sequence.

Dikshita Agarwal (2):
  PM: domains: add device managed version of
    dev_pm_domain_attach|detach_list()
  media: venus: use device managed APIs for power domains

 drivers/base/power/common.c                    | 45 ++++++++++++++++++++++++++
 drivers/media/platform/qcom/venus/pm_helpers.c |  5 +--
 include/linux/pm_domain.h                      | 11 +++++++
 3 files changed, 57 insertions(+), 4 deletions(-)

Comments

Ulf Hansson Aug. 20, 2024, 9:33 a.m. UTC | #1
On Mon, 19 Aug 2024 at 12:29, Dikshita Agarwal
<quic_dikshita@quicinc.com> wrote:
>
> These patches add the devres-enabled version of
> dev_pm_domain_attach|detach_list in pm domain framework and
> use the same APIs in venus driver.
>
> If any client drivers use devm_pm_domain_attach_list() to
> attach the PM domains, devm_pm_domain_detach_list() will be
> invoked implicitly during remove phase.
>
> Changes since v3:
>  - updated null check for num_pds to num_pds <=0.
>
> Changes since v2:
>  - made devm_pm_domain_detach_list as static and no
>    longer export this API.
>  - added null checks for num_pds to avoid adding a
>    devres callback for the same.
>  - added bryan's reviewed-by from v1.
>
> Changes since v1:
>  - fixed the warnings reported by kernel test robot.
>  - added stub functions for !CONFIG_PM case.
>  - removed un-necessasry type casting.
>  - fixed the issue with remove sequence.
>
> Dikshita Agarwal (2):
>   PM: domains: add device managed version of
>     dev_pm_domain_attach|detach_list()
>   media: venus: use device managed APIs for power domains
>
>  drivers/base/power/common.c                    | 45 ++++++++++++++++++++++++++
>  drivers/media/platform/qcom/venus/pm_helpers.c |  5 +--
>  include/linux/pm_domain.h                      | 11 +++++++
>  3 files changed, 57 insertions(+), 4 deletions(-)
>

Applied for next, thanks!

Kind regards
Uffe