Merge remote-tracking branches 'regulator/topic/rn5t618', 'regulator/topic/rpm',...
authorMark Brown <broonie@kernel.org>
Fri, 5 Dec 2014 11:14:40 +0000 (11:14 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 5 Dec 2014 11:14:40 +0000 (11:14 +0000)
1  2  3  4  5  6 
drivers/regulator/qcom_rpm-regulator.c
drivers/regulator/s2mpa01.c
drivers/regulator/s2mps11.c

index dabd28a359dc3a7bad5edf0aaa59fba620080be0,b55cd5b50ebe546da8c6b096a93e06c5e772e218,fbcbd3fe501e6ef6deecd1bd98098f08c12d80ff,b55cd5b50ebe546da8c6b096a93e06c5e772e218,b55cd5b50ebe546da8c6b096a93e06c5e772e218,b55cd5b50ebe546da8c6b096a93e06c5e772e218..183598b111f96457a686726b4c0ddcace2968a2b
@@@@@@@ -183,6 -183,6 -183,13 -183,6 -183,6 -183,6 +183,13 @@@@@@@ static const struct regulator_linear_ra
        REGULATOR_LINEAR_RANGE(1500000,  64, 100, 50000),
      };
      
++ +++static const struct regulator_linear_range smb208_ranges[] = {
++ +++  REGULATOR_LINEAR_RANGE( 375000,   0,  29, 12500),
++ +++  REGULATOR_LINEAR_RANGE( 750000,  30,  89, 12500),
++ +++  REGULATOR_LINEAR_RANGE(1500000,  90, 153, 25000),
++ +++  REGULATOR_LINEAR_RANGE(3100000, 154, 234, 25000),
++ +++};
++ +++
      static const struct regulator_linear_range ncp_ranges[] = {
        REGULATOR_LINEAR_RANGE(1500000,   0,  31, 50000),
      };
@@@@@@@ -559,6 -559,6 -566,16 -559,6 -559,6 -559,6 +566,16 @@@@@@@ static const struct qcom_rpm_reg pm8921
        .parts = &rpm8960_switch_parts,
      };
      
++ +++static const struct qcom_rpm_reg smb208_smps = {
++ +++  .desc.linear_ranges = smb208_ranges,
++ +++  .desc.n_linear_ranges = ARRAY_SIZE(smb208_ranges),
++ +++  .desc.n_voltages = 235,
++ +++  .desc.ops = &uV_ops,
++ +++  .parts = &rpm8960_smps_parts,
++ +++  .supports_force_mode_auto = false,
++ +++  .supports_force_mode_bypass = false,
++ +++};
++ +++
      static const struct of_device_id rpm_of_match[] = {
        { .compatible = "qcom,rpm-pm8058-pldo",     .data = &pm8058_pldo },
        { .compatible = "qcom,rpm-pm8058-nldo",     .data = &pm8058_nldo },
        { .compatible = "qcom,rpm-pm8921-ftsmps",   .data = &pm8921_ftsmps },
        { .compatible = "qcom,rpm-pm8921-ncp",      .data = &pm8921_ncp },
        { .compatible = "qcom,rpm-pm8921-switch",   .data = &pm8921_switch },
++ +++
++ +++  { .compatible = "qcom,rpm-smb208", .data = &smb208_smps },
        { }
      };
      MODULE_DEVICE_TABLE(of, rpm_of_match);
@@@@@@@ -643,6 -643,10 -662,10 -643,10 -643,10 -643,10 +662,6 @@@@@@@ static int rpm_reg_probe(struct platfor
        match = of_match_device(rpm_of_match, &pdev->dev);
        template = match->data;
      
 -----  initdata = of_get_regulator_init_data(&pdev->dev, pdev->dev.of_node);
 -----  if (!initdata)
 -----          return -EINVAL;
 -----
        vreg = devm_kmalloc(&pdev->dev, sizeof(*vreg), GFP_KERNEL);
        if (!vreg) {
                dev_err(&pdev->dev, "failed to allocate vreg\n");
                return -ENODEV;
        }
      
 +++++  initdata = of_get_regulator_init_data(&pdev->dev, pdev->dev.of_node,
 +++++                                        &vreg->desc);
 +++++  if (!initdata)
 +++++          return -EINVAL;
 +++++
        key = "reg";
        ret = of_property_read_u32(pdev->dev.of_node, key, &val);
        if (ret) {
index 7633b9bfbe6e971dc63447aa7caa334407819aae,4acefa6b462e0d8e362866b1b86bc2ca4177bb00,4acefa6b462e0d8e362866b1b86bc2ca4177bb00,4acefa6b462e0d8e362866b1b86bc2ca4177bb00,2263071414e2bf9bc5d00f3bdc2e8b5088aadbd7,4acefa6b462e0d8e362866b1b86bc2ca4177bb00..5db4e12a7e0479bbcef860e7c2cda2d8ac3116c1
@@@@@@@ -298,7 -298,7 -298,7 -298,7 -298,7 -298,7 +298,7 @@@@@@@ static struct regulator_ops s2mpa01_buc
        .enable_mask    = S2MPA01_ENABLE_MASK                   \
      }
      
---- -static struct regulator_desc regulators[] = {
++++ +static const struct regulator_desc regulators[] = {
        regulator_desc_ldo(1, STEP_25_MV),
        regulator_desc_ldo(2, STEP_50_MV),
        regulator_desc_ldo(3, STEP_50_MV),
@@@@@@@ -341,7 -341,7 -341,7 -341,7 -341,7 -341,7 +341,7 @@@@@@@ static int s2mpa01_pmic_probe(struct pl
      {
        struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
        struct sec_platform_data *pdata = dev_get_platdata(iodev->dev);
 -----  struct of_regulator_match rdata[S2MPA01_REGULATOR_MAX];
 +++++  struct of_regulator_match rdata[S2MPA01_REGULATOR_MAX] = { };
        struct device_node *reg_np = NULL;
        struct regulator_config config = { };
        struct s2mpa01_info *s2mpa01;
index b4ae022091eb657440e89cb49aa844d37faab4ad,adab82d5279f0696319f53d04e30b07615121dbb,adab82d5279f0696319f53d04e30b07615121dbb,adab82d5279f0696319f53d04e30b07615121dbb,adab82d5279f0696319f53d04e30b07615121dbb,7f59e67252e71db0dc8b7d86675ccb1129937f59..2fa99a85853ff091bc5074c04f8cab31998362e0
@@@@@@@ -845,7 -845,7 -845,7 -845,7 -845,7 -845,7 +845,7 @@@@@@@ static int s2mps11_pmic_probe(struct pl
                return -EINVAL;
        };
      
-----   s2mps11->ext_control_gpio = devm_kzalloc(&pdev->dev,
+++++   s2mps11->ext_control_gpio = devm_kmalloc(&pdev->dev,
                        sizeof(*s2mps11->ext_control_gpio) * s2mps11->rdev_num,
                        GFP_KERNEL);
        if (!s2mps11->ext_control_gpio)
@@@@@@@ -886,7 -886,6 -886,6 -886,6 -886,6 -886,6 +886,7 @@@@@@@ common_reg
        config.regmap = iodev->regmap_pmic;
        config.driver_data = s2mps11;
        config.ena_gpio_flags = GPIOF_OUT_INIT_HIGH;
 +++++  config.ena_gpio_initialized = true;
        for (i = 0; i < s2mps11->rdev_num; i++) {
                struct regulator_dev *regulator;