]> Git Repo - linux.git/commitdiff
Merge remote-tracking branches 'regulator/topic/notifier', 'regulator/topic/pfuze100...
authorMark Brown <[email protected]>
Sun, 30 Apr 2017 13:17:36 +0000 (22:17 +0900)
committerMark Brown <[email protected]>
Sun, 30 Apr 2017 13:17:36 +0000 (22:17 +0900)
1  2  3  4  5  6 
drivers/regulator/Kconfig
drivers/regulator/Makefile
drivers/regulator/core.c
drivers/regulator/pfuze100-regulator.c
drivers/regulator/twl6030-regulator.c
include/linux/regulator/machine.h

index 9ecd70373f0bd2231da7041d797ee4a62367fc8f,936f7ccc9736f8c550f712f6cb9fd8c8622ce29c,936f7ccc9736f8c550f712f6cb9fd8c8622ce29c,936f7ccc9736f8c550f712f6cb9fd8c8622ce29c,00150c21166dc181b37761166cfed116cd818579,936f7ccc9736f8c550f712f6cb9fd8c8622ce29c..d54044c03a6cfbe91a968798d0c2e95d2e10a56e
@@@@@@@ -125,20 -125,12 -125,12 -125,12 -125,12 -125,12 +125,20 @@@@@@@ config REGULATOR_AB850
          This driver supports the regulators found on the ST-Ericsson mixed
          signal AB8500 PMIC
      
 -----config REGULATOR_ARIZONA
 -----  tristate "Wolfson Arizona class devices"
 +++++config REGULATOR_ARIZONA_LDO1
 +++++  tristate "Wolfson Arizona class devices LDO1"
        depends on MFD_ARIZONA
        depends on SND_SOC
        help
 -----    Support for the regulators found on Wolfson Arizona class
 +++++    Support for the LDO1 regulators found on Wolfson Arizona class
 +++++    devices.
 +++++
 +++++config REGULATOR_ARIZONA_MICSUPP
 +++++  tristate "Wolfson Arizona class devices MICSUPP"
 +++++  depends on MFD_ARIZONA
 +++++  depends on SND_SOC
 +++++  help
 +++++    Support for the MICSUPP regulators found on Wolfson Arizona class
          devices.
      
      config REGULATOR_AS3711
@@@@@@@ -171,24 -163,6 -163,6 -163,6 -163,6 -163,6 +171,24 @@@@@@@ config REGULATOR_BCM590X
          BCM590xx PMUs. This will enable support for the software
          controllable LDO/Switching regulators.
      
 +++++config REGULATOR_BD9571MWV
 +++++  tristate "ROHM BD9571MWV Regulators"
 +++++  depends on MFD_BD9571MWV
 +++++  help
 +++++    This driver provides support for the voltage regulators on the
 +++++    ROHM BD9571MWV PMIC. This will enable support for the software
 +++++    controllable regulator and voltage sampling units.
 +++++
 +++++    This driver can also be built as a module. If so, the module
 +++++    will be called bd9571mwv-regulator.
 +++++
 +++++config REGULATOR_CPCAP
 +++++  tristate "Motorola CPCAP regulator"
 +++++  depends on MFD_CPCAP
 +++++  help
 +++++    Say y here for CPCAP regulator found on some Motorola phones
 +++++    and tablets such as Droid 4.
 +++++
      config REGULATOR_DA903X
        tristate "Dialog Semiconductor DA9030/DA9034 regulators"
        depends on PMIC_DA903X
@@@@@@@ -807,6 -781,6 -781,6 -781,6 -781,14 -781,6 +807,14 @@@@@@@ config REGULATOR_TPS6509
          This driver provides support for the voltage regulators on the
          TI TPS65090 PMIC.
      
++++ +config REGULATOR_TPS65132
++++ +  tristate "TI TPS65132 Dual Output Power regulators"
++++ +  depends on I2C && GPIOLIB
++++ +  select REGMAP_I2C
++++ +  help
++++ +    This driver supports TPS65132 single inductor - dual output
++++ +    power supply specifcally designed for display panels.
++++ +
      config REGULATOR_TPS65217
        tristate "TI TPS65217 Power regulators"
        depends on MFD_TPS65217
