History

PM / Domains: Introduce a genpd OF helper that removes a subdomain

We already have the of_genpd_add_subdomain() helper, but no corresponding of_genpd_remove_subdomain(), so let's add it. Subsequent changes starts to make use of it.

Ulf Hansson committed 6 years ago

Commit dedd1491 parent 9c6ceec2 files · +46 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/pm_domain.h+8−0
@@ -284,6 +284,8 @@ void of_genpd_del_provider(struct device_node *np); · 283 unmodified lines
284int of_genpd_add_device(struct of_phandle_args *args, struct device *dev);284int of_genpd_add_device(struct of_phandle_args *args, struct device *dev);
285int of_genpd_add_subdomain(struct of_phandle_args *parent_spec,285int of_genpd_add_subdomain(struct of_phandle_args *parent_spec,
286 struct of_phandle_args *subdomain_spec);286 struct of_phandle_args *subdomain_spec);
287int of_genpd_remove_subdomain(struct of_phandle_args *parent_spec,
288 struct of_phandle_args *subdomain_spec);
287struct generic_pm_domain *of_genpd_remove_last(struct device_node *np);289struct generic_pm_domain *of_genpd_remove_last(struct device_node *np);
288int of_genpd_parse_idle_states(struct device_node *dn,290int of_genpd_parse_idle_states(struct device_node *dn,
289 struct genpd_power_state **states, int *n);291 struct genpd_power_state **states, int *n);
@@ -322,6 +324,12 @@ static inline int of_genpd_add_subdomain(struct of_phandle_args *parent_spec, · 32 unmodified lines
322 return -ENODEV;324 return -ENODEV;
323}325}
324 326
327static inline int of_genpd_remove_subdomain(struct of_phandle_args *parent_spec,
328 struct of_phandle_args *subdomain_spec)
329{
330 return -ENODEV;
331}
332
325static inline int of_genpd_parse_idle_states(struct device_node *dn,333static inline int of_genpd_parse_idle_states(struct device_node *dn,
326 struct genpd_power_state **states, int *n)334 struct genpd_power_state **states, int *n)
327{335{