]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Domains: Add generic data pointer to struct genpd_power_state
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 27 Mar 2019 14:35:45 +0000 (15:35 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 9 Apr 2019 22:32:34 +0000 (00:32 +0200)
commit47b6cdaaf003c7d5f6e56e9330c1f5738db3d3e3
tree48248eeafd52930a4be7b797d966d26bf90d73db
parentd3bd53cbf7b24f957dbe922491deceb250ff7990
PM / Domains: Add generic data pointer to struct genpd_power_state

Add a data pointer to the genpd_power_state struct, to allow a genpd
backend driver to store per-state specific data. To introduce the
pointer, change the way genpd deals with freeing of the corresponding
allocated data.

More precisely, clarify the responsibility of whom that shall free the
data, by adding a ->free_states() callback to the generic_pm_domain
structure. The one allocating the data will be expected to set the
callback, to allow genpd to invoke it from genpd_remove().

Co-developed-by: Lina Iyer <lina.iyer@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
[ rjw: Subject & changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c
include/linux/pm_domain.h