]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge remote-tracking branches 'regulator/topic/db8500', 'regulator/topic/gpio',...
authorMark Brown <broonie@linaro.org>
Thu, 23 Jan 2014 12:01:27 +0000 (12:01 +0000)
committerMark Brown <broonie@linaro.org>
Thu, 23 Jan 2014 12:01:27 +0000 (12:01 +0000)
1  2  3  4  5  6  7  8  9  10 
drivers/regulator/Kconfig
drivers/regulator/Makefile
drivers/regulator/gpio-regulator.c
drivers/regulator/mc13892-regulator.c
drivers/regulator/pfuze100-regulator.c

index 63bc1bab37e3445a2ad3363304e4ac0f164c8e87,ce785f481281d2532dca6514e07a304ccfcb7b04,dfe58096b374a22fbeb001a1f430cb6afb2d1461,ce785f481281d2532dca6514e07a304ccfcb7b04,ce785f481281d2532dca6514e07a304ccfcb7b04,11ee053419265e943b49b65071152df6113ca6bf,ce785f481281d2532dca6514e07a304ccfcb7b04,dfe58096b374a22fbeb001a1f430cb6afb2d1461,ce785f481281d2532dca6514e07a304ccfcb7b04,b4a445e7f78de6d9e921fd366a39d3f9192d7f85..77711d4bd3771cae693f89b154c4c8ebaff45f98
@@@@@@@@@@@ -28,6 -28,6 -28,16 -28,6 -28,6 -28,6 -28,6 -28,16 -28,6 -28,6 +28,6 @@@@@@@@@@@ config REGULATOR_DEBU
                help
                  Say yes here to enable debugging support.
          
  -    -  config REGULATOR_DUMMY
  -    -        bool "Provide a dummy regulator if regulator lookups fail"
  -    -        help
  -    -          If this option is enabled then when a regulator lookup fails
  -    -          and the board has not specified that it has provided full
  -    -          constraints the regulator core will provide an always
  -    -          enabled dummy regulator, allowing consumer drivers to continue.
  -    -  
  -    -          A warning will be generated when this substitution is done.
  -    -  
          config REGULATOR_FIXED_VOLTAGE
                tristate "Fixed voltage regulator support"
                help
@@@@@@@@@@@ -70,14 -70,6 -80,6 -70,6 -70,6 -70,6 -70,6 -80,6 -70,6 -70,6 +70,14 @@@@@@@@@@@ config REGULATOR_88PM860
                help
                  This driver supports 88PM8607 voltage regulator chips.
          
 +++++++++config REGULATOR_ACT8865
 +++++++++      tristate "Active-semi act8865 voltage regulator"
 +++++++++      depends on I2C
 +++++++++      select REGMAP_I2C
 +++++++++      help
 +++++++++        This driver controls a active-semi act8865 voltage output
 +++++++++        regulator via I2C bus.
 +++++++++
          config REGULATOR_AD5398
                tristate "Analog Devices AD5398/AD5821 regulators"
                depends on I2C
@@@@@@@@@@@ -131,14 -123,14 -133,6 -123,14 -123,14 -123,14 -123,14 -133,6 -123,14 -123,14 +131,14 @@@@@@@@@@@ config REGULATOR_AS371
                  This driver provides support for the voltage regulators on the
                  AS3711 PMIC
          
  +    +  config REGULATOR_AS3722
  +    +        tristate "AMS AS3722 PMIC Regulators"
  +    +        depends on MFD_AS3722
  +    +        help
  +    +          This driver provides support for the voltage regulators on the
  +    +          AS3722 PMIC. This will enable support for all the software
  +    +          controllable DCDC/LDO regulators.
  +    +  
          config REGULATOR_DA903X
                tristate "Dialog Semiconductor DA9030/DA9034 regulators"
                depends on PMIC_DA903X
@@@@@@@@@@@ -257,6 -249,6 -251,6 -249,6 -249,6 -249,13 -249,6 -251,6 -249,6 -249,6 +257,13 @@@@@@@@@@@ config REGULATOR_LP878
                help
                  This driver supports LP8788 voltage regulator chip.
          