index ddbde708385d9a337265e80f6efc1fc6ae5efa0f,14294692beb9d06bdded2eb5ce4c89a0d4a93fd3,14294692beb9d06bdded2eb5ce4c89a0d4a93fd3,14294692beb9d06bdded2eb5ce4c89a0d4a93fd3,0e9275e7827131770bc5a57acf4afa3cf9cae178,14294692beb9d06bdded2eb5ce4c89a0d4a93fd3..f30cb0e2d6fb4f236faf1699415e8cd3f179744a
@@@@@@@ -11,7 -11,6 -11,6 -11,6 -11,6 -11,6 +11,7 @@@@@@@ obj-$(CONFIG_REGULATOR_USERSPACE_CONSUM
      
      obj-$(CONFIG_REGULATOR_88PM800) += 88pm800.o
      obj-$(CONFIG_REGULATOR_88PM8607) += 88pm8607.o
 +++++obj-$(CONFIG_REGULATOR_CPCAP) += cpcap-regulator.o
      obj-$(CONFIG_REGULATOR_AAT2870) += aat2870-regulator.o
      obj-$(CONFIG_REGULATOR_AB3100) += ab3100.o
      obj-$(CONFIG_REGULATOR_AB8500)    += ab8500-ext.o ab8500.o
@@@@@@@ -19,13 -18,11 -18,11 -18,11 -18,11 -18,11 +19,13 @@@@@@@ obj-$(CONFIG_REGULATOR_ACT8865) += act8
      obj-$(CONFIG_REGULATOR_ACT8945A) += act8945a-regulator.o
      obj-$(CONFIG_REGULATOR_AD5398) += ad5398.o
      obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o
 -----obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o
 +++++obj-$(CONFIG_REGULATOR_ARIZONA_LDO1) += arizona-ldo1.o
 +++++obj-$(CONFIG_REGULATOR_ARIZONA_MICSUPP) += arizona-micsupp.o
      obj-$(CONFIG_REGULATOR_AS3711) += as3711-regulator.o
      obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o
      obj-$(CONFIG_REGULATOR_AXP20X) += axp20x-regulator.o
      obj-$(CONFIG_REGULATOR_BCM590XX) += bcm590xx-regulator.o
 +++++obj-$(CONFIG_REGULATOR_BD9571MWV) += bd9571mwv-regulator.o
      obj-$(CONFIG_REGULATOR_DA903X)    += da903x.o
      obj-$(CONFIG_REGULATOR_DA9052)    += da9052-regulator.o
      obj-$(CONFIG_REGULATOR_DA9055)    += da9055-regulator.o
@@@@@@@ -107,6 -104,6 -104,6 -104,6 -104,7 -104,6 +107,7 @@@@@@@ obj-$(CONFIG_REGULATOR_TPS6586X) += tps
      obj-$(CONFIG_REGULATOR_TPS65910) += tps65910-regulator.o
      obj-$(CONFIG_REGULATOR_TPS65912) += tps65912-regulator.o
      obj-$(CONFIG_REGULATOR_TPS80031) += tps80031-regulator.o
++++ +obj-$(CONFIG_REGULATOR_TPS65132) += tps65132-regulator.o
      obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o twl6030-regulator.o
      obj-$(CONFIG_REGULATOR_VEXPRESS) += vexpress-regulator.o
      obj-$(CONFIG_REGULATOR_WM831X) += wm831x-dcdc.o
diff --combined drivers/regulator/core.c
index 462e6e679ce1db4131c929db00512a979eef6232,6b9bb1b002260e7e9ac15ea1e8c0a30da0be8923,04baac9a165bbb56da292a51d0a56055947861e0,3a641d64f8e1ac84e002e2adf37ab37a3fb04b13,04baac9a165bbb56da292a51d0a56055947861e0,04baac9a165bbb56da292a51d0a56055947861e0..c0d9ae8d0860e8e9466dee6fe1e275853b1f9e3b
@@@@@@@ -1326,8 -1326,8 -1326,8 -1326,8 -1326,8 -1326,8 +1326,8 @@@@@@@ static struct regulator *create_regulat
                regulator->dev = dev;
      
                /* Add a link to the device sysfs entry */
 -----          size = scnprintf(buf, REG_STR_SIZE, "%s-%s",
 -----                           dev->kobj.name, supply_name);
 +++++          size = snprintf(buf, REG_STR_SIZE, "%s-%s",
 +++++                          dev->kobj.name, supply_name);
                if (size >= REG_STR_SIZE)
                        goto overflow_err;
      
                        /* non-fatal */
                }
        } else {
 -----          regulator->supply_name = kstrdup(supply_name, GFP_KERNEL);
 +++++          regulator->supply_name = kstrdup_const(supply_name, GFP_KERNEL);
                if (regulator->supply_name == NULL)
                        goto overflow_err;
        }
