From: Viresh Kumar Date: Fri, 14 Dec 2018 10:58:52 +0000 (+0530) Subject: Merge branch 'opp/genpd/propagation' into opp/linux-next X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ade0c9493e972171103c7d804840248c32032954;p=linux.git Merge branch 'opp/genpd/propagation' into opp/linux-next --- ade0c9493e972171103c7d804840248c32032954 diff --cc drivers/opp/core.c index 23b086fcbf842,eec1b60d77818..e5507add8f04f --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@@ -810,11 -840,9 +840,12 @@@ static struct opp_table *_allocate_opp_ return NULL; mutex_init(&opp_table->lock); + mutex_init(&opp_table->genpd_virt_dev_lock); INIT_LIST_HEAD(&opp_table->dev_list); + /* Mark regulator count uninitialized */ + opp_table->regulator_count = -1; + opp_dev = _add_opp_dev(dev, opp_table); if (!opp_dev) { kfree(opp_table); diff --cc drivers/opp/opp.h index 14d732ccad08a,8aec38792cae7..e24d81497375d --- a/drivers/opp/opp.h +++ b/drivers/opp/opp.h @@@ -138,10 -145,9 +145,11 @@@ enum opp_table_access * @prop_name: A name to postfix to many DT properties, while parsing them. * @clk: Device's clock handle * @regulators: Supply regulators - * @regulator_count: Number of power supply regulators + * @regulator_count: Number of power supply regulators. Its value can be -1 + * (uninitialized), 0 (no opp-microvolt property) or > 0 (has opp-microvolt + * property). * @genpd_performance_state: Device's power domain support performance state. + * @is_genpd: Marks if the OPP table belongs to a genpd. * @set_opp: Platform specific set_opp callback * @set_opp_data: Data to be passed to set_opp callback * @dentry: debugfs dentry pointer of the real device directory (not links). @@@ -178,8 -189,9 +191,9 @@@ struct opp_table const char *prop_name; struct clk *clk; struct regulator **regulators; - unsigned int regulator_count; + int regulator_count; bool genpd_performance_state; + bool is_genpd; int (*set_opp)(struct dev_pm_set_opp_data *data); struct dev_pm_set_opp_data *set_opp_data;