Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1270010 > unrolled thread

Re: [PATCH] PM / Domains: export pm_genpd_add_device symbol

Started byUlf Hansson <ulf.hansson@linaro.org>
First post2015-11-16 12:10 +0100
Last post2015-11-16 18:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] PM / Domains: export pm_genpd_add_device symbol Ulf Hansson <ulf.hansson@linaro.org> - 2015-11-16 12:10 +0100
    Re: [PATCH] PM / Domains: export pm_genpd_add_device symbol Mark Brown <broonie@kernel.org> - 2015-11-16 18:30 +0100

#1270010 — Re: [PATCH] PM / Domains: export pm_genpd_add_device symbol

FromUlf Hansson <ulf.hansson@linaro.org>
Date2015-11-16 12:10 +0100
SubjectRe: [PATCH] PM / Domains: export pm_genpd_add_device symbol
Message-ID<qvpPB-6yp-45@gated-at.bofh.it>
On 16 November 2015 at 10:07, Maruthi Srinivas Bayyavarapu
<Maruthi.Bayyavarapu@amd.com> wrote:
> Drivers which can be built as loadable module needs
> symbol - pm_genpd_add_device to be exported. Those drivers
> create platform devices which comes under a powerdomain.

Currently this API is used by a few SoCs that haven't yet been
converted to device tree.

Can you tell me more about what driver/SoC you intend to use it for?

Kind regards
Uffe

>
> Signed-off-by: Maruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>
> ---
>  drivers/base/power/domain.c | 7 +++++++
>  include/linux/pm_domain.h   | 9 ++-------
>  2 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index f932058..72998f8 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -1253,6 +1253,13 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
>         return ret;
>  }
>
> +int pm_genpd_add_device(struct generic_pm_domain *genpd,
> +                                     struct device *dev)
> +{
> +       return __pm_genpd_add_device(genpd, dev, NULL);
> +}
> +EXPORT_SYMBOL_GPL(pm_genpd_add_device);
> +
>  /**
>   * pm_genpd_remove_device - Remove a device from an I/O PM domain.
>   * @genpd: PM domain to remove the device from.
> diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
> index ba4ced3..f9e2f7e 100644
> --- a/include/linux/pm_domain.h
> +++ b/include/linux/pm_domain.h
> @@ -114,7 +114,8 @@ extern struct generic_pm_domain *pm_genpd_lookup_dev(struct device *dev);
>  extern int __pm_genpd_add_device(struct generic_pm_domain *genpd,
>                                  struct device *dev,
>                                  struct gpd_timing_data *td);
> -
> +extern int pm_genpd_add_device(struct generic_pm_domain *genpd,
> +                                     struct device *dev);
>  extern int pm_genpd_remove_device(struct generic_pm_domain *genpd,
>                                   struct device *dev);
>  extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
> @@ -163,12 +164,6 @@ static inline void pm_genpd_init(struct generic_pm_domain *genpd,
>  }
>  #endif
>
> -static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
> -                                     struct device *dev)
> -{
> -       return __pm_genpd_add_device(genpd, dev, NULL);
> -}
> -
>  #ifdef CONFIG_PM_GENERIC_DOMAINS_SLEEP
>  extern void pm_genpd_syscore_poweroff(struct device *dev);
>  extern void pm_genpd_syscore_poweron(struct device *dev);
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1270406

FromMark Brown <broonie@kernel.org>
Date2015-11-16 18:30 +0100
Message-ID<qvvLk-1Mp-35@gated-at.bofh.it>
In reply to#1270010

[Multipart message — attachments visible in raw view] — view raw

On Mon, Nov 16, 2015 at 12:08:17PM +0100, Ulf Hansson wrote:
> On 16 November 2015 at 10:07, Maruthi Srinivas Bayyavarapu

> > Drivers which can be built as loadable module needs
> > symbol - pm_genpd_add_device to be exported. Those drivers
> > create platform devices which comes under a powerdomain.

> Currently this API is used by a few SoCs that haven't yet been
> converted to device tree.

> Can you tell me more about what driver/SoC you intend to use it for?

He's got a graphics card with audio subfunctions that looks a lot like a
general purpose SoC with power domains and resulting code that looked
like it was trying to redo the power domain code, I asked him to
refactor to use that instead of open coding a version in the driver.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web