@@ -67,6 +67,12 @@ have the following properties -
If omitted, this is assumed to be equal to:
entry-latency-us + exit-latency-us
+ - state-param:
+ Usage: Optional
+ Value type: <prop-encoded-array>
+ Definition: A u32 value as defined by the state. May be used
+ by the driver to hold state related u32 data.
+
Example:
power: power-controller@12340000 {
@@ -1245,6 +1245,7 @@ static int genpd_alloc_states_data(struct generic_pm_domain *genpd,
st[i].power_on_latency_ns;
genpd->states[i].power_off_latency_ns =
st[i].power_off_latency_ns;
+ genpd->states[i].param = st[i].param;
}
/*
@@ -1527,6 +1528,7 @@ static int of_get_genpd_power_state(struct genpd_power_state *genpd_state,
const struct of_device_id *match_id;
int err = 0;
u32 latency;
+ u32 param;
match_id = of_match_node(power_state_match, state_node);
if (!match_id)
@@ -1567,6 +1569,10 @@ static int of_get_genpd_power_state(struct genpd_power_state *genpd_state,
return -EINVAL;
}
+ err = of_property_read_u32(state_node, "state-param", ¶m);
+ if (!err)
+ genpd_state->param = param;
+
genpd_state->power_off_latency_ns = 1000 * latency;
return 0;
@@ -41,6 +41,7 @@ struct genpd_power_state {
char *name;
s64 power_off_latency_ns;
s64 power_on_latency_ns;
+ u32 param;
};
struct generic_pm_domain {
Allow domain states to hold additional state related data in a u32 value. This may be used by the platform driver. Signed-off-by: Lina Iyer <lina.iyer@linaro.org> --- Documentation/devicetree/bindings/power/power_domain.txt | 6 ++++++ drivers/base/power/domain.c | 6 ++++++ include/linux/pm_domain.h | 1 + 3 files changed, 13 insertions(+) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html