+++++ ++++config REGULATOR_MAX14577
+++++ ++++      tristate "Maxim 14577 regulator"
+++++ ++++      depends on MFD_MAX14577
+++++ ++++      help
+++++ ++++        This driver controls a Maxim 14577 regulator via I2C bus.
+++++ ++++        The regulators include safeout LDO and current regulator 'CHARGER'.
+++++ ++++
          config REGULATOR_MAX1586
                tristate "Maxim 1586/1587 voltage regulator"
                depends on I2C
@@@@@@@@@@@ -392,7 -384,7 -386,7 -384,7 -384,7 -391,7 -384,7 -386,7 -384,7 -384,7 +399,7 @@@@@@@@@@@ config REGULATOR_PCF5063
                 on PCF50633
          
          config REGULATOR_PFUZE100
---------       tristate "Support regulators on Freescale PFUZE100 PMIC"
+++++++++       tristate "Freescale PFUZE100 regulator driver"
                depends on I2C
                select REGMAP_I2C
                help
@@@@@@@@@@@ -435,14 -427,14 -429,6 -427,14 -427,14 -434,14 -427,14 -429,6 -427,14 -427,14 +442,14 @@@@@@@@@@@ config REGULATOR_TI_AB
                  on TI SoCs may be unstable without enabling this as it provides
                  device specific optimized bias to allow/optimize functionality.
          
  +    +  config REGULATOR_STW481X_VMMC
  +    +        bool "ST Microelectronics STW481X VMMC regulator"
  +    +        depends on MFD_STW481X
  +    +        default y if MFD_STW481X
  +    +        help
  +    +          This driver supports the internal VMMC regulator in the STw481x
  +    +          PMIC chips.
  +    +  
          config REGULATOR_TPS51632
                tristate "TI TPS51632 Power Regulator"
                depends on I2C
index 3bb3a5591b958c7d32c8a97c5f83f6d211c32b09,01c597ea17441353dfbeded58ac2db4da7810bc8,185cce246022d25f510ae5bd247a81acf3605882,01c597ea17441353dfbeded58ac2db4da7810bc8,01c597ea17441353dfbeded58ac2db4da7810bc8,654bd43a74268e028d0f1bcac7238a84b39c80aa,01c597ea17441353dfbeded58ac2db4da7810bc8,185cce246022d25f510ae5bd247a81acf3605882,01c597ea17441353dfbeded58ac2db4da7810bc8,01c597ea17441353dfbeded58ac2db4da7810bc8..979f9ddcf259bd5a82b6b5d91f81981902e6185c
@@@@@@@@@@@ -3,7 -3,7 -3,7 -3,7 -3,7 -3,7 -3,7 -3,7 -3,7 -3,7 +3,7 @@@@@@@@@@@
          #
          
          
  -    -  obj-$(CONFIG_REGULATOR) += core.o dummy.o fixed-helper.o helpers.o
  +    +  obj-$(CONFIG_REGULATOR) += core.o dummy.o fixed-helper.o helpers.o devres.o
          obj-$(CONFIG_OF) += of_regulator.o
          obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o
          obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o
@@@@@@@@@@@ -14,12 -14,11 -14,10 -14,11 -14,11 -14,11 -14,11 -14,10 -14,11 -14,11 +14,12 @@@@@@@@@@@ obj-$(CONFIG_REGULATOR_88PM8607) += 88p
          obj-$(CONFIG_REGULATOR_AAT2870) += aat2870-regulator.o
          obj-$(CONFIG_REGULATOR_AB3100) += ab3100.o
          obj-$(CONFIG_REGULATOR_AB8500)        += ab8500-ext.o ab8500.o
 +++++++++obj-$(CONFIG_REGULATOR_ACT8865) += act8865-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_AS3711) += as3711-regulator.o
  +    +  obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o
          obj-$(CONFIG_REGULATOR_DA903X)        += da903x.o
          obj-$(CONFIG_REGULATOR_DA9052)        += da9052-regulator.o
          obj-$(CONFIG_REGULATOR_DA9055)        += da9055-regulator.o
