···11+Monolithic Power Systems MP8867/MP8869 voltage regulator22+33+Required properties:44+- compatible: Must be one of the following.55+ "mps,mp8867"66+ "mps,mp8869"77+- reg: I2C slave address.88+- enable-gpios: enable gpios.99+- mps,fb-voltage-divider: An array of two integers containing the resistor1010+ values R1 and R2 of the feedback voltage divider in kilo ohms.1111+1212+Any property defined as part of the core regulator binding, defined in1313+./regulator.txt, can also be used.1414+1515+Example:1616+1717+ vcpu: regulator@62 {1818+ compatible = "mps,mp8869";1919+ regulator-name = "vcpu";2020+ regulator-min-microvolt = <700000>;2121+ regulator-max-microvolt = <850000>;2222+ regulator-always-on;2323+ regulator-boot-on;2424+ enable-gpios = <&porta 1 GPIO_ACTIVE_LOW>;2525+ mps,fb-voltage-divider = <80 240>;2626+ reg = <0x62>;2727+ };
···11+# SPDX-License-Identifier: GPL-2.022+%YAML 1.233+---44+$id: http://devicetree.org/schemas/regulator/vqmmc-ipq4019-regulator.yaml#55+$schema: http://devicetree.org/meta-schemas/core.yaml#66+77+title: Qualcomm IPQ4019 VQMMC SD LDO regulator88+99+maintainers:1010+ - Robert Marko <robert.marko@sartura.hr>1111+1212+description: |1313+ Qualcomm IPQ4019 SoC-s feature a built a build SD/EMMC controller,1414+ in order to support both 1.8 and 3V I/O voltage levels an LDO1515+ controller is also embedded.1616+1717+allOf:1818+ - $ref: "regulator.yaml#"1919+2020+properties:2121+ compatible:2222+ const: qcom,vqmmc-ipq4019-regulator2323+2424+ reg:2525+ maxItems: 12626+2727+required:2828+ - compatible2929+ - reg3030+3131+examples:3232+ - |3333+ regulator@1948000 {3434+ compatible = "qcom,vqmmc-ipq4019-regulator";3535+ reg = <0x01948000 0x4>;3636+ regulator-name = "vqmmc";3737+ regulator-min-microvolt = <1500000>;3838+ regulator-max-microvolt = <3000000>;3939+ regulator-always-on;4040+ status = "disabled";4141+ };4242+...
+2-1
MAINTAINERS
···1125611256MONOLITHIC POWER SYSTEM PMIC DRIVER1125711257M: Saravanan Sekar <sravanhome@gmail.com>1125811258S: Maintained1125911259-F: Documentation/devicetree/bindings/regulator/mpq7920.yaml1125911259+F: Documentation/devicetree/bindings/regulator/mps,mp*.yaml1126011260+F: drivers/regulator/mp5416.c1126011261F: drivers/regulator/mpq7920.c1126111262F: drivers/regulator/mpq7920.h1126211263
+18
drivers/regulator/Kconfig
···107107108108config REGULATOR_ANATOP109109 tristate "Freescale i.MX on-chip ANATOP LDO regulators"110110+ depends on ARCH_MXC || COMPILE_TEST110111 depends on MFD_SYSCON111112 help112113 Say y here to support Freescale i.MX on-chip ANATOP LDOs···614613 through the regulator interface. In addition it enables615614 suspend-to-ram/standby transition.616615616616+config REGULATOR_MP5416617617+ tristate "Monolithic MP5416 PMIC"618618+ depends on I2C && OF619619+ select REGMAP_I2C620620+ help621621+ Say y here to support the MP5416 PMIC. This will enable supports622622+ the software controllable 4 buck and 4 LDO regulators.623623+ Say M here if you want to include support for the regulator as a624624+ module.625625+617626config REGULATOR_MP8859618627 tristate "MPS MP8859 regulator driver"619628 depends on I2C···634623 interface.635624 Say M here if you want to include support for the regulator as a636625 module. The module will be named "mp8859".626626+627627+config REGULATOR_MP886X628628+ tristate "MPS MP8869 regulator driver"629629+ depends on I2C && (OF || COMPILE_TEST)630630+ select REGMAP_I2C631631+ help632632+ This driver supports the MP8869 voltage regulator.637633638634config REGULATOR_MPQ7920639635 tristate "Monolithic MPQ7920 PMIC"
···18491849{18501850 struct regulator_dev *rdev;18511851 struct regulator *regulator;18521852- const char *devname = dev ? dev_name(dev) : "deviceless";18531852 struct device_link *link;18541853 int ret;18551854···18861887 * enabled, even if it isn't hooked up, and just18871888 * provide a dummy.18881889 */18891889- dev_warn(dev,18901890- "%s supply %s not found, using dummy regulator\n",18911891- devname, id);18901890+ dev_warn(dev, "supply %s not found, using dummy regulator\n", id);18921891 rdev = dummy_regulator_rdev;18931892 get_device(&rdev->dev);18941893 break;
+1-1
drivers/regulator/da9062-regulator.c
···7373 int irq_ldo_lim;7474 unsigned n_regulators;7575 /* Array size to be defined during init. Keep at end. */7676- struct da9062_regulator regulator[0];7676+ struct da9062_regulator regulator[];7777};78787979/* Regulator operations */
+37-29
drivers/regulator/da9063-regulator.c
···6666};67676868struct da9063_regulators_pdata {6969- unsigned n_regulators;6969+ unsigned int n_regulators;7070 struct da9063_regulator_data *regulator_data;7171};7272···133133/* Defines asignment of regulators info table to chip model */134134struct da9063_dev_model {135135 const struct da9063_regulator_info *regulator_info;136136- unsigned n_regulators;136136+ unsigned int n_regulators;137137 enum da9063_type type;138138};139139···152152153153/* Encapsulates all information for the regulators driver */154154struct da9063_regulators {155155- unsigned n_regulators;155155+ unsigned int n_regulators;156156 /* Array size to be defined during init. Keep at end. */157157- struct da9063_regulator regulator[0];157157+ struct da9063_regulator regulator[];158158};159159160160/* BUCK modes for DA9063 */···167167168168/* Regulator operations */169169170170-/* Current limits array (in uA) for BCORE1, BCORE2, BPRO.171171- Entry indexes corresponds to register values. */170170+/*171171+ * Current limits array (in uA) for BCORE1, BCORE2, BPRO.172172+ * Entry indexes corresponds to register values.173173+ */172174static const unsigned int da9063_buck_a_limits[] = {173175 500000, 600000, 700000, 800000, 900000, 1000000, 1100000, 1200000,174176 1300000, 1400000, 1500000, 1600000, 1700000, 1800000, 1900000, 2000000175177};176178177177-/* Current limits array (in uA) for BMEM, BIO, BPERI.178178- Entry indexes corresponds to register values. */179179+/*180180+ * Current limits array (in uA) for BMEM, BIO, BPERI.181181+ * Entry indexes corresponds to register values.182182+ */179183static const unsigned int da9063_buck_b_limits[] = {180184 1500000, 1600000, 1700000, 1800000, 1900000, 2000000, 2100000, 2200000,181185 2300000, 2400000, 2500000, 2600000, 2700000, 2800000, 2900000, 3000000182186};183187184184-/* Current limits array (in uA) for merged BCORE1 and BCORE2.185185- Entry indexes corresponds to register values. */188188+/*189189+ * Current limits array (in uA) for merged BCORE1 and BCORE2.190190+ * Entry indexes corresponds to register values.191191+ */186192static const unsigned int da9063_bcores_merged_limits[] = {187193 1000000, 1200000, 1400000, 1600000, 1800000, 2000000, 2200000, 2400000,188194 2600000, 2800000, 3000000, 3200000, 3400000, 3600000, 3800000, 4000000189195};190196191191-/* Current limits array (in uA) for merged BMEM and BIO.192192- Entry indexes corresponds to register values. */197197+/*198198+ * Current limits array (in uA) for merged BMEM and BIO.199199+ * Entry indexes corresponds to register values.200200+ */193201static const unsigned int da9063_bmem_bio_merged_limits[] = {194202 3000000, 3200000, 3400000, 3600000, 3800000, 4000000, 4200000, 4400000,195203 4600000, 4800000, 5000000, 5200000, 5400000, 5600000, 5800000, 6000000196204};197205198198-static int da9063_buck_set_mode(struct regulator_dev *rdev, unsigned mode)206206+static int da9063_buck_set_mode(struct regulator_dev *rdev, unsigned int mode)199207{200208 struct da9063_regulator *regl = rdev_get_drvdata(rdev);201201- unsigned val;209209+ unsigned int val;202210203211 switch (mode) {204212 case REGULATOR_MODE_FAST:···231223 * There are 3 modes to map to: FAST, NORMAL, and STANDBY.232224 */233225234234-static unsigned da9063_buck_get_mode(struct regulator_dev *rdev)226226+static unsigned int da9063_buck_get_mode(struct regulator_dev *rdev)235227{236228 struct da9063_regulator *regl = rdev_get_drvdata(rdev);237229 unsigned int val;···269261 * There are 2 modes to map to: NORMAL and STANDBY (sleep) for each state.270262 */271263272272-static int da9063_ldo_set_mode(struct regulator_dev *rdev, unsigned mode)264264+static int da9063_ldo_set_mode(struct regulator_dev *rdev, unsigned int mode)273265{274266 struct da9063_regulator *regl = rdev_get_drvdata(rdev);275275- unsigned val;267267+ unsigned int val;276268277269 switch (mode) {278270 case REGULATOR_MODE_NORMAL:···288280 return regmap_field_write(regl->sleep, val);289281}290282291291-static unsigned da9063_ldo_get_mode(struct regulator_dev *rdev)283283+static unsigned int da9063_ldo_get_mode(struct regulator_dev *rdev)292284{293285 struct da9063_regulator *regl = rdev_get_drvdata(rdev);294286 int ret, val;···369361 return regmap_field_write(regl->suspend, 0);370362}371363372372-static int da9063_buck_set_suspend_mode(struct regulator_dev *rdev, unsigned mode)364364+static int da9063_buck_set_suspend_mode(struct regulator_dev *rdev,365365+ unsigned int mode)373366{374367 struct da9063_regulator *regl = rdev_get_drvdata(rdev);375368 int val;···392383 return regmap_field_write(regl->mode, val);393384}394385395395-static int da9063_ldo_set_suspend_mode(struct regulator_dev *rdev, unsigned mode)386386+static int da9063_ldo_set_suspend_mode(struct regulator_dev *rdev,387387+ unsigned int mode)396388{397389 struct da9063_regulator *regl = rdev_get_drvdata(rdev);398398- unsigned val;390390+ unsigned int val;399391400392 switch (mode) {401393 case REGULATOR_MODE_NORMAL:···563553 struct da9063_regulators *regulators = data;564554 struct da9063 *hw = regulators->regulator[0].hw;565555 struct da9063_regulator *regl;566566- int bits, i , ret;556556+ int bits, i, ret;567557568558 ret = regmap_read(hw->regmap, DA9063_REG_STATUS_D, &bits);569559 if (ret < 0)···575565 continue;576566577567 if (BIT(regl->info->oc_event.lsb) & bits) {578578- regulator_lock(regl->rdev);568568+ regulator_lock(regl->rdev);579569 regulator_notifier_call_chain(regl->rdev,580570 REGULATOR_EVENT_OVER_CURRENT, NULL);581581- regulator_unlock(regl->rdev);571571+ regulator_unlock(regl->rdev);582572 }583573 }584574···803793804794 if (regl->info->suspend_sleep.reg) {805795 regl->suspend_sleep = devm_regmap_field_alloc(&pdev->dev,806806- da9063->regmap, regl->info->suspend_sleep);796796+ da9063->regmap, regl->info->suspend_sleep);807797 if (IS_ERR(regl->suspend_sleep))808798 return PTR_ERR(regl->suspend_sleep);809799 }···837827 NULL, da9063_ldo_lim_event,838828 IRQF_TRIGGER_LOW | IRQF_ONESHOT,839829 "LDO_LIM", regulators);840840- if (ret) {830830+ if (ret)841831 dev_err(&pdev->dev, "Failed to request LDO_LIM IRQ.\n");842842- return ret;843843- }844832845845- return 0;833833+ return ret;846834}847835848836static struct platform_driver da9063_regulator_driver = {
···354354 drvdata->pwm = devm_pwm_get(&pdev->dev, NULL);355355 if (IS_ERR(drvdata->pwm)) {356356 ret = PTR_ERR(drvdata->pwm);357357- dev_err(&pdev->dev, "Failed to get PWM: %d\n", ret);357357+ if (ret == -EPROBE_DEFER)358358+ dev_dbg(&pdev->dev,359359+ "Failed to get PWM, deferring probe\n");360360+ else361361+ dev_err(&pdev->dev, "Failed to get PWM: %d\n", ret);358362 return ret;359363 }360364
···277277 * @curr_table: Current limit mapping table (if table based mapping)278278 *279279 * @vsel_range_reg: Register for range selector when using pickable ranges280280- * and regulator_regmap_X_voltage_X_pickable functions.280280+ * and ``regulator_map_*_voltage_*_pickable`` functions.281281 * @vsel_range_mask: Mask for register bitfield used for range selector282282- * @vsel_reg: Register for selector when using regulator_regmap_X_voltage_282282+ * @vsel_reg: Register for selector when using ``regulator_map_*_voltage_*``283283 * @vsel_mask: Mask for register bitfield used for selector284284 * @vsel_step: Specify the resolution of selector stepping when setting285285 * voltage. If 0, then no stepping is done (requested selector is
+1
include/linux/soc/qcom/smd-rpm.h
···1010/*1111 * Constants used for addressing resources in the RPM.1212 */1313+#define QCOM_SMD_RPM_BBYB 0x627962621314#define QCOM_SMD_RPM_BOBB 0x62626f621415#define QCOM_SMD_RPM_BOOST 0x617473621516#define QCOM_SMD_RPM_BUS_CLK 0x316b6c63