Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge remote-tracking branches 'regulator/topic/s5m8767', 'regulator/topic/stub', 'regulator/topic/tps65090', 'regulator/topic/tps65217' and 'regulator/topic/tps65218' into regulator-next

+237 -71
+4
Documentation/devicetree/bindings/regulator/tps65090.txt
··· 21 21 number should be provided. If it is externally controlled and no GPIO 22 22 entry then driver will just configure this rails as external control 23 23 and will not provide any enable/disable APIs. 24 + - ti,overcurrent-wait: This is applicable to FET registers, which have a 25 + poorly defined "overcurrent wait" field. If this property is present it 26 + should be between 0 - 3. If this property isn't present we won't touch the 27 + "overcurrent wait" field and we'll leave it to the BIOS/EC to deal with. 24 28 25 29 Each regulator is defined using the standard binding for regulators. 26 30
+12 -25
drivers/regulator/s5m8767.c
··· 28 28 struct device *dev; 29 29 struct sec_pmic_dev *iodev; 30 30 int num_regulators; 31 - struct regulator_dev **rdev; 32 31 struct sec_opmode_data *opmode; 33 32 34 33 int ramp_delay; ··· 528 529 return 0; 529 530 } 530 531 531 - static void s5m8767_pmic_dt_parse_ext_control_gpio(struct sec_pmic_dev *iodev, 532 - struct sec_regulator_data *rdata, 533 - struct device_node *reg_np) 534 - { 535 - rdata->ext_control_gpio = of_get_named_gpio(reg_np, 536 - "s5m8767,pmic-ext-control-gpios", 0); 537 - if (!gpio_is_valid(rdata->ext_control_gpio)) 538 - rdata->ext_control_gpio = 0; 539 - } 540 - 541 532 static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev, 542 533 struct sec_platform_data *pdata) 543 534 { ··· 576 587 continue; 577 588 } 578 589 579 - s5m8767_pmic_dt_parse_ext_control_gpio(iodev, rdata, reg_np); 590 + rdata->ext_control_gpio = of_get_named_gpio(reg_np, 591 + "s5m8767,pmic-ext-control-gpios", 0); 580 592 581 593 rdata->id = i; 582 594 rdata->initdata = of_get_regulator_init_data( ··· 685 695 struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); 686 696 struct sec_platform_data *pdata = iodev->pdata; 687 697 struct regulator_config config = { }; 688 - struct regulator_dev **rdev; 689 698 struct s5m8767_info *s5m8767; 690 699 int i, ret, size, buck_init; 691 700 ··· 726 737 return -ENOMEM; 727 738 728 739 size = sizeof(struct regulator_dev *) * (S5M8767_REG_MAX - 2); 729 - s5m8767->rdev = devm_kzalloc(&pdev->dev, size, GFP_KERNEL); 730 - if (!s5m8767->rdev) 731 - return -ENOMEM; 732 740 733 - rdev = s5m8767->rdev; 734 741 s5m8767->dev = &pdev->dev; 735 742 s5m8767->iodev = iodev; 736 743 s5m8767->num_regulators = pdata->num_regulators; ··· 923 938 const struct sec_voltage_desc *desc; 924 939 int id = pdata->regulators[i].id; 925 940 int enable_reg, enable_val; 941 + struct regulator_dev *rdev; 926 942 927 943 desc = reg_voltage_map[id]; 928 944 if (desc) { ··· 950 964 config.driver_data = s5m8767; 951 965 config.regmap = iodev->regmap_pmic; 952 966 config.of_node = pdata->regulators[i].reg_node; 953 - config.ena_gpio = config.ena_gpio_flags = 0; 954 - if (pdata->regulators[i].ext_control_gpio) 967 + config.ena_gpio = -EINVAL; 968 + config.ena_gpio_flags = 0; 969 + if (gpio_is_valid(pdata->regulators[i].ext_control_gpio)) 955 970 s5m8767_regulator_config_ext_control(s5m8767, 956 971 &pdata->regulators[i], &config); 957 972 958 - rdev[i] = devm_regulator_register(&pdev->dev, &regulators[id], 973 + rdev = devm_regulator_register(&pdev->dev, &regulators[id], 959 974 &config); 960 - if (IS_ERR(rdev[i])) { 961 - ret = PTR_ERR(rdev[i]); 975 + if (IS_ERR(rdev)) { 976 + ret = PTR_ERR(rdev); 962 977 dev_err(s5m8767->dev, "regulator init failed for %d\n", 963 978 id); 964 979 return ret; 965 980 } 966 981 967 - if (pdata->regulators[i].ext_control_gpio) { 968 - ret = s5m8767_enable_ext_control(s5m8767, rdev[i]); 982 + if (gpio_is_valid(pdata->regulators[i].ext_control_gpio)) { 983 + ret = s5m8767_enable_ext_control(s5m8767, rdev); 969 984 if (ret < 0) { 970 985 dev_err(s5m8767->dev, 971 986 "failed to enable gpio control over %s: %d\n", 972 - rdev[i]->desc->name, ret); 987 + rdev->desc->name, ret); 973 988 return ret; 974 989 } 975 990 }
+199 -15
drivers/regulator/tps65090-regulator.c
··· 17 17 */ 18 18 19 19 #include <linux/module.h> 20 + #include <linux/delay.h> 20 21 #include <linux/init.h> 21 22 #include <linux/gpio.h> 22 23 #include <linux/of_gpio.h> ··· 29 28 #include <linux/regulator/of_regulator.h> 30 29 #include <linux/mfd/tps65090.h> 31 30 31 + #define MAX_CTRL_READ_TRIES 5 32 + #define MAX_FET_ENABLE_TRIES 1000 33 + 34 + #define CTRL_EN_BIT 0 /* Regulator enable bit, active high */ 35 + #define CTRL_WT_BIT 2 /* Regulator wait time 0 bit */ 36 + #define CTRL_PG_BIT 4 /* Regulator power good bit, 1=good */ 37 + #define CTRL_TO_BIT 7 /* Regulator timeout bit, 1=wait */ 38 + 39 + #define MAX_OVERCURRENT_WAIT 3 /* Overcurrent wait must be <= this */ 40 + 41 + /** 42 + * struct tps65090_regulator - Per-regulator data for a tps65090 regulator 43 + * 44 + * @dev: Pointer to our device. 45 + * @desc: The struct regulator_desc for the regulator. 46 + * @rdev: The struct regulator_dev for the regulator. 47 + * @overcurrent_wait_valid: True if overcurrent_wait is valid. 48 + * @overcurrent_wait: For FETs, the value to put in the WTFET bitfield. 49 + */ 50 + 32 51 struct tps65090_regulator { 33 52 struct device *dev; 34 53 struct regulator_desc *desc; 35 54 struct regulator_dev *rdev; 55 + bool overcurrent_wait_valid; 56 + int overcurrent_wait; 36 57 }; 37 58 38 59 static struct regulator_ops tps65090_ext_control_ops = { 39 60 }; 40 61 41 - static struct regulator_ops tps65090_reg_contol_ops = { 62 + /** 63 + * tps65090_reg_set_overcurrent_wait - Setup overcurrent wait 64 + * 65 + * This will set the overcurrent wait time based on what's in the regulator 66 + * info. 67 + * 68 + * @ri: Overall regulator data 69 + * @rdev: Regulator device 70 + * 71 + * Return: 0 if no error, non-zero if there was an error writing the register. 72 + */ 73 + static int tps65090_reg_set_overcurrent_wait(struct tps65090_regulator *ri, 74 + struct regulator_dev *rdev) 75 + { 76 + int ret; 77 + 78 + ret = regmap_update_bits(rdev->regmap, rdev->desc->enable_reg, 79 + MAX_OVERCURRENT_WAIT << CTRL_WT_BIT, 80 + ri->overcurrent_wait << CTRL_WT_BIT); 81 + if (ret) { 82 + dev_err(&rdev->dev, "Error updating overcurrent wait %#x\n", 83 + rdev->desc->enable_reg); 84 + } 85 + 86 + return ret; 87 + } 88 + 89 + /** 90 + * tps65090_try_enable_fet - Try to enable a FET 91 + * 92 + * @rdev: Regulator device 93 + * 94 + * Return: 0 if ok, -ENOTRECOVERABLE if the FET power good bit did not get 95 + * set, or some other -ve value if another error occurred (e.g. i2c error) 96 + */ 97 + static int tps65090_try_enable_fet(struct regulator_dev *rdev) 98 + { 99 + unsigned int control; 100 + int ret, i; 101 + 102 + ret = regmap_update_bits(rdev->regmap, rdev->desc->enable_reg, 103 + rdev->desc->enable_mask, 104 + rdev->desc->enable_mask); 105 + if (ret < 0) { 106 + dev_err(&rdev->dev, "Error in updating reg %#x\n", 107 + rdev->desc->enable_reg); 108 + return ret; 109 + } 110 + 111 + for (i = 0; i < MAX_CTRL_READ_TRIES; i++) { 112 + ret = regmap_read(rdev->regmap, rdev->desc->enable_reg, 113 + &control); 114 + if (ret < 0) 115 + return ret; 116 + 117 + if (!(control & BIT(CTRL_TO_BIT))) 118 + break; 119 + 120 + usleep_range(1000, 1500); 121 + } 122 + if (!(control & BIT(CTRL_PG_BIT))) 123 + return -ENOTRECOVERABLE; 124 + 125 + return 0; 126 + } 127 + 128 + /** 129 + * tps65090_fet_enable - Enable a FET, trying a few times if it fails 130 + * 131 + * Some versions of the tps65090 have issues when turning on the FETs. 132 + * This function goes through several steps to ensure the best chance of the 133 + * FET going on. Specifically: 134 + * - We'll make sure that we bump the "overcurrent wait" to the maximum, which 135 + * increases the chances that we'll turn on properly. 136 + * - We'll retry turning the FET on multiple times (turning off in between). 137 + * 138 + * @rdev: Regulator device 139 + * 140 + * Return: 0 if ok, non-zero if it fails. 141 + */ 142 + static int tps65090_fet_enable(struct regulator_dev *rdev) 143 + { 144 + int ret, tries; 145 + 146 + /* 147 + * Try enabling multiple times until we succeed since sometimes the 148 + * first try times out. 149 + */ 150 + tries = 0; 151 + while (true) { 152 + ret = tps65090_try_enable_fet(rdev); 153 + if (!ret) 154 + break; 155 + if (ret != -ENOTRECOVERABLE || tries == MAX_FET_ENABLE_TRIES) 156 + goto err; 157 + 158 + /* Try turning the FET off (and then on again) */ 159 + ret = regmap_update_bits(rdev->regmap, rdev->desc->enable_reg, 160 + rdev->desc->enable_mask, 0); 161 + if (ret) 162 + goto err; 163 + 164 + tries++; 165 + } 166 + 167 + if (tries) 168 + dev_warn(&rdev->dev, "reg %#x enable ok after %d tries\n", 169 + rdev->desc->enable_reg, tries); 170 + 171 + return 0; 172 + err: 173 + dev_warn(&rdev->dev, "reg %#x enable failed\n", rdev->desc->enable_reg); 174 + WARN_ON(1); 175 + 176 + return ret; 177 + } 178 + 179 + static struct regulator_ops tps65090_reg_control_ops = { 42 180 .enable = regulator_enable_regmap, 181 + .disable = regulator_disable_regmap, 182 + .is_enabled = regulator_is_enabled_regmap, 183 + }; 184 + 185 + static struct regulator_ops tps65090_fet_control_ops = { 186 + .enable = tps65090_fet_enable, 43 187 .disable = regulator_disable_regmap, 44 188 .is_enabled = regulator_is_enabled_regmap, 45 189 }; ··· 192 46 static struct regulator_ops tps65090_ldo_ops = { 193 47 }; 194 48 195 - #define tps65090_REG_DESC(_id, _sname, _en_reg, _ops) \ 49 + #define tps65090_REG_DESC(_id, _sname, _en_reg, _en_bits, _ops) \ 196 50 { \ 197 51 .name = "TPS65090_RAILS"#_id, \ 198 52 .supply_name = _sname, \ 199 53 .id = TPS65090_REGULATOR_##_id, \ 200 54 .ops = &_ops, \ 201 55 .enable_reg = _en_reg, \ 202 - .enable_mask = BIT(0), \ 56 + .enable_val = _en_bits, \ 57 + .enable_mask = _en_bits, \ 203 58 .type = REGULATOR_VOLTAGE, \ 204 59 .owner = THIS_MODULE, \ 205 60 } 206 61 207 62 static struct regulator_desc tps65090_regulator_desc[] = { 208 - tps65090_REG_DESC(DCDC1, "vsys1", 0x0C, tps65090_reg_contol_ops), 209 - tps65090_REG_DESC(DCDC2, "vsys2", 0x0D, tps65090_reg_contol_ops), 210 - tps65090_REG_DESC(DCDC3, "vsys3", 0x0E, tps65090_reg_contol_ops), 211 - tps65090_REG_DESC(FET1, "infet1", 0x0F, tps65090_reg_contol_ops), 212 - tps65090_REG_DESC(FET2, "infet2", 0x10, tps65090_reg_contol_ops), 213 - tps65090_REG_DESC(FET3, "infet3", 0x11, tps65090_reg_contol_ops), 214 - tps65090_REG_DESC(FET4, "infet4", 0x12, tps65090_reg_contol_ops), 215 - tps65090_REG_DESC(FET5, "infet5", 0x13, tps65090_reg_contol_ops), 216 - tps65090_REG_DESC(FET6, "infet6", 0x14, tps65090_reg_contol_ops), 217 - tps65090_REG_DESC(FET7, "infet7", 0x15, tps65090_reg_contol_ops), 218 - tps65090_REG_DESC(LDO1, "vsys-l1", 0, tps65090_ldo_ops), 219 - tps65090_REG_DESC(LDO2, "vsys-l2", 0, tps65090_ldo_ops), 63 + tps65090_REG_DESC(DCDC1, "vsys1", 0x0C, BIT(CTRL_EN_BIT), 64 + tps65090_reg_control_ops), 65 + tps65090_REG_DESC(DCDC2, "vsys2", 0x0D, BIT(CTRL_EN_BIT), 66 + tps65090_reg_control_ops), 67 + tps65090_REG_DESC(DCDC3, "vsys3", 0x0E, BIT(CTRL_EN_BIT), 68 + tps65090_reg_control_ops), 69 + 70 + tps65090_REG_DESC(FET1, "infet1", 0x0F, 71 + BIT(CTRL_EN_BIT) | BIT(CTRL_PG_BIT), 72 + tps65090_fet_control_ops), 73 + tps65090_REG_DESC(FET2, "infet2", 0x10, 74 + BIT(CTRL_EN_BIT) | BIT(CTRL_PG_BIT), 75 + tps65090_fet_control_ops), 76 + tps65090_REG_DESC(FET3, "infet3", 0x11, 77 + BIT(CTRL_EN_BIT) | BIT(CTRL_PG_BIT), 78 + tps65090_fet_control_ops), 79 + tps65090_REG_DESC(FET4, "infet4", 0x12, 80 + BIT(CTRL_EN_BIT) | BIT(CTRL_PG_BIT), 81 + tps65090_fet_control_ops), 82 + tps65090_REG_DESC(FET5, "infet5", 0x13, 83 + BIT(CTRL_EN_BIT) | BIT(CTRL_PG_BIT), 84 + tps65090_fet_control_ops), 85 + tps65090_REG_DESC(FET6, "infet6", 0x14, 86 + BIT(CTRL_EN_BIT) | BIT(CTRL_PG_BIT), 87 + tps65090_fet_control_ops), 88 + tps65090_REG_DESC(FET7, "infet7", 0x15, 89 + BIT(CTRL_EN_BIT) | BIT(CTRL_PG_BIT), 90 + tps65090_fet_control_ops), 91 + 92 + tps65090_REG_DESC(LDO1, "vsys-l1", 0, 0, 93 + tps65090_ldo_ops), 94 + tps65090_REG_DESC(LDO2, "vsys-l2", 0, 0, 95 + tps65090_ldo_ops), 220 96 }; 221 97 222 98 static inline bool is_dcdc(int id) ··· 377 209 rpdata->gpio = of_get_named_gpio(np, 378 210 "dcdc-ext-control-gpios", 0); 379 211 212 + if (of_property_read_u32(tps65090_matches[idx].of_node, 213 + "ti,overcurrent-wait", 214 + &rpdata->overcurrent_wait) == 0) 215 + rpdata->overcurrent_wait_valid = true; 216 + 380 217 tps65090_pdata->reg_pdata[idx] = rpdata; 381 218 } 382 219 return tps65090_pdata; ··· 431 258 ri = &pmic[num]; 432 259 ri->dev = &pdev->dev; 433 260 ri->desc = &tps65090_regulator_desc[num]; 261 + if (tps_pdata) { 262 + ri->overcurrent_wait_valid = 263 + tps_pdata->overcurrent_wait_valid; 264 + ri->overcurrent_wait = tps_pdata->overcurrent_wait; 265 + } 434 266 435 267 /* 436 268 * TPS5090 DCDC support the control from external digital input. ··· 476 298 return PTR_ERR(rdev); 477 299 } 478 300 ri->rdev = rdev; 301 + 302 + if (ri->overcurrent_wait_valid) { 303 + ret = tps65090_reg_set_overcurrent_wait(ri, rdev); 304 + if (ret < 0) 305 + return ret; 306 + } 479 307 480 308 /* Enable external control if it is require */ 481 309 if (tps_pdata && is_dcdc(num) && tps_pdata->reg_init_data &&
+1 -3
drivers/regulator/tps65217-regulator.c
··· 134 134 .get_voltage_sel = regulator_get_voltage_sel_regmap, 135 135 .set_voltage_sel = tps65217_pmic_set_voltage_sel, 136 136 .list_voltage = regulator_list_voltage_table, 137 + .map_voltage = regulator_map_voltage_ascend, 137 138 }; 138 139 139 140 static const struct regulator_desc regulators[] = { ··· 258 257 pdev->name); 259 258 return PTR_ERR(rdev); 260 259 } 261 - 262 - /* Save regulator for cleanup */ 263 - tps->rdev[i] = rdev; 264 260 } 265 261 return 0; 266 262 }
+10 -27
drivers/regulator/tps65218-regulator.c
··· 27 27 #include <linux/regulator/machine.h> 28 28 #include <linux/mfd/tps65218.h> 29 29 30 - static unsigned int tps65218_ramp_delay = 4000; 31 - 32 30 enum tps65218_regulators { DCDC1, DCDC2, DCDC3, DCDC4, DCDC5, DCDC6, LDO1 }; 33 31 34 32 #define TPS65218_REGULATOR(_name, _id, _ops, _n, _vr, _vm, _er, _em, _t, \ 35 - _lr, _nlr) \ 33 + _lr, _nlr, _delay) \ 36 34 { \ 37 35 .name = _name, \ 38 36 .id = _id, \ ··· 45 47 .volt_table = _t, \ 46 48 .linear_ranges = _lr, \ 47 49 .n_linear_ranges = _nlr, \ 50 + .ramp_delay = _delay, \ 48 51 } \ 49 52 50 53 #define TPS65218_INFO(_id, _nm, _min, _max) \ ··· 151 152 dev->desc->enable_mask, TPS65218_PROTECT_L1); 152 153 } 153 154 154 - static int tps65218_set_voltage_time_sel(struct regulator_dev *rdev, 155 - unsigned int old_selector, unsigned int new_selector) 156 - { 157 - int old_uv, new_uv; 158 - 159 - old_uv = regulator_list_voltage_linear_range(rdev, old_selector); 160 - if (old_uv < 0) 161 - return old_uv; 162 - 163 - new_uv = regulator_list_voltage_linear_range(rdev, new_selector); 164 - if (new_uv < 0) 165 - return new_uv; 166 - 167 - return DIV_ROUND_UP(abs(old_uv - new_uv), tps65218_ramp_delay); 168 - } 169 - 170 155 /* Operations permitted on DCDC1, DCDC2 */ 171 156 static struct regulator_ops tps65218_dcdc12_ops = { 172 157 .is_enabled = regulator_is_enabled_regmap, ··· 160 177 .set_voltage_sel = tps65218_pmic_set_voltage_sel, 161 178 .list_voltage = regulator_list_voltage_linear_range, 162 179 .map_voltage = regulator_map_voltage_linear_range, 163 - .set_voltage_time_sel = tps65218_set_voltage_time_sel, 180 + .set_voltage_time_sel = regulator_set_voltage_time_sel, 164 181 }; 165 182 166 183 /* Operations permitted on DCDC3, DCDC4 and LDO1 */ ··· 186 203 TPS65218_REG_CONTROL_DCDC1, 187 204 TPS65218_CONTROL_DCDC1_MASK, 188 205 TPS65218_REG_ENABLE1, TPS65218_ENABLE1_DC1_EN, NULL, 189 - dcdc1_dcdc2_ranges, 2), 206 + dcdc1_dcdc2_ranges, 2, 4000), 190 207 TPS65218_REGULATOR("DCDC2", TPS65218_DCDC_2, tps65218_dcdc12_ops, 64, 191 208 TPS65218_REG_CONTROL_DCDC2, 192 209 TPS65218_CONTROL_DCDC2_MASK, 193 210 TPS65218_REG_ENABLE1, TPS65218_ENABLE1_DC2_EN, NULL, 194 - dcdc1_dcdc2_ranges, 2), 211 + dcdc1_dcdc2_ranges, 2, 4000), 195 212 TPS65218_REGULATOR("DCDC3", TPS65218_DCDC_3, tps65218_ldo1_dcdc34_ops, 196 213 64, TPS65218_REG_CONTROL_DCDC3, 197 214 TPS65218_CONTROL_DCDC3_MASK, TPS65218_REG_ENABLE1, 198 215 TPS65218_ENABLE1_DC3_EN, NULL, 199 - ldo1_dcdc3_ranges, 2), 216 + ldo1_dcdc3_ranges, 2, 0), 200 217 TPS65218_REGULATOR("DCDC4", TPS65218_DCDC_4, tps65218_ldo1_dcdc34_ops, 201 218 53, TPS65218_REG_CONTROL_DCDC4, 202 219 TPS65218_CONTROL_DCDC4_MASK, 203 220 TPS65218_REG_ENABLE1, TPS65218_ENABLE1_DC4_EN, NULL, 204 - dcdc4_ranges, 2), 221 + dcdc4_ranges, 2, 0), 205 222 TPS65218_REGULATOR("DCDC5", TPS65218_DCDC_5, tps65218_dcdc56_pmic_ops, 206 223 1, -1, -1, TPS65218_REG_ENABLE1, 207 - TPS65218_ENABLE1_DC5_EN, NULL, NULL, 0), 224 + TPS65218_ENABLE1_DC5_EN, NULL, NULL, 0, 0), 208 225 TPS65218_REGULATOR("DCDC6", TPS65218_DCDC_6, tps65218_dcdc56_pmic_ops, 209 226 1, -1, -1, TPS65218_REG_ENABLE1, 210 - TPS65218_ENABLE1_DC6_EN, NULL, NULL, 0), 227 + TPS65218_ENABLE1_DC6_EN, NULL, NULL, 0, 0), 211 228 TPS65218_REGULATOR("LDO1", TPS65218_LDO_1, tps65218_ldo1_dcdc34_ops, 64, 212 229 TPS65218_REG_CONTROL_DCDC4, 213 230 TPS65218_CONTROL_LDO1_MASK, TPS65218_REG_ENABLE2, 214 231 TPS65218_ENABLE2_LDO1_EN, NULL, ldo1_dcdc3_ranges, 215 - 2), 232 + 2, 0), 216 233 }; 217 234 218 235 static int tps65218_regulator_probe(struct platform_device *pdev)
+5
include/linux/mfd/tps65090.h
··· 92 92 * DCDC1, DCDC2 and DCDC3. 93 93 * @gpio: Gpio number if external control is enabled and controlled through 94 94 * gpio. 95 + * @overcurrent_wait_valid: True if the overcurrent_wait should be applied. 96 + * @overcurrent_wait: Value to set as the overcurrent wait time. This is the 97 + * actual bitfield value, not a time in ms (valid value are 0 - 3). 95 98 */ 96 99 struct tps65090_regulator_plat_data { 97 100 struct regulator_init_data *reg_init_data; 98 101 bool enable_ext_control; 99 102 int gpio; 103 + bool overcurrent_wait_valid; 104 + int overcurrent_wait; 100 105 }; 101 106 102 107 struct tps65090_platform_data {
-1
include/linux/mfd/tps65217.h
··· 254 254 struct tps65217_board *pdata; 255 255 unsigned long id; 256 256 struct regulator_desc desc[TPS65217_NUM_REGULATOR]; 257 - struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; 258 257 struct regmap *regmap; 259 258 }; 260 259
+6
include/linux/regulator/consumer.h
··· 401 401 return 0; 402 402 } 403 403 404 + static inline int regulator_set_voltage_time(struct regulator *regulator, 405 + int old_uV, int new_uV) 406 + { 407 + return 0; 408 + } 409 + 404 410 static inline int regulator_get_voltage(struct regulator *regulator) 405 411 { 406 412 return -EINVAL;