Merge branch 'opp/genpd/propagation' into opp/linux-next
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 14 Dec 2018 10:58:52 +0000 (16:28 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 14 Dec 2018 10:58:52 +0000 (16:28 +0530)
1  2 
drivers/opp/core.c
drivers/opp/of.c
drivers/opp/opp.h

index 23b086fcbf8422f28a89d8592e124bb28745a953,eec1b60d7781850380801ea7a73335f787bb0ece..e5507add8f04f75b2bbd88cdc5de0ea7e8d714b4
@@@ -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);
Simple merge
index 14d732ccad08af4c8e0aef087af1880cc492b2ba,8aec38792cae74db4ae242e9f7129b8ca80a5d9a..e24d81497375dc2f3283426848dab05574e10001
@@@ -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;