@@@@@@@@@@@ -36,6 -35,6 -34,6 -35,6 -35,6 -35,7 -35,6 -34,6 -35,6 -35,6 +36,7 @@@@@@@@@@@ obj-$(CONFIG_REGULATOR_LP872X) += lp872
          obj-$(CONFIG_REGULATOR_LP8788) += lp8788-buck.o
          obj-$(CONFIG_REGULATOR_LP8788) += lp8788-ldo.o
          obj-$(CONFIG_REGULATOR_LP8755) += lp8755.o
+++++ ++++obj-$(CONFIG_REGULATOR_MAX14577) += max14577.o
          obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o
          obj-$(CONFIG_REGULATOR_MAX8649)       += max8649.o
          obj-$(CONFIG_REGULATOR_MAX8660) += max8660.o
@@@@@@@@@@@ -58,7 -57,7 -56,6 -57,7 -57,7 -58,7 -57,7 -56,6 -57,7 -57,7 +59,7 @@@@@@@@@@@ obj-$(CONFIG_REGULATOR_PCF50633) += pcf
          obj-$(CONFIG_REGULATOR_RC5T583)  += rc5t583-regulator.o
          obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o
          obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
  +    +  obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o
          obj-$(CONFIG_REGULATOR_TI_ABB) += ti-abb-regulator.o
          obj-$(CONFIG_REGULATOR_TPS6105X) += tps6105x-regulator.o
          obj-$(CONFIG_REGULATOR_TPS62360) += tps62360-regulator.o