@@@@@@@ -1451,16 -1451,16 -1451,16 -1451,16 -1451,16 -1451,16 +1451,16 @@@@@@@ static struct regulator_dev *regulator_
       * regulator_dev_lookup - lookup a regulator device.
       * @dev: device for regulator "consumer".
       * @supply: Supply name or regulator ID.
 ----- * @ret: 0 on success, -ENODEV if lookup fails permanently, -EPROBE_DEFER if
 ----- * lookup could succeed in the future.
       *
       * If successful, returns a struct regulator_dev that corresponds to the name
 ----- * @supply and with the embedded struct device refcount incremented by one,
 ----- * or NULL on failure. The refcount must be dropped by calling put_device().
 +++++ * @supply and with the embedded struct device refcount incremented by one.
 +++++ * The refcount must be dropped by calling put_device().
 +++++ * On failure one of the following ERR-PTR-encoded values is returned:
 +++++ * -ENODEV if lookup fails permanently, -EPROBE_DEFER if lookup could succeed
 +++++ * in the future.
       */
      static struct regulator_dev *regulator_dev_lookup(struct device *dev,
 -----                                            const char *supply,
 -----                                            int *ret)
 +++++                                            const char *supply)
      {
        struct regulator_dev *r;
        struct device_node *node;
                        r = of_find_regulator_by_node(node);
                        if (r)
                                return r;
 -----                  *ret = -EPROBE_DEFER;
 -----                  return NULL;
 -----          } else {
 +++++
                        /*
 -----                   * If we couldn't even get the node then it's
 -----                   * not just that the device didn't register
 -----                   * yet, there's no node and we'll never
 -----                   * succeed.
 +++++                   * We have a node, but there is no device.
 +++++                   * assume it has not registered yet.
                         */
 -----                  *ret = -ENODEV;
 +++++                  return ERR_PTR(-EPROBE_DEFER);
                }
        }
      
      
                if (strcmp(map->supply, supply) == 0 &&
                    get_device(&map->regulator->dev)) {
 -----                  mutex_unlock(&regulator_list_mutex);
 -----                  return map->regulator;
 +++++                  r = map->regulator;
 +++++                  break;
                }
        }
        mutex_unlock(&regulator_list_mutex);
      
 -----  return NULL;
 +++++  if (r)
 +++++          return r;
 +++++
 +++++  return ERR_PTR(-ENODEV);
      }
      
      static int regulator_resolve_supply(struct regulator_dev *rdev)
        if (rdev->supply)
                return 0;
      
 -----  r = regulator_dev_lookup(dev, rdev->supply_name, &ret);
 -----  if (!r) {
 -----          if (ret == -ENODEV) {
 -----                  /*
 -----                   * No supply was specified for this regulator and
 -----                   * there will never be one.
 -----                   */
 -----                  return 0;
 -----          }
 +++++  r = regulator_dev_lookup(dev, rdev->supply_name);
 +++++  if (IS_ERR(r)) {
 +++++          ret = PTR_ERR(r);
      
                /* Did the lookup explicitly defer for us? */
                if (ret == -EPROBE_DEFER)
                }
        }
      
 +++++  /*
 +++++   * If the supply's parent device is not the same as the
 +++++   * regulator's parent device, then ensure the parent device
 +++++   * is bound before we resolve the supply, in case the parent
 +++++   * device get probe deferred and unregisters the supply.
 +++++   */
 +++++  if (r->dev.parent && r->dev.parent != rdev->dev.parent) {
 +++++          if (!device_is_bound(r->dev.parent)) {
 +++++                  put_device(&r->dev);
 +++++                  return -EPROBE_DEFER;
 +++++          }
 +++++  }
 +++++
        /* Recursively resolve the supply of the supply */
        ret = regulator_resolve_supply(r);
        if (ret < 0) {
      }
      
      /* Internal regulator request function */
 -----static struct regulator *_regulator_get(struct device *dev, const char *id,
 -----                                  bool exclusive, bool allow_dummy)
 +++++struct regulator *_regulator_get(struct device *dev, const char *id,
 +++++                           enum regulator_get_type get_type)
      {
        struct regulator_dev *rdev;
 -----  struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
 -----  const char *devname = NULL;
 +++++  struct regulator *regulator;
 +++++  const char *devname = dev ? dev_name(dev) : "deviceless";
        int ret;
      
 +++++  if (get_type >= MAX_GET_TYPE) {
 +++++          dev_err(dev, "invalid type %d in %s\n", get_type, __func__);
 +++++          return ERR_PTR(-EINVAL);
 +++++  }
 +++++
        if (id == NULL) {
                pr_err("get() with no identifier\n");
                return ERR_PTR(-EINVAL);
        }
      
 -----  if (dev)
 -----          devname = dev_name(dev);
 -----
 -----  if (have_full_constraints())
 -----          ret = -ENODEV;
 -----  else
 -----          ret = -EPROBE_DEFER;
 -----
 -----  rdev = regulator_dev_lookup(dev, id, &ret);
 -----  if (rdev)
 -----          goto found;
 +++++  rdev = regulator_dev_lookup(dev, id);
 +++++  if (IS_ERR(rdev)) {
 +++++          ret = PTR_ERR(rdev);
      
 -----  regulator = ERR_PTR(ret);
 +++++          /*
 +++++           * If regulator_dev_lookup() fails with error other
 +++++           * than -ENODEV our job here is done, we simply return it.
 +++++           */
 +++++          if (ret != -ENODEV)
 +++++                  return ERR_PTR(ret);
      
 -----  /*
 -----   * If we have return value from dev_lookup fail, we do not expect to
 -----   * succeed, so, quit with appropriate error value
 -----   */
 -----  if (ret && ret != -ENODEV)
 -----          return regulator;
 +++++          if (!have_full_constraints()) {
 +++++                  dev_warn(dev,
 +++++                           "incomplete constraints, dummy supplies not allowed\n");
 +++++                  return ERR_PTR(-ENODEV);
 +++++          }
      
 -----  if (!devname)
 -----          devname = "deviceless";
 +++++          switch (get_type) {
 +++++          case NORMAL_GET:
 +++++                  /*
 +++++                   * Assume that a regulator is physically present and
 +++++                   * enabled, even if it isn't hooked up, and just
 +++++                   * provide a dummy.
 +++++                   */
 +++++                  dev_warn(dev,
 +++++                           "%s supply %s not found, using dummy regulator\n",
 +++++                           devname, id);
 +++++                  rdev = dummy_regulator_rdev;
 +++++                  get_device(&rdev->dev);
 +++++                  break;
      
 -----  /*
 -----   * Assume that a regulator is physically present and enabled
 -----   * even if it isn't hooked up and just provide a dummy.
 -----   */
 -----  if (have_full_constraints() && allow_dummy) {
 -----          pr_warn("%s supply %s not found, using dummy regulator\n",
 -----                  devname, id);
 +++++          case EXCLUSIVE_GET:
 +++++                  dev_warn(dev,
 +++++                           "dummy supplies not allowed for exclusive requests\n");
 +++++                  /* fall through */
      
 -----          rdev = dummy_regulator_rdev;
 -----          get_device(&rdev->dev);
 -----          goto found;
 -----  /* Don't log an error when called from regulator_get_optional() */
 -----  } else if (!have_full_constraints() || exclusive) {
 -----          dev_warn(dev, "dummy supplies not allowed\n");
 +++++          default:
 +++++                  return ERR_PTR(-ENODEV);
 +++++          }
        }
      
 -----  return regulator;
 -----
 -----found:
        if (rdev->exclusive) {
                regulator = ERR_PTR(-EPERM);
                put_device(&rdev->dev);
                return regulator;
        }
      
 -----  if (exclusive && rdev->open_count) {
 +++++  if (get_type == EXCLUSIVE_GET && rdev->open_count) {
                regulator = ERR_PTR(-EBUSY);
                put_device(&rdev->dev);
                return regulator;
        }
      
        if (!try_module_get(rdev->owner)) {
 +++++          regulator = ERR_PTR(-EPROBE_DEFER);
                put_device(&rdev->dev);
                return regulator;
        }
        }
      
        rdev->open_count++;
 -----  if (exclusive) {
 +++++  if (get_type == EXCLUSIVE_GET) {
                rdev->exclusive = 1;
      
                ret = _regulator_is_enabled(rdev);
       */
      struct regulator *regulator_get(struct device *dev, const char *id)
      {
 -----  return _regulator_get(dev, id, false, true);
 +++++  return _regulator_get(dev, id, NORMAL_GET);
      }
      EXPORT_SYMBOL_GPL(regulator_get);
      
       */
      struct regulator *regulator_get_exclusive(struct device *dev, const char *id)
      {
 -----  return _regulator_get(dev, id, true, false);
 +++++  return _regulator_get(dev, id, EXCLUSIVE_GET);
      }
      EXPORT_SYMBOL_GPL(regulator_get_exclusive);
      
       */
      struct regulator *regulator_get_optional(struct device *dev, const char *id)
      {
 -----  return _regulator_get(dev, id, false, false);
 +++++  return _regulator_get(dev, id, OPTIONAL_GET);
      }
      EXPORT_SYMBOL_GPL(regulator_get_optional);
      
@@@@@@@ -1789,7 -1779,7 -1779,7 -1779,7 -1779,7 -1779,7 +1789,7 @@@@@@@ static void _regulator_put(struct regul
        put_device(&rdev->dev);
        mutex_unlock(&rdev->mutex);
      
 -----  kfree(regulator->supply_name);
 +++++  kfree_const(regulator->supply_name);
        kfree(regulator);
      
        module_put(rdev->owner);
@@@@@@@ -2172,6 -2162,8 -2162,6 -2162,6 -2162,6 -2162,6 +2172,8 @@@@@@@ static int _regulator_enable(struct reg
                        if (ret < 0)
                                return ret;
      
+ ++++                  _notifier_call_chain(rdev, REGULATOR_EVENT_ENABLE,
+ ++++                                       NULL);
                } else if (ret < 0) {
                        rdev_err(rdev, "is_enabled() failed: %d\n", ret);
                        return ret;
@@@@@@@ -2476,7 -2468,7 -2466,7 -2466,7 -2466,7 -2466,7 +2478,7 @@@@@@@ static int _regulator_list_voltage(stru
                ret = ops->list_voltage(rdev, selector);
                if (lock)
                        mutex_unlock(&rdev->mutex);
 -----  } else if (rdev->supply) {
 +++++  } else if (rdev->is_switch && rdev->supply) {
                ret = _regulator_list_voltage(rdev->supply, selector, lock);
        } else {
                return -EINVAL;
@@@@@@@ -2534,7 -2526,7 -2524,7 -2524,7 -2524,7 -2524,7 +2536,7 @@@@@@@ int regulator_count_voltages(struct reg
        if (rdev->desc->n_voltages)
                return rdev->desc->n_voltages;
      
 -----  if (!rdev->supply)
 +++++  if (!rdev->is_switch || !rdev->supply)
                return -EINVAL;
      
        return regulator_count_voltages(rdev->supply);
@@@@@@@ -2763,6 -2755,6 -2753,6 -2753,8 -2753,6 -2753,6 +2765,8 @@@@@@@ static int _regulator_set_voltage_time(
                ramp_delay = rdev->constraints->ramp_delay;
        else if (rdev->desc->ramp_delay)
                ramp_delay = rdev->desc->ramp_delay;
+++ ++  else if (rdev->constraints->settling_time)
+++ ++          return rdev->constraints->settling_time;
      
        if (ramp_delay == 0) {
                rdev_dbg(rdev, "ramp_delay not set\n");
@@@@@@@ -2931,10 -2923,8 -2921,8 -2923,8 -2921,8 -2921,8 +2935,10 @@@@@@@ static int regulator_set_voltage_unlock
        if (ret < 0)
                goto out2;
      
 -----  if (rdev->supply && (rdev->desc->min_dropout_uV ||
 -----                          !rdev->desc->ops->get_voltage)) {
 +++++  if (rdev->supply &&
 +++++      regulator_ops_is_valid(rdev->supply->rdev,
 +++++                             REGULATOR_CHANGE_VOLTAGE) &&
 +++++      (rdev->desc->min_dropout_uV || !rdev->desc->ops->get_voltage)) {
                int current_supply_uV;
                int selector;
      
        for (++i; i < num_consumers; ++i) {
                r = regulator_enable(consumers[i].consumer);
                if (r != 0)
 -----                  pr_err("Failed to reename %s: %d\n",
 +++++                  pr_err("Failed to re-enable %s: %d\n",
                               consumers[i].supply, r);
        }
      
@@@@@@@ -3698,17 -3688,21 -3686,21 -3688,21 -3686,21 -3686,21 +3702,17 @@@@@@@ int regulator_bulk_force_disable(int nu
                           struct regulator_bulk_data *consumers)
      {
        int i;
 -----  int ret;
 +++++  int ret = 0;
      
 -----  for (i = 0; i < num_consumers; i++)
 +++++  for (i = 0; i < num_consumers; i++) {
                consumers[i].ret =
                            regulator_force_disable(consumers[i].consumer);
      
 -----  for (i = 0; i < num_consumers; i++) {
 -----          if (consumers[i].ret != 0) {
 +++++          /* Store first error for reporting */
 +++++          if (consumers[i].ret && !ret)
                        ret = consumers[i].ret;
 -----                  goto out;
 -----          }
        }
      
 -----  return 0;
 -----out:
        return ret;
      }
      EXPORT_SYMBOL_GPL(regulator_bulk_force_disable);
@@@@@@@ -4091,11 -4085,6 -4083,6 -4085,6 -4083,6 -4083,6 +4095,11 @@@@@@@ regulator_register(const struct regulat
                mutex_unlock(&regulator_list_mutex);
        }
      
 +++++  if (!rdev->desc->ops->get_voltage &&
 +++++      !rdev->desc->ops->list_voltage &&
 +++++      !rdev->desc->fixed_uV)
 +++++          rdev->is_switch = true;
 +++++
        ret = device_register(&rdev->dev);
        if (ret != 0) {
                put_device(&rdev->dev);
@@@@@@@ -4404,13 -4393,12 -4391,12 -4393,12 -4391,12 -4391,12 +4408,13 @@@@@@@ static void regulator_summary_show_subt
        seq_puts(s, "\n");
      
        list_for_each_entry(consumer, &rdev->consumer_list, list) {
 -----          if (consumer->dev->class == &regulator_class)
 +++++          if (consumer->dev && consumer->dev->class == &regulator_class)
                        continue;
      
                seq_printf(s, "%*s%-*s ",
                           (level + 1) * 3 + 1, "",
 -----                     30 - (level + 1) * 3, dev_name(consumer->dev));
 +++++                     30 - (level + 1) * 3,
 +++++                     consumer->dev ? dev_name(consumer->dev) : "deviceless");
      
                switch (rdev->desc->type) {
                case REGULATOR_VOLTAGE:
@@@@@@@ -4554,16 -4542,6 -4540,6 -4542,6 -4540,6 -4540,6 +4558,16 @@@@@@@ static int __init regulator_init_comple
        if (of_have_populated_dt())
                has_full_constraints = true;
      
 +++++  /*
 +++++   * Regulators may had failed to resolve their input supplies
 +++++   * when were registered, either because the input supply was
 +++++   * not registered yet or because its parent device was not
 +++++   * bound yet. So attempt to resolve the input supplies for
 +++++   * pending regulators before trying to disable unused ones.
 +++++   */
 +++++  class_for_each_device(&regulator_class, NULL, NULL,
 +++++                        regulator_register_resolve_supply);
 +++++
        /* If we have a full configuration then disable any regulators
         * we have permission to change the status for and which are
         * not in use or always_on.  This is effectively the default
index e193bbbb8ffc1beebabd453a06dc8670d159fe0d,cb18b5c4f2db967e05713d7a29dd0433ea4f778a,716abcc834c8be4b8ec59aadeb1e50d3c97c3ece,cb18b5c4f2db967e05713d7a29dd0433ea4f778a,cb18b5c4f2db967e05713d7a29dd0433ea4f778a,cb18b5c4f2db967e05713d7a29dd0433ea4f778a..63922a2167e55a75fb5e3c3f2526bc9f06bcabf2
      #define PFUZE100_REVID            0x3
      #define PFUZE100_FABID            0x4
      
++ +++#define PFUZE100_COINVOL  0x1a
      #define PFUZE100_SW1ABVOL 0x20
      #define PFUZE100_SW1CVOL  0x2e
      #define PFUZE100_SW2VOL           0x35
@@@@@@@ -81,6 -81,6 -82,10 -81,6 -81,6 -81,6 +82,10 @@@@@@@ static const int pfuze100_vsnvs[] = 
        1000000, 1100000, 1200000, 1300000, 1500000, 1800000, 3000000,
      };
      
++ +++static const int pfuze100_coin[] = {
++ +++  2500000, 2700000, 2800000, 2900000, 3000000, 3100000, 3200000, 3300000,
++ +++};
++ +++
      static const int pfuze3000_sw2lo[] = {
        1500000, 1550000, 1600000, 1650000, 1700000, 1750000, 1800000, 1850000,
      };
@@@@@@@ -126,7 -126,7 -131,7 -126,7 -126,7 -126,7 +131,7 @@@@@@@ static int pfuze100_set_ramp_delay(stru
        return ret;
      }
      
 -----static struct regulator_ops pfuze100_ldo_regulator_ops = {
 +++++static const struct regulator_ops pfuze100_ldo_regulator_ops = {
        .enable = regulator_enable_regmap,
        .disable = regulator_disable_regmap,
        .is_enabled = regulator_is_enabled_regmap,
        .get_voltage_sel = regulator_get_voltage_sel_regmap,
      };
      
 -----static struct regulator_ops pfuze100_fixed_regulator_ops = {
 +++++static const struct regulator_ops pfuze100_fixed_regulator_ops = {
        .enable = regulator_enable_regmap,
        .disable = regulator_disable_regmap,
        .is_enabled = regulator_is_enabled_regmap,
        .list_voltage = regulator_list_voltage_linear,
      };
      
 -----static struct regulator_ops pfuze100_sw_regulator_ops = {
 +++++static const struct regulator_ops pfuze100_sw_regulator_ops = {
        .list_voltage = regulator_list_voltage_linear,
        .set_voltage_sel = regulator_set_voltage_sel_regmap,
        .get_voltage_sel = regulator_get_voltage_sel_regmap,
        .set_ramp_delay = pfuze100_set_ramp_delay,
      };
      
 -----static struct regulator_ops pfuze100_swb_regulator_ops = {
 +++++static const struct regulator_ops pfuze100_swb_regulator_ops = {
        .enable = regulator_enable_regmap,
        .disable = regulator_disable_regmap,
        .list_voltage = regulator_list_voltage_table,
                .stby_mask = 0x20,      \
        }
      
++ +++#define PFUZE100_COIN_REG(_chip, _name, base, mask, voltages)     \
++ +++  [_chip ## _ ##  _name] = {      \
++ +++          .desc = {       \
++ +++                  .name = #_name, \
++ +++                  .n_voltages = ARRAY_SIZE(voltages),     \
++ +++                  .ops = &pfuze100_swb_regulator_ops,     \
++ +++                  .type = REGULATOR_VOLTAGE,      \
++ +++                  .id = _chip ## _ ## _name,      \
++ +++                  .owner = THIS_MODULE,   \
++ +++                  .volt_table = voltages, \
++ +++                  .vsel_reg = (base),     \
++ +++                  .vsel_mask = (mask),    \
++ +++                  .enable_reg = (base),   \
++ +++                  .enable_mask = 0x8,     \
++ +++          },      \
++ +++  }
++ +++
      #define PFUZE3000_VCC_REG(_chip, _name, base, min, max, step)     {       \
        .desc = {       \
                .name = #_name, \
@@@@@@@ -317,6 -317,6 -339,7 -317,6 -317,6 -317,6 +339,7 @@@@@@@ static struct pfuze_regulator pfuze200_
        PFUZE100_VGEN_REG(PFUZE200, VGEN4, PFUZE100_VGEN4VOL, 1800000, 3300000, 100000),
        PFUZE100_VGEN_REG(PFUZE200, VGEN5, PFUZE100_VGEN5VOL, 1800000, 3300000, 100000),
        PFUZE100_VGEN_REG(PFUZE200, VGEN6, PFUZE100_VGEN6VOL, 1800000, 3300000, 100000),
++ +++  PFUZE100_COIN_REG(PFUZE200, COIN, PFUZE100_COINVOL, 0x7, pfuze100_coin),
      };
      
      static struct pfuze_regulator pfuze3000_regulators[] = {
@@@@@@@ -371,6 -371,6 -394,7 -371,6 -371,6 -371,6 +394,7 @@@@@@@ static struct of_regulator_match pfuze2
        { .name = "vgen4",      },
        { .name = "vgen5",      },
        { .name = "vgen6",      },
++ +++  { .name = "coin",       },
      };
      
      /* PFUZE3000 */
index 716191046a70782b0007033dda6e1402c0d68ea3,4864b9d742c0f7915cc792aaacd692c2a7f305b0,4864b9d742c0f7915cc792aaacd692c2a7f305b0,4864b9d742c0f7915cc792aaacd692c2a7f305b0,4864b9d742c0f7915cc792aaacd692c2a7f305b0,edaf93cc782390a7541ea1ec2512958fa0aea95e..56aada387887766048b822c362cb5520493bcda5
@@@@@@@ -452,12 -452,12 -452,12 -452,12 -452,12 -452,10 +452,10 @@@@@@@ static int twl6030smps_map_voltage(stru
                        vsel = 62;
                else if ((min_uV > 1800000) && (min_uV <= 1900000))
                        vsel = 61;
 -----          else if ((min_uV > 1350000) && (min_uV <= 1800000))
 +++++          else if ((min_uV > 1500000) && (min_uV <= 1800000))
                        vsel = 60;
                else if ((min_uV > 1350000) && (min_uV <= 1500000))
                        vsel = 59;
-----           else if ((min_uV > 1300000) && (min_uV <= 1350000))
-----                   vsel = 58;
                else
                        return -EINVAL;
                break;
index c9f795e9a2ee26aaf562e9a97a2fe2f963a2f054,ad3e5158e586dc841e9cd37492ec7104d60e7a81,ad3e5158e586dc841e9cd37492ec7104d60e7a81,598a493b39270e555dab9f52bd9e83205bcf085e,ad3e5158e586dc841e9cd37492ec7104d60e7a81,ad3e5158e586dc841e9cd37492ec7104d60e7a81..117699d1f7df4f72491bd65eccec39a160acf646
@@@@@@@ -65,7 -65,7 -65,7 -65,7 -65,7 -65,7 +65,7 @@@@@@@ struct regulator_state 
        int uV; /* suspend voltage */
        unsigned int mode; /* suspend regulator operating mode */
        int enabled; /* is regulator enabled in this suspend state */
 -----  int disabled; /* is the regulator disbled in this suspend state */
 +++++  int disabled; /* is the regulator disabled in this suspend state */
      };
      
      /**
       * @initial_state: Suspend state to set by default.
       * @initial_mode: Mode to set at startup.
       * @ramp_delay: Time to settle down after voltage change (unit: uV/us)
+++ ++ * @settling_time: Time to settle down after voltage change when voltage
+++ ++ *                   change is non-linear (unit: microseconds).
       * @active_discharge: Enable/disable active discharge. The enum
       *                      regulator_active_discharge values are used for
       *                      initialisation.
@@@@@@@ -149,6 -149,6 -149,6 -151,7 -149,6 -149,6 +151,7 @@@@@@@ struct regulation_constraints 
        unsigned int initial_mode;
      
        unsigned int ramp_delay;
+++ ++  unsigned int settling_time;
        unsigned int enable_time;
      
        unsigned int active_discharge;
This page took 0.104619 seconds and 4 git commands to generate.