The genpd_dev_pm_attach_by_name() allows a device to be associated with
its PM domain by name.
Export it for use by kernel modules, such as the i.MX8M blk-ctrl drivers:
imx8m-blk-ctrl and imx8mp-blk-ctrl.
Signed-off-by: Jindong Yue <[email protected]>
---
drivers/base/power/domain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 32084e38b73d..6d66b6b14863 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2908,6 +2908,7 @@ struct device *genpd_dev_pm_attach_by_name(struct device *dev, const char *name)
return genpd_dev_pm_attach_by_id(dev, index);
}
+EXPORT_SYMBOL_GPL(genpd_dev_pm_attach_by_name);
static const struct of_device_id idle_state_match[] = {
{ .compatible = "domain-idle-state", },
--
2.36.0
On Tue, 28 Feb 2023 at 08:59, Jindong Yue <[email protected]> wrote:
>
> The genpd_dev_pm_attach_by_name() allows a device to be associated with
> its PM domain by name.
>
> Export it for use by kernel modules, such as the i.MX8M blk-ctrl drivers:
> imx8m-blk-ctrl and imx8mp-blk-ctrl.
The genpd_dev_pm_attach_by_*() are not intended to be used by any
consumer drivers at all. Instead, please use
dev_pm_domain_attach_by_*() instead.
>
> Signed-off-by: Jindong Yue <[email protected]>
> ---
> drivers/base/power/domain.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 32084e38b73d..6d66b6b14863 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -2908,6 +2908,7 @@ struct device *genpd_dev_pm_attach_by_name(struct device *dev, const char *name)
>
> return genpd_dev_pm_attach_by_id(dev, index);
> }
> +EXPORT_SYMBOL_GPL(genpd_dev_pm_attach_by_name);
>
> static const struct of_device_id idle_state_match[] = {
> { .compatible = "domain-idle-state", },
> --
> 2.36.0
>
Kind regards
Uffe
> -----Original Message-----
> From: Ulf Hansson <[email protected]>
> Sent: Tuesday, February 28, 2023 6:28 PM
> To: J.D. Yue <[email protected]>
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; Peng Fan <[email protected]>;
> [email protected]; [email protected]
> Subject: [EXT] Re: [PATCH 4/6] PM: domains: Export
> genpd_dev_pm_attach_by_name()
>
> Caution: EXT Email
>
> On Tue, 28 Feb 2023 at 08:59, Jindong Yue <[email protected]> wrote:
> >
> > The genpd_dev_pm_attach_by_name() allows a device to be associated
> > with its PM domain by name.
> >
> > Export it for use by kernel modules, such as the i.MX8M blk-ctrl drivers:
> > imx8m-blk-ctrl and imx8mp-blk-ctrl.
>
> The genpd_dev_pm_attach_by_*() are not intended to be used by any
> consumer drivers at all. Instead, please use
> dev_pm_domain_attach_by_*() instead.
Thanks, I just tested dev_pm_domain_attach_by_*() works for me. I will drop this patch and fix it in driver.
>
> >
> > Signed-off-by: Jindong Yue <[email protected]>
> > ---
> > drivers/base/power/domain.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> > index 32084e38b73d..6d66b6b14863 100644
> > --- a/drivers/base/power/domain.c
> > +++ b/drivers/base/power/domain.c
> > @@ -2908,6 +2908,7 @@ struct device
> > *genpd_dev_pm_attach_by_name(struct device *dev, const char *name)
> >
> > return genpd_dev_pm_attach_by_id(dev, index); }
> > +EXPORT_SYMBOL_GPL(genpd_dev_pm_attach_by_name);
> >
> > static const struct of_device_id idle_state_match[] = {
> > { .compatible = "domain-idle-state", },
> > --
> > 2.36.0
> >
>
> Kind regards
> Uffe
BRs,
Jindong