index 234960dc96077389460632cdc832f0c6ea5e69e1,04406a918c041b5773adcf9adf331eadf289caf4,49fe20f58d2ab1ed85dd521354921a2e83021de3,04406a918c041b5773adcf9adf331eadf289caf4,04406a918c041b5773adcf9adf331eadf289caf4,04406a918c041b5773adcf9adf331eadf289caf4,04406a918c041b5773adcf9adf331eadf289caf4,98a98ffa7fe07d2bcb23f2c9cad593b416aaf203,04406a918c041b5773adcf9adf331eadf289caf4,234960dc96077389460632cdc832f0c6ea5e69e1..c0a1d00b78c932a6982961334f9e3e9501592c50
@@@@@@@@@@@ -139,7 -139,6 -139,7 -139,6 -139,6 -139,6 -139,6 -139,6 -139,6 -139,7 +139,7 @@@@@@@@@@@ of_get_gpio_regulator_config(struct dev
                struct property *prop;
                const char *regtype;
                int proplen, gpio, i;
 + ++++++       int ret;
          
                config = devm_kzalloc(dev,
                                sizeof(struct gpio_regulator_config),
                }
                config->nr_states = i;
          
 - ------       of_property_read_string(np, "regulator-type", &regtype);
 - ------ 
 - ------       if (!strncmp("voltage", regtype, 7))
 - ------               config->type = REGULATOR_VOLTAGE;
 - ------       else if (!strncmp("current", regtype, 7))
 - ------               config->type = REGULATOR_CURRENT;
++ +++++++      config->type = REGULATOR_VOLTAGE;
 + ++++++       ret = of_property_read_string(np, "regulator-type", &regtype);
-        -      if (ret < 0) {
-        -              dev_err(dev, "Missing 'regulator-type' property\n");
-        -              return ERR_PTR(-EINVAL);
++ +++++++      if (ret >= 0) {
++ +++++++              if (!strncmp("voltage", regtype, 7))
++ +++++++                      config->type = REGULATOR_VOLTAGE;
++ +++++++              else if (!strncmp("current", regtype, 7))
++ +++++++                      config->type = REGULATOR_CURRENT;
++ +++++++              else
++ +++++++                      dev_warn(dev, "Unknown regulator-type '%s'\n",
++ +++++++                               regtype);
 + ++++++       }
          
-        -      if (!strncmp("voltage", regtype, 7))
-        -              config->type = REGULATOR_VOLTAGE;
-        -      else if (!strncmp("current", regtype, 7))
-        -              config->type = REGULATOR_CURRENT;
-        -
                return config;
          }
          
@@@@@@@@@@@ -288,6 -283,6 -289,7 -283,6 -283,6 -283,6 -283,6 -283,7 -283,6 -288,6 +289,6 @@@@@@@@@@@ static int gpio_regulator_probe(struct 
                        dev_err(&pdev->dev, "No regulator type set\n");
                        ret = -EINVAL;
                        goto err_memgpio;
  -    -                break;
                }
          
                drvdata->nr_gpios = config->nr_gpios;
index 96c9f80d9550b28ceafdab692fe996588c6dd180,96c9f80d9550b28ceafdab692fe996588c6dd180,1037e07937cfba7080de781a0db63b42cb6db679,96c9f80d9550b28ceafdab692fe996588c6dd180,96c9f80d9550b28ceafdab692fe996588c6dd180,96c9f80d9550b28ceafdab692fe996588c6dd180,96c9f80d9550b28ceafdab692fe996588c6dd180,35bd53ba4a480782e37c29a236c63523a143d9ab,96c9f80d9550b28ceafdab692fe996588c6dd180,96c9f80d9550b28ceafdab692fe996588c6dd180..f374fa57220f6d7699c739ea41569eed4538949d
@@@@@@@@@@@ -274,25 -274,25 -274,25 -274,25 -274,25 -274,25 -274,25 -274,25 -274,25 -274,25 +274,25 @@@@@@@@@@@ static struct mc13xxx_regulator mc13892
                MC13892_SW_DEFINE(SW4, SWITCHERS3, SWITCHERS3, mc13892_sw),
                MC13892_FIXED_DEFINE(SWBST, SWITCHERS5, mc13892_swbst),
                MC13892_FIXED_DEFINE(VIOHI, REGULATORMODE0, mc13892_viohi),
------- --      MC13892_DEFINE_REGU(VPLL, REGULATORMODE0, REGULATORSETTING0,    \
+++++++ ++      MC13892_DEFINE_REGU(VPLL, REGULATORMODE0, REGULATORSETTING0,
                        mc13892_vpll),
------- --      MC13892_DEFINE_REGU(VDIG, REGULATORMODE0, REGULATORSETTING0,    \
+++++++ ++      MC13892_DEFINE_REGU(VDIG, REGULATORMODE0, REGULATORSETTING0,
                        mc13892_vdig),
------- --      MC13892_DEFINE_REGU(VSD, REGULATORMODE1, REGULATORSETTING1,     \
+++++++ ++      MC13892_DEFINE_REGU(VSD, REGULATORMODE1, REGULATORSETTING1,
                        mc13892_vsd),
------- --      MC13892_DEFINE_REGU(VUSB2, REGULATORMODE0, REGULATORSETTING0,   \
+++++++ ++      MC13892_DEFINE_REGU(VUSB2, REGULATORMODE0, REGULATORSETTING0,
                        mc13892_vusb2),
------- --      MC13892_DEFINE_REGU(VVIDEO, REGULATORMODE1, REGULATORSETTING1,  \
+++++++ ++      MC13892_DEFINE_REGU(VVIDEO, REGULATORMODE1, REGULATORSETTING1,
                        mc13892_vvideo),
------- --      MC13892_DEFINE_REGU(VAUDIO, REGULATORMODE1, REGULATORSETTING1,  \
+++++++ ++      MC13892_DEFINE_REGU(VAUDIO, REGULATORMODE1, REGULATORSETTING1,
                        mc13892_vaudio),
------- --      MC13892_DEFINE_REGU(VCAM, REGULATORMODE1, REGULATORSETTING0,    \
+++++++ ++      MC13892_DEFINE_REGU(VCAM, REGULATORMODE1, REGULATORSETTING0,
                        mc13892_vcam),
------- --      MC13892_DEFINE_REGU(VGEN1, REGULATORMODE0, REGULATORSETTING0,   \
+++++++ ++      MC13892_DEFINE_REGU(VGEN1, REGULATORMODE0, REGULATORSETTING0,
                        mc13892_vgen1),
------- --      MC13892_DEFINE_REGU(VGEN2, REGULATORMODE0, REGULATORSETTING0,   \
+++++++ ++      MC13892_DEFINE_REGU(VGEN2, REGULATORMODE0, REGULATORSETTING0,
                        mc13892_vgen2),
------- --      MC13892_DEFINE_REGU(VGEN3, REGULATORMODE1, REGULATORSETTING0,   \
+++++++ ++      MC13892_DEFINE_REGU(VGEN3, REGULATORMODE1, REGULATORSETTING0,
                        mc13892_vgen3),
                MC13892_FIXED_DEFINE(VUSB, USB1, mc13892_vusb),
                MC13892_GPO_DEFINE(GPO1, POWERMISC, mc13892_gpo),
@@@@@@@@@@@ -476,8 -476,8 -476,8 -476,8 -476,8 -476,8 -476,8 -476,8 -476,8 -476,8 +476,8 @@@@@@@@@@@ static int mc13892_sw_regulator_set_vol
                }
          
                mc13xxx_lock(priv->mc13xxx);
------- --      ret = mc13xxx_reg_rmw(priv->mc13xxx, mc13892_regulators[id].vsel_reg, mask,
------- --                            reg_value);
+++++++ ++      ret = mc13xxx_reg_rmw(priv->mc13xxx, mc13892_regulators[id].vsel_reg,
+++++++ ++                            mask, reg_value);
                mc13xxx_unlock(priv->mc13xxx);
          
                return ret;
@@@@@@@@@@@ -611,27 -611,27 -611,43 -611,27 -611,27 -611,27 -611,27 -611,43 -611,27 -611,27 +611,27 @@@@@@@@@@@ static int mc13892_regulator_probe(stru
                        config.driver_data = priv;
                        config.of_node = node;
          
  -    -                priv->regulators[i] = regulator_register(desc, &config);
  +    +                priv->regulators[i] = devm_regulator_register(&pdev->dev, desc,
  +    +                                                              &config);
                        if (IS_ERR(priv->regulators[i])) {
                                dev_err(&pdev->dev, "failed to register regulator %s\n",
                                        mc13892_regulators[i].desc.name);
  -    -                        ret = PTR_ERR(priv->regulators[i]);
  -    -                        goto err;
  +    +                        return PTR_ERR(priv->regulators[i]);
                        }
                }
          
                return 0;
  -    -  err:
  -    -        while (--i >= 0)
  -    -                regulator_unregister(priv->regulators[i]);
  -    -        return ret;
          
          err_unlock:
                mc13xxx_unlock(mc13892);
                return ret;
          }
          
  -    -  static int mc13892_regulator_remove(struct platform_device *pdev)
  -    -  {
  -    -        struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev);
  -    -        int i;
  -    -  
  -    -        for (i = 0; i < priv->num_regulators; i++)
  -    -                regulator_unregister(priv->regulators[i]);
  -    -  
  -    -        return 0;
  -    -  }
  -    -  
          static struct platform_driver mc13892_regulator_driver = {
                .driver = {
                        .name   = "mc13892-regulator",
                        .owner  = THIS_MODULE,
                },
  -    -        .remove = mc13892_regulator_remove,
                .probe  = mc13892_regulator_probe,
          };
          
index c31e0485de25252c0a32a220fb40630a03db0b11,ba67b2c4e2e7fe4da91fdd6afd269ab1233a284e,ba67b2c4e2e7fe4da91fdd6afd269ab1233a284e,ba67b2c4e2e7fe4da91fdd6afd269ab1233a284e,ba67b2c4e2e7fe4da91fdd6afd269ab1233a284e,ba67b2c4e2e7fe4da91fdd6afd269ab1233a284e,ba67b2c4e2e7fe4da91fdd6afd269ab1233a284e,ba67b2c4e2e7fe4da91fdd6afd269ab1233a284e,ba67b2c4e2e7fe4da91fdd6afd269ab1233a284e,f68e5d5a011e3b532d10bea19c64dff1b00907d2..ab174f20ca11f473c889848b1d7e6b7545a9e3ef
          
          #define PFUZE100_DEVICEID     0x0
          #define PFUZE100_REVID                0x3
 -------- #define PFUZE100_FABID                0x3
 ++++++++ #define PFUZE100_FABID                0x4
          
          #define PFUZE100_SW1ABVOL     0x20
          #define PFUZE100_SW1CVOL      0x2e
@@@@@@@@@@@ -308,22 -308,16 -308,16 -308,16 -308,16 -308,16 -308,16 -308,16 -308,16 -308,25 +308,25 @@@@@@@@@@@ static int pfuze_identify(struct pfuze_
                if (ret)
                        return ret;
          
 --------       if (value & 0x0f) {
 ++++++++       switch (value & 0x0f) {
-                       /* Freescale misprogrammed 1-3% of parts prior to week 8 of 2013 as ID=8 */
-                       case 0x8:
-                               dev_info(pfuze_chip->dev, "Assuming misprogrammed ID=0x8");
-                       case 0x0:
-                               break;
-                       default:
-                               dev_warn(pfuze_chip->dev, "Illegal ID: %x\n", value);
-                               return -ENODEV;
+++++++++       /*
+++++++++        * Freescale misprogrammed 1-3% of parts prior to week 8 of 2013
+++++++++        * as ID=8
+++++++++        */
+++++++++       case 0x8:
+++++++++               dev_info(pfuze_chip->dev, "Assuming misprogrammed ID=0x8");
+++++++++       case 0x0:
+++++++++               break;
+++++++++       default:
+                       dev_warn(pfuze_chip->dev, "Illegal ID: %x\n", value);
+                       return -ENODEV;
                }
          
                ret = regmap_read(pfuze_chip->regmap, PFUZE100_REVID, &value);
                if (ret)
                        return ret;
                dev_info(pfuze_chip->dev,
 ---------               "Full lay: %x, Metal lay: %x\n",
 +++++++++               "Full layer: %x, Metal layer: %x\n",
                         (value & 0xf0) >> 4, value & 0x0f);
          
                ret = regmap_read(pfuze_chip->regmap, PFUZE100_FABID, &value);
@@@@@@@@@@@ -408,31 -402,31 -402,31 -402,31 -402,31 -402,31 -402,31 -402,31 -402,31 -411,18 +411,18 @@@@@@@@@@@ static int pfuze100_regulator_probe(str
                        config.driver_data = pfuze_chip;
                        config.of_node = match_of_node(i);
          
---------               pfuze_chip->regulators[i] = regulator_register(desc, &config);
+++++++++               pfuze_chip->regulators[i] =
+++++++++                       devm_regulator_register(&client->dev, desc, &config);
                        if (IS_ERR(pfuze_chip->regulators[i])) {
                                dev_err(&client->dev, "register regulator%s failed\n",
                                        pfuze100_regulators[i].desc.name);
---------                       ret = PTR_ERR(pfuze_chip->regulators[i]);
---------                       while (--i >= 0)
---------                               regulator_unregister(pfuze_chip->regulators[i]);
---------                       return ret;
+++++++++                       return PTR_ERR(pfuze_chip->regulators[i]);
                        }
                }
          
                return 0;
          }
          
--------- static int pfuze100_regulator_remove(struct i2c_client *client)
--------- {
---------       int i;
---------       struct pfuze_chip *pfuze_chip = i2c_get_clientdata(client);
--------- 
---------       for (i = 0; i < PFUZE100_MAX_REGULATOR; i++)
---------               regulator_unregister(pfuze_chip->regulators[i]);
--------- 
---------       return 0;
--------- }
--------- 
          static struct i2c_driver pfuze_driver = {
                .id_table = pfuze_device_id,
                .driver = {
                        .of_match_table = pfuze_dt_ids,
                },
                .probe = pfuze100_regulator_probe,
---------       .remove = pfuze100_regulator_remove,
          };
          module_i2c_driver(pfuze_driver);