From 2e238605a9d631fc8b9b130ba79cd54f2a22df10 Mon Sep 17 00:00:00 2001 From: ChiYuan Huang Date: Fri, 17 Feb 2023 10:06:57 +0800 Subject: dt-bindings: regulator: Add Richtek RT5739 Add the binding document for Richtek RT5739. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1676599618-24819-2-git-send-email-cy_huang@richtek.com Signed-off-by: Mark Brown --- .../bindings/regulator/richtek,rt5739.yaml | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml new file mode 100644 index 000000000000..358297dd3fb7 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt5739.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT5739 Step-Down Buck Converter + +maintainers: + - ChiYuan Huang + +description: | + The RT5739 is a step-down switching buck converter that can deliver the + programmable output voltage from 300mV to 1300mV with wide input voltage + supply of 2.5V to 5.5V. It can provide up to 3.5A continuous current + capability at over 80% high efficiency. + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + enum: + - richtek,rt5739 + + reg: + maxItems: 1 + + enable-gpios: + maxItems: 1 + + richtek,vsel-active-high: + description: | + If property is present, use the 'VSEL1' register group for buck control. + Else, use the 'VSEL0' register group. This depends on external hardware + 'VSEL' pin connection. + type: boolean + + regulator-allowed-modes: + description: | + buck allowed operating mode + 0: Auto PFM/PWM mode + 1: Forced PWM mode + items: + enum: [0, 1] + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@50 { + compatible = "richtek,rt5739"; + reg = <0x50>; + enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>; + richtek,vsel-active-high; + regulator-name = "richtek,rt5739-buck"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1300000>; + regulator-allowed-modes = <0 1>; + regulator-boot-on; + }; + }; -- cgit v1.2.3 From 4536f3b93a3373cac21911103cbaa8c4c2932c38 Mon Sep 17 00:00:00 2001 From: ChiYuan Huang Date: Fri, 17 Feb 2023 10:06:58 +0800 Subject: regulator: Add support for Richtek RT5739 voltage regulator The RT5739 is a step-down switching voltage regulator that supports output voltage ragne from 300mV to 1300mV with the wide input supply voltage range from 2.5V to 5.5V. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1676599618-24819-3-git-send-email-cy_huang@richtek.com Signed-off-by: Mark Brown --- drivers/regulator/Kconfig | 13 ++ drivers/regulator/Makefile | 1 + drivers/regulator/rt5739.c | 290 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 drivers/regulator/rt5739.c diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index aae28d0a489c..31f8e0b7bdf1 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1120,6 +1120,19 @@ config REGULATOR_RT5190A buck converters, 1 LDO, mute AC OFF depop function, with the general I2C control interface. +config REGULATOR_RT5739 + tristate "Rcihtek RT5739 Regulator" + depends on I2C + select REGMAP_I2C + help + This adds support for voltage regulator in Richtek RT5739. + It's a step-down switching voltage regulator. Using a proprietary + architecture with synchronous rectification, it is capable of + delivering 3.5A continuously at over 80% efficiency. + + This driver can also be built as a module. If so, the module + will be called rt5739. + config REGULATOR_RT5759 tristate "Richtek RT5759 Regulator" depends on I2C diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index ee383d8fc835..a9fe73309d9e 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -134,6 +134,7 @@ obj-$(CONFIG_REGULATOR_RT4831) += rt4831-regulator.o obj-$(CONFIG_REGULATOR_RT5033) += rt5033-regulator.o obj-$(CONFIG_REGULATOR_RT5120) += rt5120-regulator.o obj-$(CONFIG_REGULATOR_RT5190A) += rt5190a-regulator.o +obj-$(CONFIG_REGULATOR_RT5739) += rt5739.o obj-$(CONFIG_REGULATOR_RT5759) += rt5759-regulator.o obj-$(CONFIG_REGULATOR_RT6160) += rt6160-regulator.o obj-$(CONFIG_REGULATOR_RT6190) += rt6190-regulator.o diff --git a/drivers/regulator/rt5739.c b/drivers/regulator/rt5739.c new file mode 100644 index 000000000000..0a9e1023d025 --- /dev/null +++ b/drivers/regulator/rt5739.c @@ -0,0 +1,290 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Device driver for RT5739 regulator + * + * Copyright (C) 2023 Richtek Technology Corp. + * + * Author: ChiYuan Huang + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define RT5739_AUTO_MODE 0 +#define RT5739_FPWM_MODE 1 + +#define RT5739_REG_NSEL0 0x00 +#define RT5739_REG_NSEL1 0x01 +#define RT5739_REG_CNTL1 0x02 +#define RT5739_REG_ID1 0x03 +#define RT5739_REG_CNTL2 0x06 +#define RT5739_REG_CNTL4 0x08 + +#define RT5739_VSEL_MASK GENMASK(7, 0) +#define RT5739_MODEVSEL1_MASK BIT(1) +#define RT5739_MODEVSEL0_MASK BIT(0) +#define RT5739_VID_MASK GENMASK(7, 5) +#define RT5739_ACTD_MASK BIT(7) +#define RT5739_ENVSEL1_MASK BIT(1) +#define RT5739_ENVSEL0_MASK BIT(0) + +#define RT5739_VOLT_MINUV 300000 +#define RT5739_VOLT_MAXUV 1300000 +#define RT5739_VOLT_STPUV 5000 +#define RT5739_N_VOLTS 201 +#define RT5739_I2CRDY_TIMEUS 1000 + +static int rt5739_set_mode(struct regulator_dev *rdev, unsigned int mode) +{ + const struct regulator_desc *desc = rdev->desc; + struct regmap *regmap = rdev_get_regmap(rdev); + unsigned int mask, val; + + if (desc->vsel_reg == RT5739_REG_NSEL0) + mask = RT5739_MODEVSEL0_MASK; + else + mask = RT5739_MODEVSEL1_MASK; + + switch (mode) { + case REGULATOR_MODE_FAST: + val = mask; + break; + case REGULATOR_MODE_NORMAL: + val = 0; + break; + default: + return -EINVAL; + } + + return regmap_update_bits(regmap, RT5739_REG_CNTL1, mask, val); +} + +static unsigned int rt5739_get_mode(struct regulator_dev *rdev) +{ + const struct regulator_desc *desc = rdev->desc; + struct regmap *regmap = rdev_get_regmap(rdev); + unsigned int mask, val; + int ret; + + if (desc->vsel_reg == RT5739_REG_NSEL0) + mask = RT5739_MODEVSEL0_MASK; + else + mask = RT5739_MODEVSEL1_MASK; + + ret = regmap_read(regmap, RT5739_REG_CNTL1, &val); + if (ret) + return REGULATOR_MODE_INVALID; + + if (val & mask) + return REGULATOR_MODE_FAST; + + return REGULATOR_MODE_NORMAL; +} + +static int rt5739_set_suspend_voltage(struct regulator_dev *rdev, int uV) +{ + const struct regulator_desc *desc = rdev->desc; + struct regmap *regmap = rdev_get_regmap(rdev); + unsigned int reg, vsel; + + if (uV < RT5739_VOLT_MINUV || uV > RT5739_VOLT_MAXUV) + return -EINVAL; + + if (desc->vsel_reg == RT5739_REG_NSEL0) + reg = RT5739_REG_NSEL1; + else + reg = RT5739_REG_NSEL0; + + vsel = (uV - RT5739_VOLT_MINUV) / RT5739_VOLT_STPUV; + return regmap_write(regmap, reg, vsel); +} + +static int rt5739_set_suspend_enable(struct regulator_dev *rdev) +{ + const struct regulator_desc *desc = rdev->desc; + struct regmap *regmap = rdev_get_regmap(rdev); + unsigned int mask; + + if (desc->vsel_reg == RT5739_REG_NSEL0) + mask = RT5739_ENVSEL1_MASK; + else + mask = RT5739_ENVSEL0_MASK; + + return regmap_update_bits(regmap, desc->enable_reg, mask, mask); +} + +static int rt5739_set_suspend_disable(struct regulator_dev *rdev) +{ + const struct regulator_desc *desc = rdev->desc; + struct regmap *regmap = rdev_get_regmap(rdev); + unsigned int mask; + + if (desc->vsel_reg == RT5739_REG_NSEL0) + mask = RT5739_ENVSEL1_MASK; + else + mask = RT5739_ENVSEL0_MASK; + + return regmap_update_bits(regmap, desc->enable_reg, mask, 0); +} + +static int rt5739_set_suspend_mode(struct regulator_dev *rdev, + unsigned int mode) +{ + const struct regulator_desc *desc = rdev->desc; + struct regmap *regmap = rdev_get_regmap(rdev); + unsigned int mask, val; + + if (desc->vsel_reg == RT5739_REG_NSEL0) + mask = RT5739_MODEVSEL1_MASK; + else + mask = RT5739_MODEVSEL0_MASK; + + switch (mode) { + case REGULATOR_MODE_FAST: + val = mask; + break; + case REGULATOR_MODE_NORMAL: + val = 0; + break; + default: + return -EINVAL; + } + + return regmap_update_bits(regmap, RT5739_REG_CNTL1, mask, val); +} + +static const struct regulator_ops rt5739_regulator_ops = { + .list_voltage = regulator_list_voltage_linear, + .get_voltage_sel = regulator_get_voltage_sel_regmap, + .set_voltage_sel = regulator_set_voltage_sel_regmap, + .enable = regulator_enable_regmap, + .disable = regulator_disable_regmap, + .is_enabled = regulator_is_enabled_regmap, + .set_active_discharge = regulator_set_active_discharge_regmap, + .set_mode = rt5739_set_mode, + .get_mode = rt5739_get_mode, + .set_suspend_voltage = rt5739_set_suspend_voltage, + .set_suspend_enable = rt5739_set_suspend_enable, + .set_suspend_disable = rt5739_set_suspend_disable, + .set_suspend_mode = rt5739_set_suspend_mode, +}; + +static unsigned int rt5739_of_map_mode(unsigned int mode) +{ + switch (mode) { + case RT5739_AUTO_MODE: + return REGULATOR_MODE_NORMAL; + case RT5739_FPWM_MODE: + return REGULATOR_MODE_FAST; + default: + return REGULATOR_MODE_INVALID; + } +} + +static void rt5739_init_regulator_desc(struct regulator_desc *desc, + bool vsel_active_high) +{ + /* Fixed */ + desc->name = "rt5739-regulator"; + desc->owner = THIS_MODULE; + desc->ops = &rt5739_regulator_ops; + desc->n_voltages = RT5739_N_VOLTS; + desc->min_uV = RT5739_VOLT_MINUV; + desc->uV_step = RT5739_VOLT_STPUV; + desc->vsel_mask = RT5739_VSEL_MASK; + desc->enable_reg = RT5739_REG_CNTL2; + desc->active_discharge_reg = RT5739_REG_CNTL1; + desc->active_discharge_mask = RT5739_ACTD_MASK; + desc->active_discharge_on = RT5739_ACTD_MASK; + desc->of_map_mode = rt5739_of_map_mode; + + /* Assigned by vsel level */ + if (vsel_active_high) { + desc->vsel_reg = RT5739_REG_NSEL1; + desc->enable_mask = RT5739_ENVSEL1_MASK; + } else { + desc->vsel_reg = RT5739_REG_NSEL0; + desc->enable_mask = RT5739_ENVSEL0_MASK; + } +} + +static const struct regmap_config rt5739_regmap_config = { + .name = "rt5739", + .reg_bits = 8, + .val_bits = 8, + .max_register = RT5739_REG_CNTL4, +}; + +static int rt5739_probe(struct i2c_client *i2c) +{ + struct device *dev = &i2c->dev; + struct regulator_desc *desc; + struct regmap *regmap; + struct gpio_desc *enable_gpio; + struct regulator_config cfg = {}; + struct regulator_dev *rdev; + bool vsel_acth; + unsigned int vid; + int ret; + + desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); + if (!desc) + return -ENOMEM; + + enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_HIGH); + if (IS_ERR(enable_gpio)) + return dev_err_probe(dev, PTR_ERR(enable_gpio), "Failed to get 'enable' gpio\n"); + else if (enable_gpio) + usleep_range(RT5739_I2CRDY_TIMEUS, RT5739_I2CRDY_TIMEUS + 1000); + + regmap = devm_regmap_init_i2c(i2c, &rt5739_regmap_config); + if (IS_ERR(regmap)) + return dev_err_probe(dev, PTR_ERR(regmap), "Failed to init regmap\n"); + + ret = regmap_read(regmap, RT5739_REG_ID1, &vid); + if (ret) + return dev_err_probe(dev, ret, "Failed to read VID\n"); + + /* RT5739: (VID & MASK) must be 0 */ + if (vid & RT5739_VID_MASK) + return dev_err_probe(dev, -ENODEV, "Incorrect VID (0x%02x)\n", vid); + + vsel_acth = device_property_read_bool(dev, "richtek,vsel-active-high"); + + rt5739_init_regulator_desc(desc, vsel_acth); + + cfg.dev = dev; + cfg.of_node = dev_of_node(dev); + cfg.init_data = of_get_regulator_init_data(dev, dev_of_node(dev), desc); + rdev = devm_regulator_register(dev, desc, &cfg); + if (IS_ERR(rdev)) + return dev_err_probe(dev, PTR_ERR(rdev), "Failed to register regulator\n"); + + return 0; +} + +static const struct of_device_id rt5739_device_table[] = { + { .compatible = "richtek,rt5739" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, rt5739_device_table); + +static struct i2c_driver rt5739_driver = { + .driver = { + .name = "rt5739", + .of_match_table = rt5739_device_table, + }, + .probe_new = rt5739_probe, +}; +module_i2c_driver(rt5739_driver); + +MODULE_AUTHOR("ChiYuan Huang "); +MODULE_DESCRIPTION("Richtek RT5739 regulator driver"); +MODULE_LICENSE("GPL"); -- cgit v1.2.3 From 4eb6678ab53cac74e71fc5d4e6ff4035e5c847b6 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 7 Mar 2023 12:23:42 +0100 Subject: regulator: rt5739: Spelling s/Rcihtek/Richtek/ Fix a misspelling of "Richtek". Fixes: 4536f3b93a3373ca ("regulator: Add support for Richtek RT5739 voltage regulator") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/05f26d8e1e527f8b3fd2828f75ce2174e19c69e7.1678188171.git.geert+renesas@glider.be Signed-off-by: Mark Brown --- drivers/regulator/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 31f8e0b7bdf1..d8ee041212df 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1121,7 +1121,7 @@ config REGULATOR_RT5190A I2C control interface. config REGULATOR_RT5739 - tristate "Rcihtek RT5739 Regulator" + tristate "Richtek RT5739 Regulator" depends on I2C select REGMAP_I2C help -- cgit v1.2.3 From 7dda20c97fac52948b948e15e1173ee57c66ed35 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 10 Mar 2023 08:47:21 -0600 Subject: regulator: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144721.1544756-1-robh@kernel.org Signed-off-by: Mark Brown --- drivers/regulator/bd71815-regulator.c | 8 ++++---- drivers/regulator/fixed.c | 2 +- drivers/regulator/gpio-regulator.c | 2 +- drivers/regulator/pwm-regulator.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/regulator/bd71815-regulator.c b/drivers/regulator/bd71815-regulator.c index 8b55046eded8..f4eaea732de7 100644 --- a/drivers/regulator/bd71815-regulator.c +++ b/drivers/regulator/bd71815-regulator.c @@ -201,10 +201,10 @@ static int buck12_set_hw_dvs_levels(struct device_node *np, data = container_of(desc, struct bd71815_regulator, desc); - if (of_find_property(np, "rohm,dvs-run-voltage", NULL) || - of_find_property(np, "rohm,dvs-suspend-voltage", NULL) || - of_find_property(np, "rohm,dvs-lpsr-voltage", NULL) || - of_find_property(np, "rohm,dvs-snvs-voltage", NULL)) { + if (of_property_present(np, "rohm,dvs-run-voltage") || + of_property_present(np, "rohm,dvs-suspend-voltage") || + of_property_present(np, "rohm,dvs-lpsr-voltage") || + of_property_present(np, "rohm,dvs-snvs-voltage")) { ret = regmap_read(cfg->regmap, desc->vsel_reg, &val); if (ret) return ret; diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 2a9867abba20..7c3add05be15 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -151,7 +151,7 @@ of_get_fixed_voltage_config(struct device *dev, of_property_read_u32(np, "startup-delay-us", &config->startup_delay); of_property_read_u32(np, "off-on-delay-us", &config->off_on_delay); - if (of_find_property(np, "vin-supply", NULL)) + if (of_property_present(np, "vin-supply")) config->input_supply = "vin"; return config; diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 95e61a2f43f5..7602d48609df 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -220,7 +220,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np, regtype); } - if (of_find_property(np, "vin-supply", NULL)) + if (of_property_present(np, "vin-supply")) config->input_supply = "vin"; return config; diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index b9eeaff1c661..214ea866742d 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c @@ -334,7 +334,7 @@ static int pwm_regulator_probe(struct platform_device *pdev) memcpy(&drvdata->desc, &pwm_regulator_desc, sizeof(drvdata->desc)); - if (of_find_property(np, "voltage-table", NULL)) + if (of_property_present(np, "voltage-table")) ret = pwm_regulator_init_table(pdev, drvdata); else ret = pwm_regulator_init_continuous(pdev, drvdata); -- cgit v1.2.3 From 5bd73a162bc881dbb98ff9909dd865286852ee2b Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 10 Mar 2023 08:47:22 -0600 Subject: regulator: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144722.1544843-1-robh@kernel.org Signed-off-by: Mark Brown --- drivers/regulator/lp872x.c | 3 +-- drivers/regulator/max8997-regulator.c | 11 +++-------- drivers/regulator/max8998.c | 3 +-- drivers/regulator/s5m8767.c | 17 ++++++----------- drivers/regulator/stpmic1_regulator.c | 2 +- drivers/regulator/tps62360-regulator.c | 15 ++++----------- drivers/regulator/twl6030-regulator.c | 2 +- 7 files changed, 17 insertions(+), 36 deletions(-) diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c index c576894c3d52..b5d83a63991b 100644 --- a/drivers/regulator/lp872x.c +++ b/drivers/regulator/lp872x.c @@ -832,8 +832,7 @@ static struct lp872x_platform_data return ERR_PTR(-ENOMEM); of_property_read_u8(np, "ti,general-config", &pdata->general_config); - if (of_find_property(np, "ti,update-config", NULL)) - pdata->update_config = true; + pdata->update_config = of_property_read_bool(np, "ti,update-config"); pdata->dvs = devm_kzalloc(dev, sizeof(struct lp872x_dvs), GFP_KERNEL); if (!pdata->dvs) diff --git a/drivers/regulator/max8997-regulator.c b/drivers/regulator/max8997-regulator.c index ba47a5e2fbcb..829c3d9542af 100644 --- a/drivers/regulator/max8997-regulator.c +++ b/drivers/regulator/max8997-regulator.c @@ -943,14 +943,9 @@ static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev, } of_node_put(regulators_np); - if (of_get_property(pmic_np, "max8997,pmic-buck1-uses-gpio-dvs", NULL)) - pdata->buck1_gpiodvs = true; - - if (of_get_property(pmic_np, "max8997,pmic-buck2-uses-gpio-dvs", NULL)) - pdata->buck2_gpiodvs = true; - - if (of_get_property(pmic_np, "max8997,pmic-buck5-uses-gpio-dvs", NULL)) - pdata->buck5_gpiodvs = true; + pdata->buck1_gpiodvs = of_property_read_bool(pmic_np, "max8997,pmic-buck1-uses-gpio-dvs"); + pdata->buck2_gpiodvs = of_property_read_bool(pmic_np, "max8997,pmic-buck2-uses-gpio-dvs"); + pdata->buck5_gpiodvs = of_property_read_bool(pmic_np, "max8997,pmic-buck5-uses-gpio-dvs"); if (pdata->buck1_gpiodvs || pdata->buck2_gpiodvs || pdata->buck5_gpiodvs) { diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c index ac69bdd398cb..7f254066237d 100644 --- a/drivers/regulator/max8998.c +++ b/drivers/regulator/max8998.c @@ -618,8 +618,7 @@ static int max8998_pmic_dt_parse_pdata(struct max8998_dev *iodev, if (ret) return -EINVAL; - if (of_find_property(pmic_np, "max8998,pmic-buck-voltage-lock", NULL)) - pdata->buck_voltage_lock = true; + pdata->buck_voltage_lock = of_property_read_bool(pmic_np, "max8998,pmic-buck-voltage-lock"); ret = of_property_read_u32(pmic_np, "max8998,pmic-buck1-default-dvs-idx", diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c index 754c6fcc6e64..3122ca7de8f5 100644 --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c @@ -605,7 +605,7 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev, of_node_put(regulators_np); - if (of_get_property(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs", NULL)) { + if (of_property_read_bool(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs")) { pdata->buck2_gpiodvs = true; if (of_property_read_u32_array(pmic_np, @@ -616,7 +616,7 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev, } } - if (of_get_property(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs", NULL)) { + if (of_property_read_bool(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs")) { pdata->buck3_gpiodvs = true; if (of_property_read_u32_array(pmic_np, @@ -627,7 +627,7 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev, } } - if (of_get_property(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs", NULL)) { + if (of_property_read_bool(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs")) { pdata->buck4_gpiodvs = true; if (of_property_read_u32_array(pmic_np, @@ -661,14 +661,9 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev, if (ret) return -EINVAL; - if (of_get_property(pmic_np, "s5m8767,pmic-buck2-ramp-enable", NULL)) - pdata->buck2_ramp_enable = true; - - if (of_get_property(pmic_np, "s5m8767,pmic-buck3-ramp-enable", NULL)) - pdata->buck3_ramp_enable = true; - - if (of_get_property(pmic_np, "s5m8767,pmic-buck4-ramp-enable", NULL)) - pdata->buck4_ramp_enable = true; + pdata->buck2_ramp_enable = of_property_read_bool(pmic_np, "s5m8767,pmic-buck2-ramp-enable"); + pdata->buck3_ramp_enable = of_property_read_bool(pmic_np, "s5m8767,pmic-buck3-ramp-enable"); + pdata->buck4_ramp_enable = of_property_read_bool(pmic_np, "s5m8767,pmic-buck4-ramp-enable"); if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable || pdata->buck4_ramp_enable) { diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c index 2d7597c76e4a..d04759b56a95 100644 --- a/drivers/regulator/stpmic1_regulator.c +++ b/drivers/regulator/stpmic1_regulator.c @@ -576,7 +576,7 @@ static int stpmic1_regulator_register(struct platform_device *pdev, int id, } /* set mask reset */ - if (of_get_property(config.of_node, "st,mask-reset", NULL) && + if (of_property_read_bool(config.of_node, "st,mask-reset") && cfg->mask_reset_reg != 0) { ret = regmap_update_bits(pmic_dev->regmap, cfg->mask_reset_reg, diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c index da1b2b1341ae..a7019e869f50 100644 --- a/drivers/regulator/tps62360-regulator.c +++ b/drivers/regulator/tps62360-regulator.c @@ -296,17 +296,10 @@ static struct tps62360_regulator_platform_data * return NULL; } - if (of_find_property(np, "ti,vsel0-state-high", NULL)) - pdata->vsel0_def_state = 1; - - if (of_find_property(np, "ti,vsel1-state-high", NULL)) - pdata->vsel1_def_state = 1; - - if (of_find_property(np, "ti,enable-pull-down", NULL)) - pdata->en_internal_pulldn = true; - - if (of_find_property(np, "ti,enable-vout-discharge", NULL)) - pdata->en_discharge = true; + pdata->vsel0_def_state = of_property_read_bool(np, "ti,vsel0-state-high"); + pdata->vsel1_def_state = of_property_read_bool(np, "ti,vsel1-state-high"); + pdata->en_internal_pulldn = of_property_read_bool(np, "ti,enable-pull-down"); + pdata->en_discharge = of_property_read_bool(np, "ti,enable-vout-discharge"); return pdata; } diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c index f3856750944f..d94e61aa1b84 100644 --- a/drivers/regulator/twl6030-regulator.c +++ b/drivers/regulator/twl6030-regulator.c @@ -729,7 +729,7 @@ static int twlreg_probe(struct platform_device *pdev) break; } - if (of_get_property(np, "ti,retain-on-reset", NULL)) + if (of_property_read_bool(np, "ti,retain-on-reset")) info->flags |= TWL_6030_WARM_RESET; config.dev = &pdev->dev; -- cgit v1.2.3 From 70b26bb55f719e2900404459128d41c8425c8dde Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 10 Mar 2023 22:45:45 +0100 Subject: regulator: lp872x: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/regulator/lp872x.c:931:34: error: ‘lp872x_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214553.275450-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown --- drivers/regulator/lp872x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c index b5d83a63991b..26ed989460c0 100644 --- a/drivers/regulator/lp872x.c +++ b/drivers/regulator/lp872x.c @@ -927,7 +927,7 @@ static int lp872x_probe(struct i2c_client *cl) return lp872x_regulator_register(lp); } -static const struct of_device_id lp872x_dt_ids[] = { +static const struct of_device_id lp872x_dt_ids[] __maybe_unused = { { .compatible = "ti,lp8720", }, { .compatible = "ti,lp8725", }, { } -- cgit v1.2.3 From 4a5850865641d0b83caaad81ca0bbd722ac514fb Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 10 Mar 2023 22:45:46 +0100 Subject: regulator: max20086: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/regulator/max20086-regulator.c:289:34: error: ‘max20086_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20230310214553.275450-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown --- drivers/regulator/max20086-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max20086-regulator.c b/drivers/regulator/max20086-regulator.c index b8bf76c170fe..c98a72f43935 100644 --- a/drivers/regulator/max20086-regulator.c +++ b/drivers/regulator/max20086-regulator.c @@ -286,7 +286,7 @@ static const struct i2c_device_id max20086_i2c_id[] = { MODULE_DEVICE_TABLE(i2c, max20086_i2c_id); -static const struct of_device_id max20086_dt_ids[] = { +static const struct of_device_id max20086_dt_ids[] __maybe_unused = { { .compatible = "maxim,max20086", .data = &(const struct max20086_chip_info) { -- cgit v1.2.3 From 334e6b85a348a79bb018003f09e1cc94accd53a2 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 10 Mar 2023 22:45:47 +0100 Subject: regulator: mp8859: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/regulator/mp8859.c:132:34: error: ‘mp8859_dt_id’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214553.275450-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown --- drivers/regulator/mp8859.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mp8859.c b/drivers/regulator/mp8859.c index f2300714d5a9..f893dadf2abb 100644 --- a/drivers/regulator/mp8859.c +++ b/drivers/regulator/mp8859.c @@ -129,7 +129,7 @@ static int mp8859_i2c_probe(struct i2c_client *i2c) return 0; } -static const struct of_device_id mp8859_dt_id[] = { +static const struct of_device_id mp8859_dt_id[] __maybe_unused = { {.compatible = "mps,mp8859"}, {}, }; -- cgit v1.2.3 From 38cc873cb1cf27965dacbbc5957a7a8aee89679c Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 10 Mar 2023 22:45:48 +0100 Subject: regulator: mt6397-regulator: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/regulator/mt6397-regulator.c:400:34: error: ‘mt6397_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230310214553.275450-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown --- drivers/regulator/mt6397-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mt6397-regulator.c b/drivers/regulator/mt6397-regulator.c index b9bf7ade1f8a..526acc8fbe80 100644 --- a/drivers/regulator/mt6397-regulator.c +++ b/drivers/regulator/mt6397-regulator.c @@ -397,7 +397,7 @@ static const struct platform_device_id mt6397_platform_ids[] = { }; MODULE_DEVICE_TABLE(platform, mt6397_platform_ids); -static const struct of_device_id mt6397_of_match[] = { +static const struct of_device_id mt6397_of_match[] __maybe_unused = { { .compatible = "mediatek,mt6397-regulator", }, { /* sentinel */ }, }; -- cgit v1.2.3 From 691c1fcda5351ed98a44610b7dccc0e3ee920020 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Mon, 13 Mar 2023 11:18:19 -0700 Subject: regulator: core: Shorten off-on-delay-us for always-on/boot-on by time since booted This is very close to a straight revert of commit 218320fec294 ("regulator: core: Fix off-on-delay-us for always-on/boot-on regulators"). We've identified that patch as causing a boot speed regression on sc7180-trogdor boards. While boot speed certainly isn't more important than making sure that power sequencing is correct, looking closely at the original change it doesn't seem to have been fully justified. It mentions "cycling issues" without describing exactly what the issues were. That means it's possible that the cycling issues were really a problem that should be fixed in a different way. Let's take a careful look at how we should handle regulators that have an off-on-delay and that are boot-on or always-on. Linux currently doesn't have any way to identify whether a GPIO regulator was already on when the kernel booted. That means that when the kernel boots we probe a regulator, see that it wants boot-on / always-on we, and then turn the regulator on. We could be in one of two cases when we do this: a) The regulator might have been left on by the bootloader and we're ensuring that it stays on. b) The regulator might have been left off by the bootloader and we're just now turning it on. For case a) we definitely don't need any sort of delay. For case b) we _might_ need some delay in case the bootloader turned the regulator off _right_ before booting the kernel. To get the proper delay for case b) then we can just assume a `last_off` of 0, which is what it gets initialized to by default. As per above, we can't tell whether we're in case a) or case b) so we'll assume the longer delay (case b). This basically puts the code to how it was before commit 218320fec294 ("regulator: core: Fix off-on-delay-us for always-on/boot-on regulators"). However, we add one important change: we make sure that the delay is actually honored if `last_off` is 0. Though the original "cycling issues" cited were vague, I'm hopeful that this important extra change will be enough to fix the issues that the initial commit mentioned. With this fix, I've confined that on a sc7180-trogdor board the delay at boot goes down from 500 ms to ~250 ms. That's not as good as the 0 ms that we had prior to commit 218320fec294 ("regulator: core: Fix off-on-delay-us for always-on/boot-on regulators"), but it's probably safer because we don't know if the bootloader turned the regulator off right before booting. One note is that it's possible that we could be in a state that's not a) or b) if there are other issues in the kernel. The only one I can think of is related to pinctrl. If the pinctrl driver being used on a board isn't careful about avoiding glitches when setting up a pin then it's possible that setting up a pin could cause the regulator to "turn off" briefly immediately before the regulator probes. If this is indeed causing problems then the pinctrl driver should be fixed, perhaps in a similar way to what was done in commit d21f4b7ffc22 ("pinctrl: qcom: Avoid glitching lines when we first mux to output") Fixes: 218320fec294 ("regulator: core: Fix off-on-delay-us for always-on/boot-on regulators") Cc: Christian Kohlschütter Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230313111806.1.I2eaad872be0932a805c239a7c7a102233fb0b03b@changeid Signed-off-by: Mark Brown --- drivers/regulator/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 4fcd36055b02..1490eb40c973 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1583,9 +1583,6 @@ static int set_machine_constraints(struct regulator_dev *rdev) rdev->constraints->always_on = true; } - if (rdev->desc->off_on_delay) - rdev->last_off = ktime_get_boottime(); - /* If the constraints say the regulator should be on at this point * and we have control then make sure it is enabled. */ @@ -1619,6 +1616,8 @@ static int set_machine_constraints(struct regulator_dev *rdev) if (rdev->constraints->always_on) rdev->use_count++; + } else if (rdev->desc->off_on_delay) { + rdev->last_off = ktime_get(); } print_constraints(rdev); @@ -2668,7 +2667,7 @@ static int _regulator_do_enable(struct regulator_dev *rdev) trace_regulator_enable(rdev_get_name(rdev)); - if (rdev->desc->off_on_delay && rdev->last_off) { + if (rdev->desc->off_on_delay) { /* if needed, keep a distance of off_on_delay from last time * this regulator was disabled. */ -- cgit v1.2.3 From 259b93b21a9ffe5117af4dfb5505437e463c6a5a Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Thu, 16 Mar 2023 12:54:38 -0700 Subject: regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14 Probing of regulators can be a slow operation and can contribute to slower boot times. This is especially true if a regulator is turned on at probe time (with regulator-boot-on or regulator-always-on) and the regulator requires delays (off-on-time, ramp time, etc). While the overall kernel is not ready to switch to async probe by default, as per the discussion on the mailing lists [1] it is believed that the regulator subsystem is in good shape and we can move regulator drivers over wholesale. There is no way to just magically opt in all regulators (regulators are just normal drivers like platform_driver), so we set PROBE_PREFER_ASYNCHRONOUS for all regulators found in 'drivers/regulator' individually. Given the number of drivers touched and the impossibility to test this ahead of time, it wouldn't be shocking at all if this caused a regression for someone. If there is a regression caused by this patch, it's likely to be one of the cases talked about in [1]. As a "quick fix", drivers involved in the regression could be fixed by changing them to PROBE_FORCE_SYNCHRONOUS. That being said, the correct fix would be to directly fix the problem that caused the issue with async probe. The approach here follows a similar approach that was used for the mmc subsystem several years ago [2]. In fact, I ran nearly the same python script to auto-generate the changes. The only thing I changed was to search for "i2c_driver", "spmi_driver", and "spi_driver" in addition to "platform_driver". [1] https://lore.kernel.org/r/06db017f-e985-4434-8d1d-02ca2100cca0@sirena.org.uk [2] https://lore.kernel.org/r/20200903232441.2694866-1-dianders@chromium.org/ Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.1.I2a4677392a38db5758dee0788b2cea5872562a82@changeid Signed-off-by: Mark Brown --- drivers/regulator/88pm800-regulator.c | 1 + drivers/regulator/88pm8607.c | 1 + drivers/regulator/aat2870-regulator.c | 1 + drivers/regulator/ab8500-ext.c | 1 + drivers/regulator/ab8500.c | 1 + drivers/regulator/act8865-regulator.c | 1 + drivers/regulator/act8945a-regulator.c | 1 + drivers/regulator/ad5398.c | 1 + drivers/regulator/anatop-regulator.c | 1 + drivers/regulator/arizona-ldo1.c | 1 + drivers/regulator/arizona-micsupp.c | 1 + drivers/regulator/as3711-regulator.c | 1 + drivers/regulator/as3722-regulator.c | 1 + drivers/regulator/axp20x-regulator.c | 1 + drivers/regulator/bcm590xx-regulator.c | 1 + drivers/regulator/bd9571mwv-regulator.c | 1 + drivers/regulator/cpcap-regulator.c | 1 + drivers/regulator/da903x-regulator.c | 1 + drivers/regulator/da9052-regulator.c | 1 + drivers/regulator/da9055-regulator.c | 1 + drivers/regulator/da9062-regulator.c | 1 + drivers/regulator/da9063-regulator.c | 1 + drivers/regulator/da9210-regulator.c | 1 + drivers/regulator/da9211-regulator.c | 1 + drivers/regulator/db8500-prcmu.c | 1 + drivers/regulator/dummy.c | 1 + drivers/regulator/fan53555.c | 1 + drivers/regulator/fixed.c | 1 + drivers/regulator/gpio-regulator.c | 1 + drivers/regulator/hi6421-regulator.c | 1 + drivers/regulator/hi6421v530-regulator.c | 1 + drivers/regulator/hi655x-regulator.c | 1 + drivers/regulator/isl6271a-regulator.c | 1 + drivers/regulator/isl9305.c | 1 + drivers/regulator/lm363x-regulator.c | 1 + drivers/regulator/lp3971.c | 1 + drivers/regulator/lp3972.c | 1 + drivers/regulator/lp872x.c | 1 + drivers/regulator/lp873x-regulator.c | 1 + drivers/regulator/lp8755.c | 1 + drivers/regulator/lp87565-regulator.c | 1 + drivers/regulator/lp8788-buck.c | 1 + drivers/regulator/lp8788-ldo.c | 2 ++ drivers/regulator/ltc3589.c | 1 + drivers/regulator/ltc3676.c | 1 + drivers/regulator/max14577-regulator.c | 1 + drivers/regulator/max1586.c | 1 + drivers/regulator/max77620-regulator.c | 1 + drivers/regulator/max77686-regulator.c | 1 + drivers/regulator/max77693-regulator.c | 1 + drivers/regulator/max77802-regulator.c | 1 + drivers/regulator/max8649.c | 1 + drivers/regulator/max8660.c | 1 + drivers/regulator/max8907-regulator.c | 1 + drivers/regulator/max8925-regulator.c | 1 + drivers/regulator/max8952.c | 1 + drivers/regulator/max8973-regulator.c | 1 + drivers/regulator/max8997-regulator.c | 1 + drivers/regulator/max8998.c | 1 + drivers/regulator/mc13783-regulator.c | 1 + drivers/regulator/mc13892-regulator.c | 1 + drivers/regulator/mt6311-regulator.c | 1 + drivers/regulator/mt6323-regulator.c | 1 + drivers/regulator/mt6380-regulator.c | 1 + drivers/regulator/mt6397-regulator.c | 1 + drivers/regulator/palmas-regulator.c | 1 + drivers/regulator/pbias-regulator.c | 1 + drivers/regulator/pcap-regulator.c | 1 + drivers/regulator/pcf50633-regulator.c | 1 + drivers/regulator/pfuze100-regulator.c | 1 + drivers/regulator/pv88060-regulator.c | 1 + drivers/regulator/pv88080-regulator.c | 1 + drivers/regulator/pv88090-regulator.c | 1 + drivers/regulator/pwm-regulator.c | 1 + drivers/regulator/qcom_rpm-regulator.c | 1 + drivers/regulator/qcom_smd-regulator.c | 1 + drivers/regulator/qcom_spmi-regulator.c | 1 + drivers/regulator/rc5t583-regulator.c | 1 + drivers/regulator/rk808-regulator.c | 3 ++- drivers/regulator/rn5t618-regulator.c | 1 + drivers/regulator/rt5033-regulator.c | 1 + drivers/regulator/s2mpa01.c | 1 + drivers/regulator/s2mps11.c | 1 + drivers/regulator/s5m8767.c | 1 + drivers/regulator/sky81452-regulator.c | 1 + drivers/regulator/stm32-vrefbuf.c | 1 + drivers/regulator/stw481x-vmmc.c | 1 + drivers/regulator/ti-abb-regulator.c | 1 + drivers/regulator/tps51632-regulator.c | 1 + drivers/regulator/tps6105x-regulator.c | 1 + drivers/regulator/tps62360-regulator.c | 1 + drivers/regulator/tps65023-regulator.c | 1 + drivers/regulator/tps6507x-regulator.c | 1 + drivers/regulator/tps65086-regulator.c | 1 + drivers/regulator/tps65090-regulator.c | 1 + drivers/regulator/tps65132-regulator.c | 1 + drivers/regulator/tps65217-regulator.c | 1 + drivers/regulator/tps65218-regulator.c | 1 + drivers/regulator/tps6524x-regulator.c | 1 + drivers/regulator/tps6586x-regulator.c | 1 + drivers/regulator/tps65910-regulator.c | 1 + drivers/regulator/tps65912-regulator.c | 1 + drivers/regulator/twl-regulator.c | 1 + drivers/regulator/twl6030-regulator.c | 1 + drivers/regulator/userspace-consumer.c | 1 + drivers/regulator/vctrl-regulator.c | 1 + drivers/regulator/vexpress-regulator.c | 1 + drivers/regulator/virtual.c | 1 + drivers/regulator/wm831x-dcdc.c | 4 ++++ drivers/regulator/wm831x-isink.c | 1 + drivers/regulator/wm831x-ldo.c | 3 +++ drivers/regulator/wm8350-regulator.c | 1 + drivers/regulator/wm8400-regulator.c | 1 + drivers/regulator/wm8994-regulator.c | 1 + 114 files changed, 121 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/88pm800-regulator.c b/drivers/regulator/88pm800-regulator.c index d08ee81ed1ac..83e8860309dc 100644 --- a/drivers/regulator/88pm800-regulator.c +++ b/drivers/regulator/88pm800-regulator.c @@ -274,6 +274,7 @@ static int pm800_regulator_probe(struct platform_device *pdev) static struct platform_driver pm800_regulator_driver = { .driver = { .name = "88pm80x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = pm800_regulator_probe, }; diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index 1d1c4a7ec3e2..e6c436955e25 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c @@ -383,6 +383,7 @@ MODULE_DEVICE_TABLE(platform, pm8607_regulator_driver_ids); static struct platform_driver pm8607_regulator_driver = { .driver = { .name = "88pm860x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = pm8607_regulator_probe, .id_table = pm8607_regulator_driver_ids, diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c index d6ed5bf9235e..970d86f2bbb8 100644 --- a/drivers/regulator/aat2870-regulator.c +++ b/drivers/regulator/aat2870-regulator.c @@ -178,6 +178,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev) static struct platform_driver aat2870_regulator_driver = { .driver = { .name = "aat2870-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = aat2870_regulator_probe, }; diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c index 4f26952caa56..b9955aa4e0d1 100644 --- a/drivers/regulator/ab8500-ext.c +++ b/drivers/regulator/ab8500-ext.c @@ -446,6 +446,7 @@ static struct platform_driver ab8500_ext_regulator_driver = { .probe = ab8500_ext_regulator_probe, .driver = { .name = "ab8500-ext-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 23a401734a98..6b4a3a3d8385 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -1737,6 +1737,7 @@ static struct platform_driver ab8500_regulator_driver = { .probe = ab8500_regulator_probe, .driver = { .name = "ab8500-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index 53f2c75cdeb4..5c409ff4aa99 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c @@ -789,6 +789,7 @@ MODULE_DEVICE_TABLE(i2c, act8865_ids); static struct i2c_driver act8865_pmic_driver = { .driver = { .name = "act8865", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe_new = act8865_pmic_probe, .id_table = act8865_ids, diff --git a/drivers/regulator/act8945a-regulator.c b/drivers/regulator/act8945a-regulator.c index 1db1c6423779..e26264529b74 100644 --- a/drivers/regulator/act8945a-regulator.c +++ b/drivers/regulator/act8945a-regulator.c @@ -348,6 +348,7 @@ static void act8945a_pmic_shutdown(struct platform_device *pdev) static struct platform_driver act8945a_pmic_driver = { .driver = { .name = "act8945a-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .pm = &act8945a_pm, }, .probe = act8945a_pmic_probe, diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c index 2ba8ac1773d1..c228cf6956d1 100644 --- a/drivers/regulator/ad5398.c +++ b/drivers/regulator/ad5398.c @@ -257,6 +257,7 @@ static struct i2c_driver ad5398_driver = { .probe_new = ad5398_probe, .driver = { .name = "ad5398", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .id_table = ad5398_id, }; diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index f9856d4e295f..700bd0343196 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -328,6 +328,7 @@ MODULE_DEVICE_TABLE(of, of_anatop_regulator_match_tbl); static struct platform_driver anatop_regulator_driver = { .driver = { .name = "anatop_regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_anatop_regulator_match_tbl, }, .probe = anatop_regulator_probe, diff --git a/drivers/regulator/arizona-ldo1.c b/drivers/regulator/arizona-ldo1.c index ade0bef4569d..cabc9e6374a8 100644 --- a/drivers/regulator/arizona-ldo1.c +++ b/drivers/regulator/arizona-ldo1.c @@ -380,6 +380,7 @@ static struct platform_driver arizona_ldo1_driver = { .remove = arizona_ldo1_remove, .driver = { .name = "arizona-ldo1", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/arizona-micsupp.c b/drivers/regulator/arizona-micsupp.c index 596ecd8041cd..a9fdb342efcf 100644 --- a/drivers/regulator/arizona-micsupp.c +++ b/drivers/regulator/arizona-micsupp.c @@ -365,6 +365,7 @@ static struct platform_driver arizona_micsupp_driver = { .probe = arizona_micsupp_probe, .driver = { .name = "arizona-micsupp", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c index b6b9206969ae..0431a732cd78 100644 --- a/drivers/regulator/as3711-regulator.c +++ b/drivers/regulator/as3711-regulator.c @@ -243,6 +243,7 @@ static int as3711_regulator_probe(struct platform_device *pdev) static struct platform_driver as3711_regulator_driver = { .driver = { .name = "as3711-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = as3711_regulator_probe, }; diff --git a/drivers/regulator/as3722-regulator.c b/drivers/regulator/as3722-regulator.c index 7bebf9ce6271..da378bfdba40 100644 --- a/drivers/regulator/as3722-regulator.c +++ b/drivers/regulator/as3722-regulator.c @@ -831,6 +831,7 @@ MODULE_DEVICE_TABLE(of, of_as3722_regulator_match); static struct platform_driver as3722_regulator_driver = { .driver = { .name = "as3722-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_as3722_regulator_match, }, .probe = as3722_regulator_probe, diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c index d260c442b788..943172b19722 100644 --- a/drivers/regulator/axp20x-regulator.c +++ b/drivers/regulator/axp20x-regulator.c @@ -1364,6 +1364,7 @@ static struct platform_driver axp20x_regulator_driver = { .probe = axp20x_regulator_probe, .driver = { .name = "axp20x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/bcm590xx-regulator.c b/drivers/regulator/bcm590xx-regulator.c index 65e23fc5f9c3..9f0cda46b015 100644 --- a/drivers/regulator/bcm590xx-regulator.c +++ b/drivers/regulator/bcm590xx-regulator.c @@ -354,6 +354,7 @@ static int bcm590xx_probe(struct platform_device *pdev) static struct platform_driver bcm590xx_regulator_driver = { .driver = { .name = "bcm590xx-vregs", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = bcm590xx_probe, }; diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c index ba020a45f238..d469481d8442 100644 --- a/drivers/regulator/bd9571mwv-regulator.c +++ b/drivers/regulator/bd9571mwv-regulator.c @@ -353,6 +353,7 @@ MODULE_DEVICE_TABLE(platform, bd9571mwv_regulator_id_table); static struct platform_driver bd9571mwv_regulator_driver = { .driver = { .name = "bd9571mwv-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .pm = DEV_PM_OPS, }, .probe = bd9571mwv_regulator_probe, diff --git a/drivers/regulator/cpcap-regulator.c b/drivers/regulator/cpcap-regulator.c index b0c225d98631..1fd79fb17303 100644 --- a/drivers/regulator/cpcap-regulator.c +++ b/drivers/regulator/cpcap-regulator.c @@ -553,6 +553,7 @@ static struct platform_driver cpcap_regulator_driver = { .probe = cpcap_regulator_probe, .driver = { .name = "cpcap-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(cpcap_regulator_id_table), }, }; diff --git a/drivers/regulator/da903x-regulator.c b/drivers/regulator/da903x-regulator.c index 770e694824ac..f79337079a45 100644 --- a/drivers/regulator/da903x-regulator.c +++ b/drivers/regulator/da903x-regulator.c @@ -471,6 +471,7 @@ static int da903x_regulator_probe(struct platform_device *pdev) static struct platform_driver da903x_regulator_driver = { .driver = { .name = "da903x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = da903x_regulator_probe, }; diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c index 23fa429ebe76..ab6f5d61b173 100644 --- a/drivers/regulator/da9052-regulator.c +++ b/drivers/regulator/da9052-regulator.c @@ -438,6 +438,7 @@ static struct platform_driver da9052_regulator_driver = { .probe = da9052_regulator_probe, .driver = { .name = "da9052-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c index 73ff5fc7d8d7..8fd9ac787588 100644 --- a/drivers/regulator/da9055-regulator.c +++ b/drivers/regulator/da9055-regulator.c @@ -576,6 +576,7 @@ static struct platform_driver da9055_regulator_driver = { .probe = da9055_regulator_probe, .driver = { .name = "da9055-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c index 1a6324001027..c28b061eef02 100644 --- a/drivers/regulator/da9062-regulator.c +++ b/drivers/regulator/da9062-regulator.c @@ -1033,6 +1033,7 @@ static int da9062_regulator_probe(struct platform_device *pdev) static struct platform_driver da9062_regulator_driver = { .driver = { .name = "da9062-regulators", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = da9062_regulator_probe, }; diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c index 82f52a2a031a..e092e4df86ab 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c @@ -971,6 +971,7 @@ static int da9063_regulator_probe(struct platform_device *pdev) static struct platform_driver da9063_regulator_driver = { .driver = { .name = DA9063_DRVNAME_REGULATORS, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = da9063_regulator_probe, }; diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c index 7493af0b5c04..4332a3b8a672 100644 --- a/drivers/regulator/da9210-regulator.c +++ b/drivers/regulator/da9210-regulator.c @@ -221,6 +221,7 @@ MODULE_DEVICE_TABLE(i2c, da9210_i2c_id); static struct i2c_driver da9210_regulator_driver = { .driver = { .name = "da9210", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(da9210_dt_ids), }, .probe_new = da9210_i2c_probe, diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c index 00828f5baa97..a2b4f6f1e34b 100644 --- a/drivers/regulator/da9211-regulator.c +++ b/drivers/regulator/da9211-regulator.c @@ -552,6 +552,7 @@ MODULE_DEVICE_TABLE(of, da9211_dt_ids); static struct i2c_driver da9211_regulator_driver = { .driver = { .name = "da9211", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(da9211_dt_ids), }, .probe_new = da9211_i2c_probe, diff --git a/drivers/regulator/db8500-prcmu.c b/drivers/regulator/db8500-prcmu.c index 0ce6ec4933af..34c5e485d0af 100644 --- a/drivers/regulator/db8500-prcmu.c +++ b/drivers/regulator/db8500-prcmu.c @@ -479,6 +479,7 @@ static int db8500_regulator_remove(struct platform_device *pdev) static struct platform_driver db8500_regulator_driver = { .driver = { .name = "db8500-prcmu-regulators", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = db8500_regulator_probe, .remove = db8500_regulator_remove, diff --git a/drivers/regulator/dummy.c b/drivers/regulator/dummy.c index 24e586f93855..5b9b9e4e762d 100644 --- a/drivers/regulator/dummy.c +++ b/drivers/regulator/dummy.c @@ -60,6 +60,7 @@ static struct platform_driver dummy_regulator_driver = { .probe = dummy_regulator_probe, .driver = { .name = "reg-dummy", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 529963a7e4f5..d0c678767294 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -663,6 +663,7 @@ MODULE_DEVICE_TABLE(i2c, fan53555_id); static struct i2c_driver fan53555_regulator_driver = { .driver = { .name = "fan53555-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(fan53555_dt_ids), }, .probe_new = fan53555_regulator_probe, diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 7c3add05be15..e3436f49dea4 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -334,6 +334,7 @@ static struct platform_driver regulator_fixed_voltage_driver = { .probe = reg_fixed_voltage_probe, .driver = { .name = "reg-fixed-voltage", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(fixed_of_match), }, }; diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 7602d48609df..65927fa2ef16 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -368,6 +368,7 @@ static struct platform_driver gpio_regulator_driver = { .probe = gpio_regulator_probe, .driver = { .name = "gpio-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(regulator_gpio_of_match), }, }; diff --git a/drivers/regulator/hi6421-regulator.c b/drivers/regulator/hi6421-regulator.c index d144a4bdb76d..1b52423598d3 100644 --- a/drivers/regulator/hi6421-regulator.c +++ b/drivers/regulator/hi6421-regulator.c @@ -579,6 +579,7 @@ static struct platform_driver hi6421_regulator_driver = { .id_table = hi6421_regulator_table, .driver = { .name = "hi6421-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = hi6421_regulator_probe, }; diff --git a/drivers/regulator/hi6421v530-regulator.c b/drivers/regulator/hi6421v530-regulator.c index 988115f9b594..23924ff0c7b2 100644 --- a/drivers/regulator/hi6421v530-regulator.c +++ b/drivers/regulator/hi6421v530-regulator.c @@ -200,6 +200,7 @@ static struct platform_driver hi6421v530_regulator_driver = { .id_table = hi6421v530_regulator_table, .driver = { .name = "hi6421v530-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = hi6421v530_regulator_probe, }; diff --git a/drivers/regulator/hi655x-regulator.c b/drivers/regulator/hi655x-regulator.c index 556bb73f3329..1d8211f635b7 100644 --- a/drivers/regulator/hi655x-regulator.c +++ b/drivers/regulator/hi655x-regulator.c @@ -206,6 +206,7 @@ static struct platform_driver hi655x_regulator_driver = { .id_table = hi655x_regulator_table, .driver = { .name = "hi655x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = hi655x_regulator_probe, }; diff --git a/drivers/regulator/isl6271a-regulator.c b/drivers/regulator/isl6271a-regulator.c index b23b052eab10..3c37c4de1d82 100644 --- a/drivers/regulator/isl6271a-regulator.c +++ b/drivers/regulator/isl6271a-regulator.c @@ -147,6 +147,7 @@ MODULE_DEVICE_TABLE(i2c, isl6271a_id); static struct i2c_driver isl6271a_i2c_driver = { .driver = { .name = "isl6271a", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe_new = isl6271a_probe, .id_table = isl6271a_id, diff --git a/drivers/regulator/isl9305.c b/drivers/regulator/isl9305.c index cfb765986d0d..90bc8d054304 100644 --- a/drivers/regulator/isl9305.c +++ b/drivers/regulator/isl9305.c @@ -195,6 +195,7 @@ MODULE_DEVICE_TABLE(i2c, isl9305_i2c_id); static struct i2c_driver isl9305_regulator_driver = { .driver = { .name = "isl9305", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(isl9305_dt_ids), }, .probe_new = isl9305_i2c_probe, diff --git a/drivers/regulator/lm363x-regulator.c b/drivers/regulator/lm363x-regulator.c index 4b9f618b07e9..7531b2c37f95 100644 --- a/drivers/regulator/lm363x-regulator.c +++ b/drivers/regulator/lm363x-regulator.c @@ -355,6 +355,7 @@ static struct platform_driver lm363x_regulator_driver = { .probe = lm363x_regulator_probe, .driver = { .name = "lm363x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c index 8be252f81b09..e06f2a092b89 100644 --- a/drivers/regulator/lp3971.c +++ b/drivers/regulator/lp3971.c @@ -447,6 +447,7 @@ MODULE_DEVICE_TABLE(i2c, lp3971_i2c_id); static struct i2c_driver lp3971_i2c_driver = { .driver = { .name = "LP3971", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe_new = lp3971_i2c_probe, .id_table = lp3971_i2c_id, diff --git a/drivers/regulator/lp3972.c b/drivers/regulator/lp3972.c index 27b216bf18fc..edacca8e14af 100644 --- a/drivers/regulator/lp3972.c +++ b/drivers/regulator/lp3972.c @@ -545,6 +545,7 @@ MODULE_DEVICE_TABLE(i2c, lp3972_i2c_id); static struct i2c_driver lp3972_i2c_driver = { .driver = { .name = "lp3972", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe_new = lp3972_i2c_probe, .id_table = lp3972_i2c_id, diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c index 26ed989460c0..a8b0969d4f31 100644 --- a/drivers/regulator/lp872x.c +++ b/drivers/regulator/lp872x.c @@ -944,6 +944,7 @@ MODULE_DEVICE_TABLE(i2c, lp872x_ids); static struct i2c_driver lp872x_driver = { .driver = { .name = "lp872x", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(lp872x_dt_ids), }, .probe_new = lp872x_probe, diff --git a/drivers/regulator/lp873x-regulator.c b/drivers/regulator/lp873x-regulator.c index d6e597922cb5..8dfdd1db2070 100644 --- a/drivers/regulator/lp873x-regulator.c +++ b/drivers/regulator/lp873x-regulator.c @@ -187,6 +187,7 @@ MODULE_DEVICE_TABLE(platform, lp873x_regulator_id_table); static struct platform_driver lp873x_regulator_driver = { .driver = { .name = "lp873x-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = lp873x_regulator_probe, .id_table = lp873x_regulator_id_table, diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c index 467dfdcebc91..37b51b94fb5a 100644 --- a/drivers/regulator/lp8755.c +++ b/drivers/regulator/lp8755.c @@ -440,6 +440,7 @@ MODULE_DEVICE_TABLE(i2c, lp8755_id); static struct i2c_driver lp8755_i2c_driver = { .driver = { .name = LP8755_NAME, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe_new = lp8755_probe, .remove = lp8755_remove, diff --git a/drivers/regulator/lp87565-regulator.c b/drivers/regulator/lp87565-regulator.c index d059ae85047a..bdb60d8a7f3d 100644 --- a/drivers/regulator/lp87565-regulator.c +++ b/drivers/regulator/lp87565-regulator.c @@ -237,6 +237,7 @@ MODULE_DEVICE_TABLE(platform, lp87565_regulator_id_table); static struct platform_driver lp87565_regulator_driver = { .driver = { .name = "lp87565-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = lp87565_regulator_probe, .id_table = lp87565_regulator_id_table, diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c index 74b7b496b12d..e97ade09dede 100644 --- a/drivers/regulator/lp8788-buck.c +++ b/drivers/regulator/lp8788-buck.c @@ -531,6 +531,7 @@ static struct platform_driver lp8788_buck_driver = { .probe = lp8788_buck_probe, .driver = { .name = LP8788_DEV_BUCK, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/lp8788-ldo.c b/drivers/regulator/lp8788-ldo.c index 00e9bb92c326..8e45b7b99556 100644 --- a/drivers/regulator/lp8788-ldo.c +++ b/drivers/regulator/lp8788-ldo.c @@ -564,6 +564,7 @@ static struct platform_driver lp8788_dldo_driver = { .probe = lp8788_dldo_probe, .driver = { .name = LP8788_DEV_DLDO, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; @@ -611,6 +612,7 @@ static struct platform_driver lp8788_aldo_driver = { .probe = lp8788_aldo_probe, .driver = { .name = LP8788_DEV_ALDO, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c index 460d34c50fb0..359b534d8c70 100644 --- a/drivers/regulator/ltc3589.c +++ b/drivers/regulator/ltc3589.c @@ -474,6 +474,7 @@ MODULE_DEVICE_TABLE(of, ltc3589_of_match); static struct i2c_driver ltc3589_driver = { .driver = { .name = DRIVER_NAME, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(ltc3589_of_match), }, .probe_new = ltc3589_probe, diff --git a/drivers/regulator/ltc3676.c b/drivers/regulator/ltc3676.c index eb3d6bed6d54..a28e6c3460f1 100644 --- a/drivers/regulator/ltc3676.c +++ b/drivers/regulator/ltc3676.c @@ -371,6 +371,7 @@ MODULE_DEVICE_TABLE(of, ltc3676_of_match); static struct i2c_driver ltc3676_driver = { .driver = { .name = DRIVER_NAME, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(ltc3676_of_match), }, .probe_new = ltc3676_regulator_probe, diff --git a/drivers/regulator/max14577-regulator.c b/drivers/regulator/max14577-regulator.c index e34face736f4..5e7171b9065a 100644 --- a/drivers/regulator/max14577-regulator.c +++ b/drivers/regulator/max14577-regulator.c @@ -241,6 +241,7 @@ MODULE_DEVICE_TABLE(platform, max14577_regulator_id); static struct platform_driver max14577_regulator_driver = { .driver = { .name = "max14577-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = max14577_regulator_probe, .id_table = max14577_regulator_id, diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c index a00aa2e8ff3f..5d8852b2c168 100644 --- a/drivers/regulator/max1586.c +++ b/drivers/regulator/max1586.c @@ -292,6 +292,7 @@ static struct i2c_driver max1586_pmic_driver = { .probe_new = max1586_pmic_probe, .driver = { .name = "max1586", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(max1586_of_match), }, .id_table = max1586_id, diff --git a/drivers/regulator/max77620-regulator.c b/drivers/regulator/max77620-regulator.c index 3cf8f085170a..7bc87d8e9f68 100644 --- a/drivers/regulator/max77620-regulator.c +++ b/drivers/regulator/max77620-regulator.c @@ -916,6 +916,7 @@ static struct platform_driver max77620_regulator_driver = { .id_table = max77620_regulator_devtype, .driver = { .name = "max77620-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .pm = &max77620_regulator_pm_ops, }, }; diff --git a/drivers/regulator/max77686-regulator.c b/drivers/regulator/max77686-regulator.c index 55a07d3f3ee2..c7b270fd9e0c 100644 --- a/drivers/regulator/max77686-regulator.c +++ b/drivers/regulator/max77686-regulator.c @@ -525,6 +525,7 @@ MODULE_DEVICE_TABLE(platform, max77686_pmic_id); static struct platform_driver max77686_pmic_driver = { .driver = { .name = "max77686-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = max77686_pmic_probe, .id_table = max77686_pmic_id, diff --git a/drivers/regulator/max77693-regulator.c b/drivers/regulator/max77693-regulator.c index 077ecbbfdf76..72a67d0c5f1e 100644 --- a/drivers/regulator/max77693-regulator.c +++ b/drivers/regulator/max77693-regulator.c @@ -281,6 +281,7 @@ MODULE_DEVICE_TABLE(platform, max77693_pmic_id); static struct platform_driver max77693_pmic_driver = { .driver = { .name = "max77693-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = max77693_pmic_probe, .id_table = max77693_pmic_id, diff --git a/drivers/regulator/max77802-regulator.c b/drivers/regulator/max77802-regulator.c index befe5f319819..69eb6abd2551 100644 --- a/drivers/regulator/max77802-regulator.c +++ b/drivers/regulator/max77802-regulator.c @@ -554,6 +554,7 @@ MODULE_DEVICE_TABLE(platform, max77802_pmic_id); static struct platform_driver max77802_pmic_driver = { .driver = { .name = "max77802-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = max77802_pmic_probe, .id_table = max77802_pmic_id, diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c index aed5443d88e1..a517fb4e3669 100644 --- a/drivers/regulator/max8649.c +++ b/drivers/regulator/max8649.c @@ -249,6 +249,7 @@ static struct i2c_driver max8649_driver = { .probe_new = max8649_regulator_probe, .driver = { .name = "max8649", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .id_table = max8649_id, }; diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c index 711623be8eb5..d6b89f07ae9e 100644 --- a/drivers/regulator/max8660.c +++ b/drivers/regulator/max8660.c @@ -506,6 +506,7 @@ static struct i2c_driver max8660_driver = { .probe_new = max8660_probe, .driver = { .name = "max8660", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .id_table = max8660_id, }; diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index 1a6fd68f3fb1..e59aa7a3ee54 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c @@ -372,6 +372,7 @@ static int max8907_regulator_probe(struct platform_device *pdev) static struct platform_driver max8907_regulator_driver = { .driver = { .name = "max8907-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = max8907_regulator_probe, }; diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c index d953b6b0db77..c1532db0a4ee 100644 --- a/drivers/regulator/max8925-regulator.c +++ b/drivers/regulator/max8925-regulator.c @@ -263,6 +263,7 @@ static int max8925_regulator_probe(struct platform_device *pdev) static struct platform_driver max8925_regulator_driver = { .driver = { .name = "max8925-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = max8925_regulator_probe, }; diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index 360a33ecc093..8ad8fe7fd263 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c @@ -316,6 +316,7 @@ static struct i2c_driver max8952_pmic_driver = { .probe_new = max8952_pmic_probe, .driver = { .name = "max8952", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(max8952_dt_match), }, .id_table = max8952_ids, diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c index 7e00a45db26a..e6dc3d40da3d 100644 --- a/drivers/regulator/max8973-regulator.c +++ b/drivers/regulator/max8973-regulator.c @@ -804,6 +804,7 @@ MODULE_DEVICE_TABLE(i2c, max8973_id); static struct i2c_driver max8973_i2c_driver = { .driver = { .name = "max8973", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_max8973_match_tbl, }, .probe_new = max8973_probe, diff --git a/drivers/regulator/max8997-regulator.c b/drivers/regulator/max8997-regulator.c index 829c3d9542af..0b38eaa73597 100644 --- a/drivers/regulator/max8997-regulator.c +++ b/drivers/regulator/max8997-regulator.c @@ -1197,6 +1197,7 @@ MODULE_DEVICE_TABLE(platform, max8997_pmic_id); static struct platform_driver max8997_pmic_driver = { .driver = { .name = "max8997-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = max8997_pmic_probe, .id_table = max8997_pmic_id, diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c index 7f254066237d..fadb4717384a 100644 --- a/drivers/regulator/max8998.c +++ b/drivers/regulator/max8998.c @@ -803,6 +803,7 @@ MODULE_DEVICE_TABLE(platform, max8998_pmic_id); static struct platform_driver max8998_pmic_driver = { .driver = { .name = "max8998-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = max8998_pmic_probe, .id_table = max8998_pmic_id, diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c index ab558b26cd7c..fb3aa1cec1f2 100644 --- a/drivers/regulator/mc13783-regulator.c +++ b/drivers/regulator/mc13783-regulator.c @@ -455,6 +455,7 @@ static int mc13783_regulator_probe(struct platform_device *pdev) static struct platform_driver mc13783_regulator_driver = { .driver = { .name = "mc13783-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = mc13783_regulator_probe, }; diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c index 5221f7a9df91..b29cf6ba6f12 100644 --- a/drivers/regulator/mc13892-regulator.c +++ b/drivers/regulator/mc13892-regulator.c @@ -629,6 +629,7 @@ err_unlock: static struct platform_driver mc13892_regulator_driver = { .driver = { .name = "mc13892-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = mc13892_regulator_probe, }; diff --git a/drivers/regulator/mt6311-regulator.c b/drivers/regulator/mt6311-regulator.c index 69e6af3cd505..a9f0c9f725d4 100644 --- a/drivers/regulator/mt6311-regulator.c +++ b/drivers/regulator/mt6311-regulator.c @@ -151,6 +151,7 @@ MODULE_DEVICE_TABLE(of, mt6311_dt_ids); static struct i2c_driver mt6311_regulator_driver = { .driver = { .name = "mt6311", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(mt6311_dt_ids), }, .probe_new = mt6311_i2c_probe, diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c index ff9016170db3..b43da848a06e 100644 --- a/drivers/regulator/mt6323-regulator.c +++ b/drivers/regulator/mt6323-regulator.c @@ -409,6 +409,7 @@ MODULE_DEVICE_TABLE(platform, mt6323_platform_ids); static struct platform_driver mt6323_regulator_driver = { .driver = { .name = "mt6323-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = mt6323_regulator_probe, .id_table = mt6323_platform_ids, diff --git a/drivers/regulator/mt6380-regulator.c b/drivers/regulator/mt6380-regulator.c index 43234296df36..83e50df7f7c3 100644 --- a/drivers/regulator/mt6380-regulator.c +++ b/drivers/regulator/mt6380-regulator.c @@ -328,6 +328,7 @@ MODULE_DEVICE_TABLE(of, mt6380_of_match); static struct platform_driver mt6380_regulator_driver = { .driver = { .name = "mt6380-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(mt6380_of_match), }, .probe = mt6380_regulator_probe, diff --git a/drivers/regulator/mt6397-regulator.c b/drivers/regulator/mt6397-regulator.c index 526acc8fbe80..92a2d92f84f9 100644 --- a/drivers/regulator/mt6397-regulator.c +++ b/drivers/regulator/mt6397-regulator.c @@ -406,6 +406,7 @@ MODULE_DEVICE_TABLE(of, mt6397_of_match); static struct platform_driver mt6397_regulator_driver = { .driver = { .name = "mt6397-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(mt6397_of_match), }, .probe = mt6397_regulator_probe, diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 337dd614695e..076966366b60 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -1666,6 +1666,7 @@ static int palmas_regulators_probe(struct platform_device *pdev) static struct platform_driver palmas_driver = { .driver = { .name = "palmas-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_palmas_match_tbl, }, .probe = palmas_regulators_probe, diff --git a/drivers/regulator/pbias-regulator.c b/drivers/regulator/pbias-regulator.c index 4eccf12f39de..0c9873e9abdc 100644 --- a/drivers/regulator/pbias-regulator.c +++ b/drivers/regulator/pbias-regulator.c @@ -231,6 +231,7 @@ static struct platform_driver pbias_regulator_driver = { .probe = pbias_regulator_probe, .driver = { .name = "pbias-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(pbias_of_match), }, }; diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c index 0345f38f6f78..319a88412154 100644 --- a/drivers/regulator/pcap-regulator.c +++ b/drivers/regulator/pcap-regulator.c @@ -251,6 +251,7 @@ static int pcap_regulator_probe(struct platform_device *pdev) static struct platform_driver pcap_regulator_driver = { .driver = { .name = "pcap-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = pcap_regulator_probe, }; diff --git a/drivers/regulator/pcf50633-regulator.c b/drivers/regulator/pcf50633-regulator.c index f40e3bb303d6..9f08a62c800e 100644 --- a/drivers/regulator/pcf50633-regulator.c +++ b/drivers/regulator/pcf50633-regulator.c @@ -101,6 +101,7 @@ static int pcf50633_regulator_probe(struct platform_device *pdev) static struct platform_driver pcf50633_regulator_driver = { .driver = { .name = "pcf50633-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = pcf50633_regulator_probe, }; diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index 9ab604289b5c..a9fcf6a41494 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -845,6 +845,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client) static struct i2c_driver pfuze_driver = { .driver = { .name = "pfuze100-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = pfuze_dt_ids, }, .probe_new = pfuze100_regulator_probe, diff --git a/drivers/regulator/pv88060-regulator.c b/drivers/regulator/pv88060-regulator.c index 48238846f45c..f170e0dd1819 100644 --- a/drivers/regulator/pv88060-regulator.c +++ b/drivers/regulator/pv88060-regulator.c @@ -376,6 +376,7 @@ MODULE_DEVICE_TABLE(of, pv88060_dt_ids); static struct i2c_driver pv88060_regulator_driver = { .driver = { .name = "pv88060", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(pv88060_dt_ids), }, .probe_new = pv88060_i2c_probe, diff --git a/drivers/regulator/pv88080-regulator.c b/drivers/regulator/pv88080-regulator.c index 15a67c05f519..133b89d5215c 100644 --- a/drivers/regulator/pv88080-regulator.c +++ b/drivers/regulator/pv88080-regulator.c @@ -557,6 +557,7 @@ MODULE_DEVICE_TABLE(i2c, pv88080_i2c_id); static struct i2c_driver pv88080_regulator_driver = { .driver = { .name = "pv88080", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(pv88080_dt_ids), }, .probe_new = pv88080_i2c_probe, diff --git a/drivers/regulator/pv88090-regulator.c b/drivers/regulator/pv88090-regulator.c index a80176bdf8ec..1bc33bc10992 100644 --- a/drivers/regulator/pv88090-regulator.c +++ b/drivers/regulator/pv88090-regulator.c @@ -397,6 +397,7 @@ MODULE_DEVICE_TABLE(of, pv88090_dt_ids); static struct i2c_driver pv88090_regulator_driver = { .driver = { .name = "pv88090", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(pv88090_dt_ids), }, .probe_new = pv88090_i2c_probe, diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index 214ea866742d..b64d99695b84 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c @@ -393,6 +393,7 @@ MODULE_DEVICE_TABLE(of, pwm_of_match); static struct platform_driver pwm_regulator_driver = { .driver = { .name = "pwm-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(pwm_of_match), }, .probe = pwm_regulator_probe, diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c index 3c41b71a1f52..f95bc9208c13 100644 --- a/drivers/regulator/qcom_rpm-regulator.c +++ b/drivers/regulator/qcom_rpm-regulator.c @@ -991,6 +991,7 @@ static struct platform_driver rpm_reg_driver = { .probe = rpm_reg_probe, .driver = { .name = "qcom_rpm_reg", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(rpm_of_match), }, }; diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c index 9f2b58458841..6f722b2d682e 100644 --- a/drivers/regulator/qcom_smd-regulator.c +++ b/drivers/regulator/qcom_smd-regulator.c @@ -1440,6 +1440,7 @@ static struct platform_driver rpm_reg_driver = { .probe = rpm_reg_probe, .driver = { .name = "qcom_rpm_smd_regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = rpm_of_match, }, }; diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 3e312729741e..c95f6e9c7ab5 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -2484,6 +2484,7 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev) static struct platform_driver qcom_spmi_regulator_driver = { .driver = { .name = "qcom-spmi-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = qcom_spmi_regulator_match, }, .probe = qcom_spmi_regulator_probe, diff --git a/drivers/regulator/rc5t583-regulator.c b/drivers/regulator/rc5t583-regulator.c index 62641b08b88a..a5afca73715d 100644 --- a/drivers/regulator/rc5t583-regulator.c +++ b/drivers/regulator/rc5t583-regulator.c @@ -149,6 +149,7 @@ skip_ext_pwr_config: static struct platform_driver rc5t583_regulator_driver = { .driver = { .name = "rc5t583-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = rc5t583_regulator_probe, }; diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index fa9fc1aa1ae3..3637e81654a8 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -1354,7 +1354,8 @@ static int rk808_regulator_probe(struct platform_device *pdev) static struct platform_driver rk808_regulator_driver = { .probe = rk808_regulator_probe, .driver = { - .name = "rk808-regulator" + .name = "rk808-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/rn5t618-regulator.c b/drivers/regulator/rn5t618-regulator.c index 5c12d57be040..91808e0735b3 100644 --- a/drivers/regulator/rn5t618-regulator.c +++ b/drivers/regulator/rn5t618-regulator.c @@ -143,6 +143,7 @@ static struct platform_driver rn5t618_regulator_driver = { .probe = rn5t618_regulator_probe, .driver = { .name = "rn5t618-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/rt5033-regulator.c b/drivers/regulator/rt5033-regulator.c index da4cf5a6acc2..2ba74f205543 100644 --- a/drivers/regulator/rt5033-regulator.c +++ b/drivers/regulator/rt5033-regulator.c @@ -124,6 +124,7 @@ MODULE_DEVICE_TABLE(platform, rt5033_regulator_id); static struct platform_driver rt5033_regulator_driver = { .driver = { .name = "rt5033-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = rt5033_regulator_probe, .id_table = rt5033_regulator_id, diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c index 28b424fe7bea..b147ff6a16b1 100644 --- a/drivers/regulator/s2mpa01.c +++ b/drivers/regulator/s2mpa01.c @@ -376,6 +376,7 @@ MODULE_DEVICE_TABLE(platform, s2mpa01_pmic_id); static struct platform_driver s2mpa01_pmic_driver = { .driver = { .name = "s2mpa01-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = s2mpa01_pmic_probe, .id_table = s2mpa01_pmic_id, diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index ebc67e3ddd4f..570b61420f3a 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -1238,6 +1238,7 @@ MODULE_DEVICE_TABLE(platform, s2mps11_pmic_id); static struct platform_driver s2mps11_pmic_driver = { .driver = { .name = "s2mps11-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = s2mps11_pmic_probe, .id_table = s2mps11_pmic_id, diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c index 3122ca7de8f5..bfc0e143bf40 100644 --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c @@ -999,6 +999,7 @@ MODULE_DEVICE_TABLE(platform, s5m8767_pmic_id); static struct platform_driver s5m8767_pmic_driver = { .driver = { .name = "s5m8767-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = s5m8767_pmic_probe, .id_table = s5m8767_pmic_id, diff --git a/drivers/regulator/sky81452-regulator.c b/drivers/regulator/sky81452-regulator.c index 37658affe072..359e83e37d2d 100644 --- a/drivers/regulator/sky81452-regulator.c +++ b/drivers/regulator/sky81452-regulator.c @@ -79,6 +79,7 @@ static int sky81452_reg_probe(struct platform_device *pdev) static struct platform_driver sky81452_reg_driver = { .driver = { .name = "sky81452-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = sky81452_reg_probe, }; diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c index 7a454b7b6eab..f5ccc7dd309a 100644 --- a/drivers/regulator/stm32-vrefbuf.c +++ b/drivers/regulator/stm32-vrefbuf.c @@ -285,6 +285,7 @@ static struct platform_driver stm32_vrefbuf_driver = { .remove = stm32_vrefbuf_remove, .driver = { .name = "stm32-vrefbuf", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(stm32_vrefbuf_of_match), .pm = &stm32_vrefbuf_pm_ops, }, diff --git a/drivers/regulator/stw481x-vmmc.c b/drivers/regulator/stw481x-vmmc.c index 127ab43add49..3958d906bd77 100644 --- a/drivers/regulator/stw481x-vmmc.c +++ b/drivers/regulator/stw481x-vmmc.c @@ -95,6 +95,7 @@ static const struct of_device_id stw481x_vmmc_match[] = { static struct platform_driver stw481x_vmmc_regulator_driver = { .driver = { .name = "stw481x-vmmc-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = stw481x_vmmc_match, }, .probe = stw481x_vmmc_regulator_probe, diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c index 115345e9fded..86d2d80b4b41 100644 --- a/drivers/regulator/ti-abb-regulator.c +++ b/drivers/regulator/ti-abb-regulator.c @@ -865,6 +865,7 @@ static struct platform_driver ti_abb_driver = { .probe = ti_abb_probe, .driver = { .name = "ti_abb", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(ti_abb_of_match), }, }; diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c index 152c5ad6709c..9bd4e72914ed 100644 --- a/drivers/regulator/tps51632-regulator.c +++ b/drivers/regulator/tps51632-regulator.c @@ -351,6 +351,7 @@ MODULE_DEVICE_TABLE(i2c, tps51632_id); static struct i2c_driver tps51632_i2c_driver = { .driver = { .name = "tps51632", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(tps51632_of_match), }, .probe_new = tps51632_probe, diff --git a/drivers/regulator/tps6105x-regulator.c b/drivers/regulator/tps6105x-regulator.c index a6469fe05635..a09c6ae6a0ce 100644 --- a/drivers/regulator/tps6105x-regulator.c +++ b/drivers/regulator/tps6105x-regulator.c @@ -93,6 +93,7 @@ static int tps6105x_regulator_probe(struct platform_device *pdev) static struct platform_driver tps6105x_regulator_driver = { .driver = { .name = "tps6105x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps6105x_regulator_probe, }; diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c index a7019e869f50..65cc08d1a67d 100644 --- a/drivers/regulator/tps62360-regulator.c +++ b/drivers/regulator/tps62360-regulator.c @@ -488,6 +488,7 @@ MODULE_DEVICE_TABLE(i2c, tps62360_id); static struct i2c_driver tps62360_i2c_driver = { .driver = { .name = "tps62360", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(tps62360_of_match), }, .probe_new = tps62360_probe, diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c index 680a57ff0837..d87cac63f346 100644 --- a/drivers/regulator/tps65023-regulator.c +++ b/drivers/regulator/tps65023-regulator.c @@ -334,6 +334,7 @@ MODULE_DEVICE_TABLE(i2c, tps_65023_id); static struct i2c_driver tps_65023_i2c_driver = { .driver = { .name = "tps65023", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(tps65023_of_match), }, .probe_new = tps_65023_probe, diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c index b83816ee6867..6655d9c31187 100644 --- a/drivers/regulator/tps6507x-regulator.c +++ b/drivers/regulator/tps6507x-regulator.c @@ -438,6 +438,7 @@ static int tps6507x_pmic_probe(struct platform_device *pdev) static struct platform_driver tps6507x_pmic_driver = { .driver = { .name = "tps6507x-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps6507x_pmic_probe, }; diff --git a/drivers/regulator/tps65086-regulator.c b/drivers/regulator/tps65086-regulator.c index f1bc54c825dd..663789198ba5 100644 --- a/drivers/regulator/tps65086-regulator.c +++ b/drivers/regulator/tps65086-regulator.c @@ -235,6 +235,7 @@ MODULE_DEVICE_TABLE(platform, tps65086_regulator_id_table); static struct platform_driver tps65086_regulator_driver = { .driver = { .name = "tps65086-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps65086_regulator_probe, .id_table = tps65086_regulator_id_table, diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c index 1d2e04f452d4..8f916ee366e5 100644 --- a/drivers/regulator/tps65090-regulator.c +++ b/drivers/regulator/tps65090-regulator.c @@ -511,6 +511,7 @@ static int tps65090_regulator_probe(struct platform_device *pdev) static struct platform_driver tps65090_regulator_driver = { .driver = { .name = "tps65090-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps65090_regulator_probe, }; diff --git a/drivers/regulator/tps65132-regulator.c b/drivers/regulator/tps65132-regulator.c index 0edc83089ba2..d4b02ee791d1 100644 --- a/drivers/regulator/tps65132-regulator.c +++ b/drivers/regulator/tps65132-regulator.c @@ -270,6 +270,7 @@ MODULE_DEVICE_TABLE(i2c, tps65132_id); static struct i2c_driver tps65132_i2c_driver = { .driver = { .name = "tps65132", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe_new = tps65132_probe, .id_table = tps65132_id, diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c index 6bb5b02e19e2..b167ba22fe16 100644 --- a/drivers/regulator/tps65217-regulator.c +++ b/drivers/regulator/tps65217-regulator.c @@ -258,6 +258,7 @@ static int tps65217_regulator_probe(struct platform_device *pdev) static struct platform_driver tps65217_regulator_driver = { .driver = { .name = "tps65217-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps65217_regulator_probe, }; diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c index 48809c3b3abc..13985883e5f0 100644 --- a/drivers/regulator/tps65218-regulator.c +++ b/drivers/regulator/tps65218-regulator.c @@ -349,6 +349,7 @@ MODULE_DEVICE_TABLE(platform, tps65218_regulator_id_table); static struct platform_driver tps65218_regulator_driver = { .driver = { .name = "tps65218-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps65218_regulator_probe, .id_table = tps65218_regulator_id_table, diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c index 740aeccdfb1f..3fee7e38c68b 100644 --- a/drivers/regulator/tps6524x-regulator.c +++ b/drivers/regulator/tps6524x-regulator.c @@ -628,6 +628,7 @@ static struct spi_driver pmic_driver = { .probe = pmic_probe, .driver = { .name = "tps6524x", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index 18bf4b885b08..1ab5767590f3 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -520,6 +520,7 @@ static int tps6586x_regulator_probe(struct platform_device *pdev) static struct platform_driver tps6586x_regulator_driver = { .driver = { .name = "tps6586x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps6586x_regulator_probe, }; diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 06cbe60c990f..2a0965ba1570 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c @@ -1255,6 +1255,7 @@ static void tps65910_shutdown(struct platform_device *pdev) static struct platform_driver tps65910_driver = { .driver = { .name = "tps65910-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps65910_probe, .shutdown = tps65910_shutdown, diff --git a/drivers/regulator/tps65912-regulator.c b/drivers/regulator/tps65912-regulator.c index 76f90202ae09..7ff7877a2e09 100644 --- a/drivers/regulator/tps65912-regulator.c +++ b/drivers/regulator/tps65912-regulator.c @@ -150,6 +150,7 @@ MODULE_DEVICE_TABLE(platform, tps65912_regulator_id_table); static struct platform_driver tps65912_regulator_driver = { .driver = { .name = "tps65912-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps65912_regulator_probe, .id_table = tps65912_regulator_id_table, diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index e2a20d512152..3e724f5345de 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -656,6 +656,7 @@ static struct platform_driver twlreg_driver = { */ .driver = { .name = "twl4030_reg", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(twl_of_match), }, }; diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c index d94e61aa1b84..f9c695f9bde8 100644 --- a/drivers/regulator/twl6030-regulator.c +++ b/drivers/regulator/twl6030-regulator.c @@ -765,6 +765,7 @@ static struct platform_driver twlreg_driver = { */ .driver = { .name = "twl6030_reg", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(twl_of_match), }, }; diff --git a/drivers/regulator/userspace-consumer.c b/drivers/regulator/userspace-consumer.c index 402c8037cf39..97f075ed68c9 100644 --- a/drivers/regulator/userspace-consumer.c +++ b/drivers/regulator/userspace-consumer.c @@ -216,6 +216,7 @@ static struct platform_driver regulator_userspace_consumer_driver = { .remove = regulator_userspace_consumer_remove, .driver = { .name = "reg-userspace-consumer", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = regulator_userspace_consumer_of_match, }, }; diff --git a/drivers/regulator/vctrl-regulator.c b/drivers/regulator/vctrl-regulator.c index aac7be3b33f7..85dca90233f6 100644 --- a/drivers/regulator/vctrl-regulator.c +++ b/drivers/regulator/vctrl-regulator.c @@ -543,6 +543,7 @@ static struct platform_driver vctrl_driver = { .probe = vctrl_probe, .driver = { .name = "vctrl-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(vctrl_of_match), }, }; diff --git a/drivers/regulator/vexpress-regulator.c b/drivers/regulator/vexpress-regulator.c index 5d39663efcaa..b545dbc70a4d 100644 --- a/drivers/regulator/vexpress-regulator.c +++ b/drivers/regulator/vexpress-regulator.c @@ -88,6 +88,7 @@ static struct platform_driver vexpress_regulator_driver = { .probe = vexpress_regulator_probe, .driver = { .name = DRVNAME, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = vexpress_regulator_of_match, }, }; diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c index 5d32628a5011..d5a160efdae6 100644 --- a/drivers/regulator/virtual.c +++ b/drivers/regulator/virtual.c @@ -362,6 +362,7 @@ static struct platform_driver regulator_virtual_consumer_driver = { .remove = regulator_virtual_remove, .driver = { .name = "reg-virt-consumer", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(regulator_virtual_consumer_of_match), }, }; diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index e43ed4d93f71..834d7c181971 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c @@ -505,6 +505,7 @@ static struct platform_driver wm831x_buckv_driver = { .probe = wm831x_buckv_probe, .driver = { .name = "wm831x-buckv", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; @@ -632,6 +633,7 @@ static struct platform_driver wm831x_buckp_driver = { .probe = wm831x_buckp_probe, .driver = { .name = "wm831x-buckp", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; @@ -747,6 +749,7 @@ static struct platform_driver wm831x_boostp_driver = { .probe = wm831x_boostp_probe, .driver = { .name = "wm831x-boostp", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; @@ -822,6 +825,7 @@ static struct platform_driver wm831x_epe_driver = { .probe = wm831x_epe_probe, .driver = { .name = "wm831x-epe", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c index eade3ae3e333..ed5e191e8896 100644 --- a/drivers/regulator/wm831x-isink.c +++ b/drivers/regulator/wm831x-isink.c @@ -189,6 +189,7 @@ static struct platform_driver wm831x_isink_driver = { .probe = wm831x_isink_probe, .driver = { .name = "wm831x-isink", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c index e091b189ecc0..76b89b1cd519 100644 --- a/drivers/regulator/wm831x-ldo.c +++ b/drivers/regulator/wm831x-ldo.c @@ -303,6 +303,7 @@ static struct platform_driver wm831x_gp_ldo_driver = { .probe = wm831x_gp_ldo_probe, .driver = { .name = "wm831x-ldo", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; @@ -512,6 +513,7 @@ static struct platform_driver wm831x_aldo_driver = { .probe = wm831x_aldo_probe, .driver = { .name = "wm831x-aldo", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; @@ -645,6 +647,7 @@ static struct platform_driver wm831x_alive_ldo_driver = { .probe = wm831x_alive_ldo_probe, .driver = { .name = "wm831x-alive-ldo", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index b1d5aac8917d..1445bafcab40 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c @@ -1309,6 +1309,7 @@ static struct platform_driver wm8350_regulator_driver = { .remove = wm8350_regulator_remove, .driver = { .name = "wm8350-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c index e9fd13707721..c4a229f66dec 100644 --- a/drivers/regulator/wm8400-regulator.c +++ b/drivers/regulator/wm8400-regulator.c @@ -223,6 +223,7 @@ static int wm8400_regulator_probe(struct platform_device *pdev) static struct platform_driver wm8400_regulator_driver = { .driver = { .name = "wm8400-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = wm8400_regulator_probe, }; diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c index 40befdd9dfa9..8921051a00e9 100644 --- a/drivers/regulator/wm8994-regulator.c +++ b/drivers/regulator/wm8994-regulator.c @@ -227,6 +227,7 @@ static struct platform_driver wm8994_ldo_driver = { .probe = wm8994_ldo_probe, .driver = { .name = "wm8994-ldo", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; -- cgit v1.2.3 From ed6962cc3e05ca77f526590f62587678149d5e58 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Thu, 16 Mar 2023 12:54:39 -0700 Subject: regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.14 and 4.19 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 4.14 but did exist in Linux 4.19. NOTE: from a quick "git cherry-pick" it looks as if "bd718x7-regulator.c" didn't actually exist in v4.19. In 4.19 it was named "bd71837-regulator.c". See commit 2ece646c90c5 ("regulator: bd718xx: rename bd71837 to 718xx") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.2.Iad1f25517bb46a6c7fca8d8c80ed4fc258a79ed9@changeid Signed-off-by: Mark Brown --- drivers/regulator/88pg86x.c | 1 + drivers/regulator/bd718x7-regulator.c | 1 + drivers/regulator/qcom-rpmh-regulator.c | 1 + drivers/regulator/sc2731-regulator.c | 1 + drivers/regulator/sy8106a-regulator.c | 1 + drivers/regulator/uniphier-regulator.c | 1 + 6 files changed, 6 insertions(+) diff --git a/drivers/regulator/88pg86x.c b/drivers/regulator/88pg86x.c index e91d5885c5ef..74275b681f46 100644 --- a/drivers/regulator/88pg86x.c +++ b/drivers/regulator/88pg86x.c @@ -101,6 +101,7 @@ MODULE_DEVICE_TABLE(i2c, pg86x_i2c_id); static struct i2c_driver pg86x_regulator_driver = { .driver = { .name = "88pg86x", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(pg86x_dt_ids), }, .probe_new = pg86x_i2c_probe, diff --git a/drivers/regulator/bd718x7-regulator.c b/drivers/regulator/bd718x7-regulator.c index 894fab0d53d0..b0b9938c20a1 100644 --- a/drivers/regulator/bd718x7-regulator.c +++ b/drivers/regulator/bd718x7-regulator.c @@ -1829,6 +1829,7 @@ MODULE_DEVICE_TABLE(platform, bd718x7_pmic_id); static struct platform_driver bd718xx_regulator = { .driver = { .name = "bd718xx-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = bd718xx_probe, .id_table = bd718x7_pmic_id, diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index ae6021390143..4826d60e5d95 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -1462,6 +1462,7 @@ MODULE_DEVICE_TABLE(of, rpmh_regulator_match_table); static struct platform_driver rpmh_regulator_driver = { .driver = { .name = "qcom-rpmh-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(rpmh_regulator_match_table), }, .probe = rpmh_regulator_probe, diff --git a/drivers/regulator/sc2731-regulator.c b/drivers/regulator/sc2731-regulator.c index 71e5ceb679f4..5447e1a47d15 100644 --- a/drivers/regulator/sc2731-regulator.c +++ b/drivers/regulator/sc2731-regulator.c @@ -245,6 +245,7 @@ static int sc2731_regulator_probe(struct platform_device *pdev) static struct platform_driver sc2731_regulator_driver = { .driver = { .name = "sc27xx-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = sc2731_regulator_probe, }; diff --git a/drivers/regulator/sy8106a-regulator.c b/drivers/regulator/sy8106a-regulator.c index b10bd99768a3..e3c753986309 100644 --- a/drivers/regulator/sy8106a-regulator.c +++ b/drivers/regulator/sy8106a-regulator.c @@ -138,6 +138,7 @@ MODULE_DEVICE_TABLE(i2c, sy8106a_i2c_id); static struct i2c_driver sy8106a_regulator_driver = { .driver = { .name = "sy8106a", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = sy8106a_i2c_of_match, }, .probe_new = sy8106a_i2c_probe, diff --git a/drivers/regulator/uniphier-regulator.c b/drivers/regulator/uniphier-regulator.c index 39a68b01fc38..7e2785e10dc6 100644 --- a/drivers/regulator/uniphier-regulator.c +++ b/drivers/regulator/uniphier-regulator.c @@ -212,6 +212,7 @@ static struct platform_driver uniphier_regulator_driver = { .remove = uniphier_regulator_remove, .driver = { .name = "uniphier-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = uniphier_regulator_match, }, }; -- cgit v1.2.3 From d3b81d97d55871cb11412caedded440f1fddc4e9 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Thu, 16 Mar 2023 12:54:40 -0700 Subject: regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.19 and 5.4 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 4.19 but did exist in Linux 5.4. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.3.I45bf925ca9537da5f647e2acb0ad207c0c98af81@changeid Signed-off-by: Mark Brown --- drivers/regulator/arizona-ldo1.c | 1 + drivers/regulator/arizona-micsupp.c | 1 + drivers/regulator/lochnagar-regulator.c | 1 + drivers/regulator/max77650-regulator.c | 1 + drivers/regulator/mcp16502.c | 1 + drivers/regulator/mt6358-regulator.c | 1 + drivers/regulator/slg51000-regulator.c | 1 + drivers/regulator/stm32-booster.c | 1 + drivers/regulator/stm32-pwr.c | 1 + drivers/regulator/stpmic1_regulator.c | 1 + drivers/regulator/sy8824x.c | 1 + 11 files changed, 11 insertions(+) diff --git a/drivers/regulator/arizona-ldo1.c b/drivers/regulator/arizona-ldo1.c index cabc9e6374a8..a53d8441702a 100644 --- a/drivers/regulator/arizona-ldo1.c +++ b/drivers/regulator/arizona-ldo1.c @@ -389,6 +389,7 @@ static struct platform_driver madera_ldo1_driver = { .remove = arizona_ldo1_remove, .driver = { .name = "madera-ldo1", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/arizona-micsupp.c b/drivers/regulator/arizona-micsupp.c index a9fdb342efcf..ffd8416487eb 100644 --- a/drivers/regulator/arizona-micsupp.c +++ b/drivers/regulator/arizona-micsupp.c @@ -373,6 +373,7 @@ static struct platform_driver madera_micsupp_driver = { .probe = madera_micsupp_probe, .driver = { .name = "madera-micsupp", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/lochnagar-regulator.c b/drivers/regulator/lochnagar-regulator.c index cb71fa5f43c3..11b358efbc92 100644 --- a/drivers/regulator/lochnagar-regulator.c +++ b/drivers/regulator/lochnagar-regulator.c @@ -272,6 +272,7 @@ static int lochnagar_regulator_probe(struct platform_device *pdev) static struct platform_driver lochnagar_regulator_driver = { .driver = { .name = "lochnagar-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(lochnagar_of_match), }, diff --git a/drivers/regulator/max77650-regulator.c b/drivers/regulator/max77650-regulator.c index ca08f94a368d..f6539b945037 100644 --- a/drivers/regulator/max77650-regulator.c +++ b/drivers/regulator/max77650-regulator.c @@ -395,6 +395,7 @@ MODULE_DEVICE_TABLE(of, max77650_regulator_of_match); static struct platform_driver max77650_regulator_driver = { .driver = { .name = "max77650-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = max77650_regulator_of_match, }, .probe = max77650_regulator_probe, diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c index abee1b09008d..3a6d79556942 100644 --- a/drivers/regulator/mcp16502.c +++ b/drivers/regulator/mcp16502.c @@ -587,6 +587,7 @@ static struct i2c_driver mcp16502_drv = { .probe_new = mcp16502_probe, .driver = { .name = "mcp16502-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(mcp16502_ids), #ifdef CONFIG_PM .pm = &mcp16502_pm_ops, diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt6358-regulator.c index 8a5ce990f1bf..c9e16bd092f6 100644 --- a/drivers/regulator/mt6358-regulator.c +++ b/drivers/regulator/mt6358-regulator.c @@ -733,6 +733,7 @@ MODULE_DEVICE_TABLE(platform, mt6358_platform_ids); static struct platform_driver mt6358_regulator_driver = { .driver = { .name = "mt6358-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = mt6358_regulator_probe, .id_table = mt6358_platform_ids, diff --git a/drivers/regulator/slg51000-regulator.c b/drivers/regulator/slg51000-regulator.c index 1b2eee95ad3f..559ae031010f 100644 --- a/drivers/regulator/slg51000-regulator.c +++ b/drivers/regulator/slg51000-regulator.c @@ -505,6 +505,7 @@ MODULE_DEVICE_TABLE(i2c, slg51000_i2c_id); static struct i2c_driver slg51000_regulator_driver = { .driver = { .name = "slg51000-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe_new = slg51000_i2c_probe, .id_table = slg51000_i2c_id, diff --git a/drivers/regulator/stm32-booster.c b/drivers/regulator/stm32-booster.c index 3136ea8a35d5..b64dc5a497fa 100644 --- a/drivers/regulator/stm32-booster.c +++ b/drivers/regulator/stm32-booster.c @@ -117,6 +117,7 @@ static struct platform_driver stm32_booster_driver = { .probe = stm32_booster_probe, .driver = { .name = "stm32-booster", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(stm32_booster_of_match), }, }; diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c index 2a42acb7c24e..2803a199826f 100644 --- a/drivers/regulator/stm32-pwr.c +++ b/drivers/regulator/stm32-pwr.c @@ -176,6 +176,7 @@ static struct platform_driver stm32_pwr_driver = { .probe = stm32_pwr_regulator_probe, .driver = { .name = "stm32-pwr-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(stm32_pwr_of_match), }, }; diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c index d04759b56a95..79d1a3eb18d4 100644 --- a/drivers/regulator/stpmic1_regulator.c +++ b/drivers/regulator/stpmic1_regulator.c @@ -638,6 +638,7 @@ MODULE_DEVICE_TABLE(of, of_pmic_regulator_match); static struct platform_driver stpmic1_regulator_driver = { .driver = { .name = "stpmic1-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(of_pmic_regulator_match), }, .probe = stpmic1_regulator_probe, diff --git a/drivers/regulator/sy8824x.c b/drivers/regulator/sy8824x.c index 2a81519bdf67..c327ad69f676 100644 --- a/drivers/regulator/sy8824x.c +++ b/drivers/regulator/sy8824x.c @@ -233,6 +233,7 @@ MODULE_DEVICE_TABLE(i2c, sy8824_id); static struct i2c_driver sy8824_regulator_driver = { .driver = { .name = "sy8824-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = sy8824_dt_ids, }, .probe_new = sy8824_i2c_probe, -- cgit v1.2.3 From 67dc71c61b64be85ce33d3332ca5511f9b1faef7 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Thu, 16 Mar 2023 12:54:41 -0700 Subject: regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.4 and 5.10 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 5.4 but did exist in Linux 5.10. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.4.I01f21c98901641a009890590ddc1354c0f294e5e@changeid Signed-off-by: Mark Brown --- drivers/regulator/bd71828-regulator.c | 3 ++- drivers/regulator/bd9576-regulator.c | 1 + drivers/regulator/cros-ec-regulator.c | 1 + drivers/regulator/fan53880.c | 1 + drivers/regulator/max77826-regulator.c | 1 + drivers/regulator/mp5416.c | 1 + drivers/regulator/mp8859.c | 1 + drivers/regulator/mp886x.c | 1 + drivers/regulator/mpq7920.c | 1 + drivers/regulator/mt6360-regulator.c | 1 + drivers/regulator/pca9450-regulator.c | 1 + drivers/regulator/qcom-labibb-regulator.c | 1 + drivers/regulator/qcom_usb_vbus-regulator.c | 1 + drivers/regulator/rpi-panel-attiny-regulator.c | 1 + drivers/regulator/rt4801-regulator.c | 1 + drivers/regulator/rtmv20-regulator.c | 1 + drivers/regulator/sy8827n.c | 1 + drivers/regulator/vqmmc-ipq4019-regulator.c | 1 + 18 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/bd71828-regulator.c b/drivers/regulator/bd71828-regulator.c index ad728f4f2241..f3205dc9d4fc 100644 --- a/drivers/regulator/bd71828-regulator.c +++ b/drivers/regulator/bd71828-regulator.c @@ -771,7 +771,8 @@ static int bd71828_probe(struct platform_device *pdev) static struct platform_driver bd71828_regulator = { .driver = { - .name = "bd71828-pmic" + .name = "bd71828-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = bd71828_probe, }; diff --git a/drivers/regulator/bd9576-regulator.c b/drivers/regulator/bd9576-regulator.c index 02c70768652b..d4ca7b3f4036 100644 --- a/drivers/regulator/bd9576-regulator.c +++ b/drivers/regulator/bd9576-regulator.c @@ -1126,6 +1126,7 @@ MODULE_DEVICE_TABLE(platform, bd957x_pmic_id); static struct platform_driver bd957x_regulator = { .driver = { .name = "bd957x-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = bd957x_probe, .id_table = bd957x_pmic_id, diff --git a/drivers/regulator/cros-ec-regulator.c b/drivers/regulator/cros-ec-regulator.c index 1591636f86c3..fb9643ed7a49 100644 --- a/drivers/regulator/cros-ec-regulator.c +++ b/drivers/regulator/cros-ec-regulator.c @@ -215,6 +215,7 @@ static struct platform_driver cros_ec_regulator_driver = { .probe = cros_ec_regulator_probe, .driver = { .name = "cros-ec-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = regulator_cros_ec_of_match, }, }; diff --git a/drivers/regulator/fan53880.c b/drivers/regulator/fan53880.c index 1d88d5381544..a3bebdee570e 100644 --- a/drivers/regulator/fan53880.c +++ b/drivers/regulator/fan53880.c @@ -172,6 +172,7 @@ MODULE_DEVICE_TABLE(i2c, fan53880_i2c_id); static struct i2c_driver fan53880_regulator_driver = { .driver = { .name = "fan53880", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = fan53880_dt_ids, }, .probe_new = fan53880_i2c_probe, diff --git a/drivers/regulator/max77826-regulator.c b/drivers/regulator/max77826-regulator.c index f9e2e884ff54..ea5d4b18b464 100644 --- a/drivers/regulator/max77826-regulator.c +++ b/drivers/regulator/max77826-regulator.c @@ -289,6 +289,7 @@ MODULE_DEVICE_TABLE(i2c, max77826_id); static struct i2c_driver max77826_regulator_driver = { .driver = { .name = "max77826", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(max77826_of_match), }, .probe_new = max77826_i2c_probe, diff --git a/drivers/regulator/mp5416.c b/drivers/regulator/mp5416.c index 82892d71c2c9..91e9019430b8 100644 --- a/drivers/regulator/mp5416.c +++ b/drivers/regulator/mp5416.c @@ -237,6 +237,7 @@ MODULE_DEVICE_TABLE(i2c, mp5416_id); static struct i2c_driver mp5416_regulator_driver = { .driver = { .name = "mp5416", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(mp5416_of_match), }, .probe_new = mp5416_i2c_probe, diff --git a/drivers/regulator/mp8859.c b/drivers/regulator/mp8859.c index f893dadf2abb..b968a682f38a 100644 --- a/drivers/regulator/mp8859.c +++ b/drivers/regulator/mp8859.c @@ -144,6 +144,7 @@ MODULE_DEVICE_TABLE(i2c, mp8859_i2c_id); static struct i2c_driver mp8859_regulator_driver = { .driver = { .name = "mp8859", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(mp8859_dt_id), }, .probe_new = mp8859_i2c_probe, diff --git a/drivers/regulator/mp886x.c b/drivers/regulator/mp886x.c index 6a0c94c15027..250c27e462f1 100644 --- a/drivers/regulator/mp886x.c +++ b/drivers/regulator/mp886x.c @@ -362,6 +362,7 @@ MODULE_DEVICE_TABLE(i2c, mp886x_id); static struct i2c_driver mp886x_regulator_driver = { .driver = { .name = "mp886x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = mp886x_dt_ids, }, .probe_new = mp886x_i2c_probe, diff --git a/drivers/regulator/mpq7920.c b/drivers/regulator/mpq7920.c index 54c862edf571..544d41b88514 100644 --- a/drivers/regulator/mpq7920.c +++ b/drivers/regulator/mpq7920.c @@ -318,6 +318,7 @@ MODULE_DEVICE_TABLE(i2c, mpq7920_id); static struct i2c_driver mpq7920_regulator_driver = { .driver = { .name = "mpq7920", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(mpq7920_of_match), }, .probe_new = mpq7920_i2c_probe, diff --git a/drivers/regulator/mt6360-regulator.c b/drivers/regulator/mt6360-regulator.c index 4d34be94d166..ad6587a378d0 100644 --- a/drivers/regulator/mt6360-regulator.c +++ b/drivers/regulator/mt6360-regulator.c @@ -446,6 +446,7 @@ MODULE_DEVICE_TABLE(platform, mt6360_regulator_id_table); static struct platform_driver mt6360_regulator_driver = { .driver = { .name = "mt6360-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = mt6360_regulator_probe, .id_table = mt6360_regulator_id_table, diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c index c6351fac9f4d..87a746dcb516 100644 --- a/drivers/regulator/pca9450-regulator.c +++ b/drivers/regulator/pca9450-regulator.c @@ -872,6 +872,7 @@ MODULE_DEVICE_TABLE(of, pca9450_of_match); static struct i2c_driver pca9450_i2c_driver = { .driver = { .name = "nxp-pca9450", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = pca9450_of_match, }, .probe_new = pca9450_i2c_probe, diff --git a/drivers/regulator/qcom-labibb-regulator.c b/drivers/regulator/qcom-labibb-regulator.c index bcf7140f3bc9..a8698ca61143 100644 --- a/drivers/regulator/qcom-labibb-regulator.c +++ b/drivers/regulator/qcom-labibb-regulator.c @@ -894,6 +894,7 @@ static int qcom_labibb_regulator_probe(struct platform_device *pdev) static struct platform_driver qcom_labibb_regulator_driver = { .driver = { .name = "qcom-lab-ibb-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = qcom_labibb_match, }, .probe = qcom_labibb_regulator_probe, diff --git a/drivers/regulator/qcom_usb_vbus-regulator.c b/drivers/regulator/qcom_usb_vbus-regulator.c index 2e627c2b6c51..57ec613f4a0a 100644 --- a/drivers/regulator/qcom_usb_vbus-regulator.c +++ b/drivers/regulator/qcom_usb_vbus-regulator.c @@ -100,6 +100,7 @@ MODULE_DEVICE_TABLE(of, qcom_usb_vbus_regulator_match); static struct platform_driver qcom_usb_vbus_regulator_driver = { .driver = { .name = "qcom-usb-vbus-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = qcom_usb_vbus_regulator_match, }, .probe = qcom_usb_vbus_regulator_probe, diff --git a/drivers/regulator/rpi-panel-attiny-regulator.c b/drivers/regulator/rpi-panel-attiny-regulator.c index 34514976475e..9afe961a87f1 100644 --- a/drivers/regulator/rpi-panel-attiny-regulator.c +++ b/drivers/regulator/rpi-panel-attiny-regulator.c @@ -396,6 +396,7 @@ MODULE_DEVICE_TABLE(of, attiny_dt_ids); static struct i2c_driver attiny_regulator_driver = { .driver = { .name = "rpi_touchscreen_attiny", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(attiny_dt_ids), }, .probe_new = attiny_i2c_probe, diff --git a/drivers/regulator/rt4801-regulator.c b/drivers/regulator/rt4801-regulator.c index 563d79196fdd..be3dc981195c 100644 --- a/drivers/regulator/rt4801-regulator.c +++ b/drivers/regulator/rt4801-regulator.c @@ -239,6 +239,7 @@ MODULE_DEVICE_TABLE(of, rt4801_of_id); static struct i2c_driver rt4801_driver = { .driver = { .name = "rt4801", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(rt4801_of_id), }, .probe_new = rt4801_probe, diff --git a/drivers/regulator/rtmv20-regulator.c b/drivers/regulator/rtmv20-regulator.c index 2ee334174e2b..7cbb812477e1 100644 --- a/drivers/regulator/rtmv20-regulator.c +++ b/drivers/regulator/rtmv20-regulator.c @@ -425,6 +425,7 @@ MODULE_DEVICE_TABLE(of, rtmv20_of_id); static struct i2c_driver rtmv20_driver = { .driver = { .name = "rtmv20", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(rtmv20_of_id), .pm = &rtmv20_pm, }, diff --git a/drivers/regulator/sy8827n.c b/drivers/regulator/sy8827n.c index 936a94b6df5b..99ca08cc3a6a 100644 --- a/drivers/regulator/sy8827n.c +++ b/drivers/regulator/sy8827n.c @@ -187,6 +187,7 @@ MODULE_DEVICE_TABLE(i2c, sy8827n_id); static struct i2c_driver sy8827n_regulator_driver = { .driver = { .name = "sy8827n-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = sy8827n_dt_ids, }, .probe_new = sy8827n_i2c_probe, diff --git a/drivers/regulator/vqmmc-ipq4019-regulator.c b/drivers/regulator/vqmmc-ipq4019-regulator.c index c4213f096fe5..086da36abc0b 100644 --- a/drivers/regulator/vqmmc-ipq4019-regulator.c +++ b/drivers/regulator/vqmmc-ipq4019-regulator.c @@ -89,6 +89,7 @@ static struct platform_driver ipq4019_regulator_driver = { .probe = ipq4019_regulator_probe, .driver = { .name = "vqmmc-ipq4019-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(regulator_ipq4019_of_match), }, }; -- cgit v1.2.3 From 46600ab142f8c2ecc2a647175fd86d53bc285a9a Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Thu, 16 Mar 2023 12:54:42 -0700 Subject: regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.10 and 5.15 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 5.10 but did exist in Linux 5.15. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.5.Ia0e6d859bdfe42ea5c187fb1eb4705c1b5ea23a1@changeid Signed-off-by: Mark Brown --- drivers/regulator/atc260x-regulator.c | 1 + drivers/regulator/bd71815-regulator.c | 1 + drivers/regulator/da9121-regulator.c | 1 + drivers/regulator/hi6421v600-regulator.c | 1 + drivers/regulator/max8893.c | 1 + drivers/regulator/mt6315-regulator.c | 1 + drivers/regulator/mt6359-regulator.c | 1 + drivers/regulator/mtk-dvfsrc-regulator.c | 1 + drivers/regulator/pf8x00-regulator.c | 1 + drivers/regulator/rt4831-regulator.c | 1 + drivers/regulator/rt6160-regulator.c | 1 + drivers/regulator/rt6245-regulator.c | 1 + drivers/regulator/rtq2134-regulator.c | 1 + drivers/regulator/rtq6752-regulator.c | 1 + drivers/regulator/sy7636a-regulator.c | 1 + 15 files changed, 15 insertions(+) diff --git a/drivers/regulator/atc260x-regulator.c b/drivers/regulator/atc260x-regulator.c index 485e58b264c0..87e237d740bc 100644 --- a/drivers/regulator/atc260x-regulator.c +++ b/drivers/regulator/atc260x-regulator.c @@ -530,6 +530,7 @@ static struct platform_driver atc260x_regulator_driver = { .probe = atc260x_regulator_probe, .driver = { .name = "atc260x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/regulator/bd71815-regulator.c b/drivers/regulator/bd71815-regulator.c index f4eaea732de7..475b1e0110e7 100644 --- a/drivers/regulator/bd71815-regulator.c +++ b/drivers/regulator/bd71815-regulator.c @@ -619,6 +619,7 @@ MODULE_DEVICE_TABLE(platform, bd7181x_pmic_id); static struct platform_driver bd7181x_regulator = { .driver = { .name = "bd7181x-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = bd7181x_probe, .id_table = bd7181x_pmic_id, diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c index d016e049d264..6ce0fdc18b9c 100644 --- a/drivers/regulator/da9121-regulator.c +++ b/drivers/regulator/da9121-regulator.c @@ -1194,6 +1194,7 @@ MODULE_DEVICE_TABLE(i2c, da9121_i2c_id); static struct i2c_driver da9121_regulator_driver = { .driver = { .name = "da9121", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(da9121_dt_ids), }, .probe_new = da9121_i2c_probe, diff --git a/drivers/regulator/hi6421v600-regulator.c b/drivers/regulator/hi6421v600-regulator.c index 4671678f6b19..4e10daa1e689 100644 --- a/drivers/regulator/hi6421v600-regulator.c +++ b/drivers/regulator/hi6421v600-regulator.c @@ -284,6 +284,7 @@ static struct platform_driver hi6421_spmi_regulator_driver = { .id_table = hi6421_spmi_regulator_table, .driver = { .name = "hi6421v600-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = hi6421_spmi_regulator_probe, }; diff --git a/drivers/regulator/max8893.c b/drivers/regulator/max8893.c index 1519bf760da7..10ffd77828b7 100644 --- a/drivers/regulator/max8893.c +++ b/drivers/regulator/max8893.c @@ -171,6 +171,7 @@ static struct i2c_driver max8893_driver = { .probe_new = max8893_probe_new, .driver = { .name = "max8893", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(max8893_dt_match), }, .id_table = max8893_ids, diff --git a/drivers/regulator/mt6315-regulator.c b/drivers/regulator/mt6315-regulator.c index 284c229e1aa4..8047081ea2f7 100644 --- a/drivers/regulator/mt6315-regulator.c +++ b/drivers/regulator/mt6315-regulator.c @@ -287,6 +287,7 @@ static void mt6315_regulator_shutdown(struct spmi_device *pdev) static struct spmi_driver mt6315_regulator_driver = { .driver = { .name = "mt6315-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = mt6315_of_match, }, .probe = mt6315_regulator_probe, diff --git a/drivers/regulator/mt6359-regulator.c b/drivers/regulator/mt6359-regulator.c index de3b0462832c..1849566784ab 100644 --- a/drivers/regulator/mt6359-regulator.c +++ b/drivers/regulator/mt6359-regulator.c @@ -982,6 +982,7 @@ MODULE_DEVICE_TABLE(platform, mt6359_platform_ids); static struct platform_driver mt6359_regulator_driver = { .driver = { .name = "mt6359-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = mt6359_regulator_probe, .id_table = mt6359_platform_ids, diff --git a/drivers/regulator/mtk-dvfsrc-regulator.c b/drivers/regulator/mtk-dvfsrc-regulator.c index 234af3a66c77..efca67207a5a 100644 --- a/drivers/regulator/mtk-dvfsrc-regulator.c +++ b/drivers/regulator/mtk-dvfsrc-regulator.c @@ -194,6 +194,7 @@ static int dvfsrc_vcore_regulator_probe(struct platform_device *pdev) static struct platform_driver mtk_dvfsrc_regulator_driver = { .driver = { .name = "mtk-dvfsrc-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = dvfsrc_vcore_regulator_probe, }; diff --git a/drivers/regulator/pf8x00-regulator.c b/drivers/regulator/pf8x00-regulator.c index 5d319fb81288..99a15c3be396 100644 --- a/drivers/regulator/pf8x00-regulator.c +++ b/drivers/regulator/pf8x00-regulator.c @@ -607,6 +607,7 @@ static struct i2c_driver pf8x00_regulator_driver = { .id_table = pf8x00_i2c_id, .driver = { .name = "pf8x00", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = pf8x00_dt_ids, }, .probe_new = pf8x00_i2c_probe, diff --git a/drivers/regulator/rt4831-regulator.c b/drivers/regulator/rt4831-regulator.c index 2016062cd7ef..97e6f7e2a0ba 100644 --- a/drivers/regulator/rt4831-regulator.c +++ b/drivers/regulator/rt4831-regulator.c @@ -194,6 +194,7 @@ MODULE_DEVICE_TABLE(platform, rt4831_regulator_match); static struct platform_driver rt4831_regulator_driver = { .driver = { .name = "rt4831-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .id_table = rt4831_regulator_match, .probe = rt4831_regulator_probe, diff --git a/drivers/regulator/rt6160-regulator.c b/drivers/regulator/rt6160-regulator.c index 5d7b0e7ad69a..8990dac23460 100644 --- a/drivers/regulator/rt6160-regulator.c +++ b/drivers/regulator/rt6160-regulator.c @@ -308,6 +308,7 @@ MODULE_DEVICE_TABLE(of, rt6160_of_match_table); static struct i2c_driver rt6160_driver = { .driver = { .name = "rt6160", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = rt6160_of_match_table, }, .probe_new = rt6160_probe, diff --git a/drivers/regulator/rt6245-regulator.c b/drivers/regulator/rt6245-regulator.c index cb22a207e9ff..8721d11c7964 100644 --- a/drivers/regulator/rt6245-regulator.c +++ b/drivers/regulator/rt6245-regulator.c @@ -243,6 +243,7 @@ MODULE_DEVICE_TABLE(of, rt6245_of_match_table); static struct i2c_driver rt6245_driver = { .driver = { .name = "rt6245", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = rt6245_of_match_table, }, .probe_new = rt6245_probe, diff --git a/drivers/regulator/rtq2134-regulator.c b/drivers/regulator/rtq2134-regulator.c index 8e13dea354a2..ee1577dc3cfc 100644 --- a/drivers/regulator/rtq2134-regulator.c +++ b/drivers/regulator/rtq2134-regulator.c @@ -363,6 +363,7 @@ MODULE_DEVICE_TABLE(of, rtq2134_device_tables); static struct i2c_driver rtq2134_driver = { .driver = { .name = "rtq2134", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = rtq2134_device_tables, }, .probe_new = rtq2134_probe, diff --git a/drivers/regulator/rtq6752-regulator.c b/drivers/regulator/rtq6752-regulator.c index dfe45fb67353..8559a266a7eb 100644 --- a/drivers/regulator/rtq6752-regulator.c +++ b/drivers/regulator/rtq6752-regulator.c @@ -278,6 +278,7 @@ MODULE_DEVICE_TABLE(of, rtq6752_device_table); static struct i2c_driver rtq6752_driver = { .driver = { .name = "rtq6752", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = rtq6752_device_table, }, .probe_new = rtq6752_probe, diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c index 29fc27c2cda0..d1e7ba1fb3e1 100644 --- a/drivers/regulator/sy7636a-regulator.c +++ b/drivers/regulator/sy7636a-regulator.c @@ -127,6 +127,7 @@ MODULE_DEVICE_TABLE(platform, sy7636a_regulator_id_table); static struct platform_driver sy7636a_regulator_driver = { .driver = { .name = "sy7636a-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = sy7636a_regulator_probe, .id_table = sy7636a_regulator_id_table, -- cgit v1.2.3 From 41cff178e3d6df28acd8490519a656c509b4496f Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Thu, 16 Mar 2023 12:54:43 -0700 Subject: regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.15 and 6.1 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 5.15 but did exist in Linux 6.1. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.6.Ibc8a86ddd5055ebbbe487a529199db7b36ccad1a@changeid Signed-off-by: Mark Brown --- drivers/regulator/max20086-regulator.c | 1 + drivers/regulator/max597x-regulator.c | 1 + drivers/regulator/mt6331-regulator.c | 1 + drivers/regulator/mt6332-regulator.c | 1 + drivers/regulator/mt6370-regulator.c | 1 + drivers/regulator/rt5120-regulator.c | 1 + drivers/regulator/rt5190a-regulator.c | 1 + drivers/regulator/rt5759-regulator.c | 1 + drivers/regulator/sm5703-regulator.c | 1 + drivers/regulator/tps6286x-regulator.c | 1 + drivers/regulator/tps65219-regulator.c | 1 + drivers/regulator/tps68470-regulator.c | 1 + 12 files changed, 12 insertions(+) diff --git a/drivers/regulator/max20086-regulator.c b/drivers/regulator/max20086-regulator.c index c98a72f43935..ace1d582a191 100644 --- a/drivers/regulator/max20086-regulator.c +++ b/drivers/regulator/max20086-regulator.c @@ -320,6 +320,7 @@ MODULE_DEVICE_TABLE(of, max20086_dt_ids); static struct i2c_driver max20086_regulator_driver = { .driver = { .name = "max20086", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(max20086_dt_ids), }, .probe_new = max20086_i2c_probe, diff --git a/drivers/regulator/max597x-regulator.c b/drivers/regulator/max597x-regulator.c index 648e3641885a..7873a5267555 100644 --- a/drivers/regulator/max597x-regulator.c +++ b/drivers/regulator/max597x-regulator.c @@ -501,6 +501,7 @@ static int max597x_regulator_probe(struct platform_device *pdev) static struct platform_driver max597x_regulator_driver = { .driver = { .name = "max597x-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = max597x_regulator_probe, }; diff --git a/drivers/regulator/mt6331-regulator.c b/drivers/regulator/mt6331-regulator.c index 56be9a3a84ab..0059f88c6fd7 100644 --- a/drivers/regulator/mt6331-regulator.c +++ b/drivers/regulator/mt6331-regulator.c @@ -495,6 +495,7 @@ MODULE_DEVICE_TABLE(platform, mt6331_platform_ids); static struct platform_driver mt6331_regulator_driver = { .driver = { .name = "mt6331-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = mt6331_regulator_probe, .id_table = mt6331_platform_ids, diff --git a/drivers/regulator/mt6332-regulator.c b/drivers/regulator/mt6332-regulator.c index 77a27d8127a3..8d8331a2aca5 100644 --- a/drivers/regulator/mt6332-regulator.c +++ b/drivers/regulator/mt6332-regulator.c @@ -410,6 +410,7 @@ MODULE_DEVICE_TABLE(platform, mt6332_platform_ids); static struct platform_driver mt6332_regulator_driver = { .driver = { .name = "mt6332-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = mt6332_regulator_probe, .id_table = mt6332_platform_ids, diff --git a/drivers/regulator/mt6370-regulator.c b/drivers/regulator/mt6370-regulator.c index e73f5a46cb9a..27cb32b726e0 100644 --- a/drivers/regulator/mt6370-regulator.c +++ b/drivers/regulator/mt6370-regulator.c @@ -379,6 +379,7 @@ MODULE_DEVICE_TABLE(platform, mt6370_devid_table); static struct platform_driver mt6370_regulator_driver = { .driver = { .name = "mt6370-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .id_table = mt6370_devid_table, .probe = mt6370_regulator_probe, diff --git a/drivers/regulator/rt5120-regulator.c b/drivers/regulator/rt5120-regulator.c index 8173ede09414..a388ac70865f 100644 --- a/drivers/regulator/rt5120-regulator.c +++ b/drivers/regulator/rt5120-regulator.c @@ -409,6 +409,7 @@ MODULE_DEVICE_TABLE(platform, rt5120_regulator_dev_table); static struct platform_driver rt5120_regulator_driver = { .driver = { .name = "rt5120-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .id_table = rt5120_regulator_dev_table, .probe = rt5120_regulator_probe, diff --git a/drivers/regulator/rt5190a-regulator.c b/drivers/regulator/rt5190a-regulator.c index 4a3397b32582..f6c12f87fb8d 100644 --- a/drivers/regulator/rt5190a-regulator.c +++ b/drivers/regulator/rt5190a-regulator.c @@ -505,6 +505,7 @@ MODULE_DEVICE_TABLE(of, rt5190a_device_table); static struct i2c_driver rt5190a_driver = { .driver = { .name = "rt5190a", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = rt5190a_device_table, }, .probe_new = rt5190a_probe, diff --git a/drivers/regulator/rt5759-regulator.c b/drivers/regulator/rt5759-regulator.c index 8488417f4b2c..d5a42ad21a9a 100644 --- a/drivers/regulator/rt5759-regulator.c +++ b/drivers/regulator/rt5759-regulator.c @@ -359,6 +359,7 @@ MODULE_DEVICE_TABLE(of, rt5759_device_table); static struct i2c_driver rt5759_driver = { .driver = { .name = "rt5759", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(rt5759_device_table), }, .probe_new = rt5759_probe, diff --git a/drivers/regulator/sm5703-regulator.c b/drivers/regulator/sm5703-regulator.c index 05ad28fc4da8..38e66df378a5 100644 --- a/drivers/regulator/sm5703-regulator.c +++ b/drivers/regulator/sm5703-regulator.c @@ -155,6 +155,7 @@ MODULE_DEVICE_TABLE(platform, sm5703_regulator_id); static struct platform_driver sm5703_regulator_driver = { .driver = { .name = "sm5703-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = sm5703_regulator_probe, .id_table = sm5703_regulator_id, diff --git a/drivers/regulator/tps6286x-regulator.c b/drivers/regulator/tps6286x-regulator.c index 207ac1d1d88d..f92e7649d0a0 100644 --- a/drivers/regulator/tps6286x-regulator.c +++ b/drivers/regulator/tps6286x-regulator.c @@ -147,6 +147,7 @@ MODULE_DEVICE_TABLE(i2c, tps6286x_i2c_id); static struct i2c_driver tps6286x_regulator_driver = { .driver = { .name = "tps6286x", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(tps6286x_dt_ids), }, .probe_new = tps6286x_i2c_probe, diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c index 4b5acaa45049..b1719ee990ab 100644 --- a/drivers/regulator/tps65219-regulator.c +++ b/drivers/regulator/tps65219-regulator.c @@ -380,6 +380,7 @@ MODULE_DEVICE_TABLE(platform, tps65219_regulator_id_table); static struct platform_driver tps65219_regulator_driver = { .driver = { .name = "tps65219-pmic", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps65219_regulator_probe, .id_table = tps65219_regulator_id_table, diff --git a/drivers/regulator/tps68470-regulator.c b/drivers/regulator/tps68470-regulator.c index 4bca7c4128ab..de7db7690f6b 100644 --- a/drivers/regulator/tps68470-regulator.c +++ b/drivers/regulator/tps68470-regulator.c @@ -175,6 +175,7 @@ static int tps68470_regulator_probe(struct platform_device *pdev) static struct platform_driver tps68470_regulator_driver = { .driver = { .name = "tps68470-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps68470_regulator_probe, }; -- cgit v1.2.3 From bdce47bb19cbf7784d48e93677c868a69dbae439 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Thu, 16 Mar 2023 12:54:44 -0700 Subject: regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that are newer than 6.1 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators that were not present in kernel 6.1. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.7.I31771918f1d8dbe4bfb9f1fef7ff987f2b7504b5@changeid Signed-off-by: Mark Brown --- drivers/regulator/max20411-regulator.c | 1 + drivers/regulator/mt6357-regulator.c | 1 + drivers/regulator/rt5739.c | 1 + drivers/regulator/rt6190-regulator.c | 1 + 4 files changed, 4 insertions(+) diff --git a/drivers/regulator/max20411-regulator.c b/drivers/regulator/max20411-regulator.c index 83dacb4ff173..be8169b86a89 100644 --- a/drivers/regulator/max20411-regulator.c +++ b/drivers/regulator/max20411-regulator.c @@ -153,6 +153,7 @@ MODULE_DEVICE_TABLE(i2c, max20411_id); static struct i2c_driver max20411_i2c_driver = { .driver = { .name = "max20411", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_max20411_match_tbl, }, .probe_new = max20411_probe, diff --git a/drivers/regulator/mt6357-regulator.c b/drivers/regulator/mt6357-regulator.c index b2352b96aed2..c0439a4e0b50 100644 --- a/drivers/regulator/mt6357-regulator.c +++ b/drivers/regulator/mt6357-regulator.c @@ -439,6 +439,7 @@ MODULE_DEVICE_TABLE(platform, mt6357_platform_ids); static struct platform_driver mt6357_regulator_driver = { .driver = { .name = "mt6357-regulator", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = mt6357_regulator_probe, .id_table = mt6357_platform_ids, diff --git a/drivers/regulator/rt5739.c b/drivers/regulator/rt5739.c index 0a9e1023d025..74fc5bf6d87e 100644 --- a/drivers/regulator/rt5739.c +++ b/drivers/regulator/rt5739.c @@ -279,6 +279,7 @@ MODULE_DEVICE_TABLE(of, rt5739_device_table); static struct i2c_driver rt5739_driver = { .driver = { .name = "rt5739", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = rt5739_device_table, }, .probe_new = rt5739_probe, diff --git a/drivers/regulator/rt6190-regulator.c b/drivers/regulator/rt6190-regulator.c index 995e028abdd7..ca91a1f6d3c8 100644 --- a/drivers/regulator/rt6190-regulator.c +++ b/drivers/regulator/rt6190-regulator.c @@ -483,6 +483,7 @@ MODULE_DEVICE_TABLE(of, rt6190_of_dev_table); static struct i2c_driver rt6190_driver = { .driver = { .name = "rt6190", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = rt6190_of_dev_table, .pm = pm_ptr(&rt6190_dev_pm), }, -- cgit v1.2.3 From cff5c895137cb5c3d48811881f111b17c444e2d5 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 17 Mar 2023 18:36:14 -0500 Subject: regulator: dt-bindings: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230317233616.3968003-1-robh@kernel.org Signed-off-by: Mark Brown --- .../bindings/regulator/anatop-regulator.yaml | 22 +++++++++++----------- .../devicetree/bindings/regulator/dlg,da9121.yaml | 2 +- .../bindings/regulator/fixed-regulator.yaml | 2 +- .../regulator/google,cros-ec-regulator.yaml | 2 +- .../bindings/regulator/gpio-regulator.yaml | 2 +- .../bindings/regulator/max77650-regulator.yaml | 2 +- .../devicetree/bindings/regulator/max8660.yaml | 2 +- .../devicetree/bindings/regulator/max8893.yaml | 2 +- .../regulator/mediatek,mt6331-regulator.yaml | 12 ++++++------ .../regulator/mediatek,mt6332-regulator.yaml | 4 ++-- .../devicetree/bindings/regulator/mps,mp5416.yaml | 4 ++-- .../devicetree/bindings/regulator/mps,mp886x.yaml | 2 +- .../devicetree/bindings/regulator/mps,mpq7920.yaml | 6 +++--- .../bindings/regulator/mt6315-regulator.yaml | 2 +- .../bindings/regulator/mt6359-regulator.yaml | 16 ++++++++-------- .../bindings/regulator/mt6360-regulator.yaml | 4 ++-- .../bindings/regulator/nxp,pca9450-regulator.yaml | 4 ++-- .../bindings/regulator/nxp,pf8x00-regulator.yaml | 4 ++-- .../devicetree/bindings/regulator/pfuze100.yaml | 8 ++++---- .../bindings/regulator/qcom,rpmh-regulator.yaml | 8 ++++---- ...pberrypi,7inch-touchscreen-panel-regulator.yaml | 2 +- .../devicetree/bindings/regulator/regulator.yaml | 22 +++++++++++----------- .../regulator/richtek,rt6245-regulator.yaml | 8 ++++---- .../regulator/richtek,rtmv20-regulator.yaml | 2 +- .../bindings/regulator/rohm,bd71815-regulator.yaml | 8 ++++---- .../bindings/regulator/rohm,bd71828-regulator.yaml | 8 ++++---- .../bindings/regulator/rohm,bd71837-regulator.yaml | 6 +++--- .../bindings/regulator/rohm,bd71847-regulator.yaml | 6 +++--- .../bindings/regulator/rohm,bd9576-regulator.yaml | 2 +- .../regulator/socionext,uniphier-regulator.yaml | 2 +- .../bindings/regulator/st,stm32-booster.yaml | 4 ++-- .../bindings/regulator/st,stm32-vrefbuf.yaml | 2 +- .../bindings/regulator/st,stm32mp1-pwr-reg.yaml | 2 +- .../devicetree/bindings/regulator/ti,tps62360.yaml | 2 +- .../regulator/vqmmc-ipq4019-regulator.yaml | 2 +- .../devicetree/bindings/regulator/wlf,arizona.yaml | 6 +++--- 36 files changed, 97 insertions(+), 97 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.yaml b/Documentation/devicetree/bindings/regulator/anatop-regulator.yaml index 0a66338c7e5a..17250378542a 100644 --- a/Documentation/devicetree/bindings/regulator/anatop-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/anatop-regulator.yaml @@ -10,7 +10,7 @@ maintainers: - Ying-Chun Liu (PaulLiu) allOf: - - $ref: "regulator.yaml#" + - $ref: regulator.yaml# properties: compatible: @@ -19,43 +19,43 @@ properties: regulator-name: true anatop-reg-offset: - $ref: '/schemas/types.yaml#/definitions/uint32' + $ref: /schemas/types.yaml#/definitions/uint32 description: u32 value representing the anatop MFD register offset. anatop-vol-bit-shift: - $ref: '/schemas/types.yaml#/definitions/uint32' + $ref: /schemas/types.yaml#/definitions/uint32 description: u32 value representing the bit shift for the register. anatop-vol-bit-width: - $ref: '/schemas/types.yaml#/definitions/uint32' + $ref: /schemas/types.yaml#/definitions/uint32 description: u32 value representing the number of bits used in the register. anatop-min-bit-val: - $ref: '/schemas/types.yaml#/definitions/uint32' + $ref: /schemas/types.yaml#/definitions/uint32 description: u32 value representing the minimum value of this register. anatop-min-voltage: - $ref: '/schemas/types.yaml#/definitions/uint32' + $ref: /schemas/types.yaml#/definitions/uint32 description: u32 value representing the minimum voltage of this regulator. anatop-max-voltage: - $ref: '/schemas/types.yaml#/definitions/uint32' + $ref: /schemas/types.yaml#/definitions/uint32 description: u32 value representing the maximum voltage of this regulator. anatop-delay-reg-offset: - $ref: '/schemas/types.yaml#/definitions/uint32' + $ref: /schemas/types.yaml#/definitions/uint32 description: u32 value representing the anatop MFD step time register offset. anatop-delay-bit-shift: - $ref: '/schemas/types.yaml#/definitions/uint32' + $ref: /schemas/types.yaml#/definitions/uint32 description: u32 value representing the bit shift for the step time register. anatop-delay-bit-width: - $ref: '/schemas/types.yaml#/definitions/uint32' + $ref: /schemas/types.yaml#/definitions/uint32 description: u32 value representing the number of bits used in the step time register. anatop-enable-bit: - $ref: '/schemas/types.yaml#/definitions/uint32' + $ref: /schemas/types.yaml#/definitions/uint32 description: u32 value representing regulator enable bit offset. vin-supply: diff --git a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml index 63e1161a87de..dc626517c2ad 100644 --- a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml +++ b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml @@ -109,7 +109,7 @@ properties: description: Specify a valid GPIO for platform control of the regulator dlg,ripple-cancel: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 enum: [ 0, 1, 2, 3 ] description: | Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml index 48af7cba4652..ac0281b1cceb 100644 --- a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml @@ -17,7 +17,7 @@ description: to be the same. allOf: - - $ref: "regulator.yaml#" + - $ref: regulator.yaml# - if: properties: compatible: diff --git a/Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.yaml b/Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.yaml index 0921f012c901..e0ff5012b763 100644 --- a/Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.yaml @@ -14,7 +14,7 @@ description: regulator.yaml, can also be used. allOf: - - $ref: "regulator.yaml#" + - $ref: regulator.yaml# properties: compatible: diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml b/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml index 6c3371d706bb..f4c1f36e52e9 100644 --- a/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml @@ -15,7 +15,7 @@ description: regulator.txt, can also be used. allOf: - - $ref: "regulator.yaml#" + - $ref: regulator.yaml# properties: compatible: diff --git a/Documentation/devicetree/bindings/regulator/max77650-regulator.yaml b/Documentation/devicetree/bindings/regulator/max77650-regulator.yaml index 01b9775a92d1..27d5e9c2bb93 100644 --- a/Documentation/devicetree/bindings/regulator/max77650-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/max77650-regulator.yaml @@ -25,7 +25,7 @@ properties: patternProperties: "^regulator-(ldo|sbb[0-2])$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# unevaluatedProperties: false required: diff --git a/Documentation/devicetree/bindings/regulator/max8660.yaml b/Documentation/devicetree/bindings/regulator/max8660.yaml index 35792a927b03..f05f4644c8ee 100644 --- a/Documentation/devicetree/bindings/regulator/max8660.yaml +++ b/Documentation/devicetree/bindings/regulator/max8660.yaml @@ -25,7 +25,7 @@ properties: patternProperties: "^regulator-.+$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# unevaluatedProperties: false additionalProperties: false diff --git a/Documentation/devicetree/bindings/regulator/max8893.yaml b/Documentation/devicetree/bindings/regulator/max8893.yaml index 2b5e977bf409..e40ee798e198 100644 --- a/Documentation/devicetree/bindings/regulator/max8893.yaml +++ b/Documentation/devicetree/bindings/regulator/max8893.yaml @@ -25,7 +25,7 @@ properties: patternProperties: "^(ldo[1-5]|buck)$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# additionalProperties: false diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6331-regulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6331-regulator.yaml index 771cc134393c..79e5198e1c73 100644 --- a/Documentation/devicetree/bindings/regulator/mediatek,mt6331-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6331-regulator.yaml @@ -18,7 +18,7 @@ description: | patternProperties: "^buck-v(core2|io18|dvfs11|dvfs12|dvfs13|dvfs14)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -28,7 +28,7 @@ patternProperties: "^ldo-v(avdd32aud|auxa32)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -38,7 +38,7 @@ patternProperties: "^ldo-v(dig18|emc33|ibr|mc|mch|mipi|rtc|sram|usb10)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -48,7 +48,7 @@ patternProperties: "^ldo-vcam(a|af|d|io)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -58,7 +58,7 @@ patternProperties: "^ldo-vtcxo[12]$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -71,7 +71,7 @@ patternProperties: "^ldo-vgp[1234]$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6332-regulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6332-regulator.yaml index 3218f43e6957..2eb512c29a0d 100644 --- a/Documentation/devicetree/bindings/regulator/mediatek,mt6332-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6332-regulator.yaml @@ -18,7 +18,7 @@ description: | patternProperties: "^buck-v(dram|dvfs2|pa|rf18a|rf18b|sbst)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -28,7 +28,7 @@ patternProperties: "^ldo-v(bif28|dig18|sram|usb33)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: diff --git a/Documentation/devicetree/bindings/regulator/mps,mp5416.yaml b/Documentation/devicetree/bindings/regulator/mps,mp5416.yaml index 7023c597c3ed..2e720d152890 100644 --- a/Documentation/devicetree/bindings/regulator/mps,mp5416.yaml +++ b/Documentation/devicetree/bindings/regulator/mps,mp5416.yaml @@ -28,11 +28,11 @@ properties: patternProperties: "^buck[1-4]$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# type: object "^ldo[1-4]$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# type: object additionalProperties: false diff --git a/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml b/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml index 9245b7199439..374a4f6b1e23 100644 --- a/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml +++ b/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml @@ -28,7 +28,7 @@ properties: mps,fb-voltage-divider: description: An array of two integers containing the resistor values R1 and R2 of the feedback voltage divider in kilo ohms. - $ref: "/schemas/types.yaml#/definitions/uint32-array" + $ref: /schemas/types.yaml#/definitions/uint32-array maxItems: 2 mps,switch-frequency-hz: diff --git a/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml b/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml index c2e8c54e5311..f3fcfc8be72f 100644 --- a/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml +++ b/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml @@ -29,7 +29,7 @@ properties: properties: mps,switch-freq: - $ref: "/schemas/types.yaml#/definitions/uint8" + $ref: /schemas/types.yaml#/definitions/uint8 enum: [0, 1, 2, 3] default: 2 description: | @@ -51,14 +51,14 @@ properties: properties: mps,buck-softstart: - $ref: "/schemas/types.yaml#/definitions/uint8" + $ref: /schemas/types.yaml#/definitions/uint8 enum: [0, 1, 2, 3] description: | defines the soft start time of this buck, must be one of the following corresponding values 150us, 300us, 610us, 920us mps,buck-phase-delay: - $ref: "/schemas/types.yaml#/definitions/uint8" + $ref: /schemas/types.yaml#/definitions/uint8 enum: [0, 1, 2, 3] description: | defines the phase delay of this buck, must be one of the following diff --git a/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml index 364b58730be2..6317daf76d1f 100644 --- a/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml @@ -28,7 +28,7 @@ properties: patternProperties: "^vbuck[1-4]$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# unevaluatedProperties: false properties: diff --git a/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml index 8cc413eb482d..d6b3b5a5c0b3 100644 --- a/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml @@ -17,7 +17,7 @@ description: | patternProperties: "^buck_v(s1|gpu11|modem|pu|core|s2|pa|proc2|proc1|core_sshub)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -27,7 +27,7 @@ patternProperties: "^ldo_v(ibr|rf12|usb|camio|efuse|xo22)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -37,7 +37,7 @@ patternProperties: "^ldo_v(rfck|emc|a12|a09|ufs|bbck)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -47,7 +47,7 @@ patternProperties: "^ldo_vcn(18|13|33_1_bt|13_1_wifi|33_2_bt|33_2_wifi)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -57,7 +57,7 @@ patternProperties: "^ldo_vsram_(proc2|others|md|proc1|others_sshub)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -67,7 +67,7 @@ patternProperties: "^ldo_v(fe|bif|io)28$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -77,7 +77,7 @@ patternProperties: "^ldo_v(aud|io|aux|rf|m)18$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: @@ -87,7 +87,7 @@ patternProperties: "^ldo_vsim[12]$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: regulator-name: diff --git a/Documentation/devicetree/bindings/regulator/mt6360-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6360-regulator.yaml index 8a0931dc2f30..9c879bc3c360 100644 --- a/Documentation/devicetree/bindings/regulator/mt6360-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/mt6360-regulator.yaml @@ -26,11 +26,11 @@ properties: patternProperties: "^buck[12]$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# unevaluatedProperties: false "^ldo[123567]$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# unevaluatedProperties: false required: diff --git a/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml b/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml index 835b53302db8..d2383e523875 100644 --- a/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml @@ -57,7 +57,7 @@ properties: properties: nxp,dvs-run-voltage: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 600000 maximum: 2187500 description: @@ -65,7 +65,7 @@ properties: dvs(dynamic voltage scaling) property. nxp,dvs-standby-voltage: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 600000 maximum: 2187500 description: diff --git a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml index aabf50f5b39e..8c0f37d8d082 100644 --- a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml @@ -59,7 +59,7 @@ properties: should be "buck1", ..., "buck7" nxp,ilim-ma: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 2100 maximum: 4500 deprecated: true @@ -75,7 +75,7 @@ properties: 4500 nxp,phase-shift: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 default: 0 enum: [ 0, 45, 90, 135, 180, 225, 270, 315 ] description: diff --git a/Documentation/devicetree/bindings/regulator/pfuze100.yaml b/Documentation/devicetree/bindings/regulator/pfuze100.yaml index a26bbd68b729..67a30b23b92c 100644 --- a/Documentation/devicetree/bindings/regulator/pfuze100.yaml +++ b/Documentation/devicetree/bindings/regulator/pfuze100.yaml @@ -63,19 +63,19 @@ properties: patternProperties: "^sw([1-4]|[1-4][a-c]|[1-4][a-c][a-c])$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# type: object "^vgen[1-6]$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# type: object "^vldo[1-4]$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# type: object "^(vsnvs|vref|vrefddr|swbst|coin|v33|vccsd)$": - $ref: "regulator.yaml#" + $ref: regulator.yaml# type: object additionalProperties: false diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml index 297a75069f60..a765837dc069 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml @@ -105,18 +105,18 @@ properties: bob: type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# description: BOB regulator node. dependencies: - regulator-allow-set-load: ["regulator-allowed-modes"] + regulator-allow-set-load: [ regulator-allowed-modes ] patternProperties: "^(smps|ldo|lvs|bob)[0-9]+$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# description: smps/ldo regulator nodes(s). dependencies: - regulator-allow-set-load: ["regulator-allowed-modes"] + regulator-allow-set-load: [ regulator-allowed-modes ] required: - compatible diff --git a/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator.yaml b/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator.yaml index 0ae25d119b6f..41678400e63f 100644 --- a/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator.yaml @@ -15,7 +15,7 @@ description: | and control the backlight. allOf: - - $ref: "regulator.yaml#" + - $ref: regulator.yaml# properties: compatible: diff --git a/Documentation/devicetree/bindings/regulator/regulator.yaml b/Documentation/devicetree/bindings/regulator/regulator.yaml index 53b81d8a2d41..e158c2d3d3f9 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/regulator.yaml @@ -13,7 +13,7 @@ maintainers: properties: regulator-name: description: A string used as a descriptive name for regulator outputs - $ref: "/schemas/types.yaml#/definitions/string" + $ref: /schemas/types.yaml#/definitions/string regulator-min-microvolt: description: smallest voltage consumers may set @@ -23,7 +23,7 @@ properties: regulator-microvolt-offset: description: Offset applied to voltages to compensate for voltage drops - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 regulator-min-microamp: description: smallest current consumers may set @@ -59,7 +59,7 @@ properties: description: ramp delay for regulator(in uV/us) For hardware which supports disabling ramp rate, it should be explicitly initialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 regulator-enable-ramp-delay: description: The time taken, in microseconds, for the supply rail to @@ -68,7 +68,7 @@ properties: required due to the combination of internal ramping of the regulator itself, and board design issues such as trace capacitance and load on the supply. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 regulator-settling-time-us: description: Settling time, in microseconds, for voltage change if regulator @@ -95,7 +95,7 @@ properties: description: initial operating mode. The set of possible operating modes depends on the capabilities of every hardware so each device binding documentation explains which values the regulator supports. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 regulator-allowed-modes: description: list of operating modes that software is allowed to configure @@ -103,12 +103,12 @@ properties: The set of possible operating modes depends on the capabilities of every hardware so each device binding document explains which values the regulator supports. - $ref: "/schemas/types.yaml#/definitions/uint32-array" + $ref: /schemas/types.yaml#/definitions/uint32-array regulator-system-load: description: Load in uA present on regulator that is not captured by any consumer request. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 regulator-pull-down: description: Enable pull down resistor when the regulator is disabled. @@ -206,14 +206,14 @@ properties: 0: Disable active discharge. 1: Enable active discharge. Absence of this property will leave configuration to default. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 1] regulator-coupled-with: description: Regulators with which the regulator is coupled. The linkage is 2-way - all coupled regulators should be linked with each other. A regulator should not be coupled with its supplier. - $ref: "/schemas/types.yaml#/definitions/phandle-array" + $ref: /schemas/types.yaml#/definitions/phandle-array items: maxItems: 1 @@ -221,7 +221,7 @@ properties: description: Array of maximum spread between voltages of coupled regulators in microvolts, each value in the array relates to the corresponding couple specified by the regulator-coupled-with property. - $ref: "/schemas/types.yaml#/definitions/uint32-array" + $ref: /schemas/types.yaml#/definitions/uint32-array regulator-max-step-microvolt: description: Maximum difference between current and target voltages @@ -269,7 +269,7 @@ patternProperties: of possible operating modes depends on the capabilities of every hardware so the valid modes are documented on each regulator device tree binding document. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 additionalProperties: false diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt6245-regulator.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt6245-regulator.yaml index e983d0e70c9b..b73762e151bb 100644 --- a/Documentation/devicetree/bindings/regulator/richtek,rt6245-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/richtek,rt6245-regulator.yaml @@ -32,7 +32,7 @@ properties: maxItems: 1 richtek,oc-level-select: - $ref: "/schemas/types.yaml#/definitions/uint8" + $ref: /schemas/types.yaml#/definitions/uint8 enum: [0, 1, 2, 3] description: | Over current level selection. Each respective value means the current @@ -40,7 +40,7 @@ properties: in chip default. richtek,ot-level-select: - $ref: "/schemas/types.yaml#/definitions/uint8" + $ref: /schemas/types.yaml#/definitions/uint8 enum: [0, 1, 2] description: | Over temperature level selection. Each respective value means the degree @@ -48,7 +48,7 @@ properties: default. richtek,pgdly-time-select: - $ref: "/schemas/types.yaml#/definitions/uint8" + $ref: /schemas/types.yaml#/definitions/uint8 enum: [0, 1, 2, 3] description: | Power good signal delay time selection. Each respective value means the @@ -57,7 +57,7 @@ properties: richtek,switch-freq-select: - $ref: "/schemas/types.yaml#/definitions/uint8" + $ref: /schemas/types.yaml#/definitions/uint8 enum: [0, 1, 2] description: | Buck switch frequency selection. Each respective value means 400KHz, diff --git a/Documentation/devicetree/bindings/regulator/richtek,rtmv20-regulator.yaml b/Documentation/devicetree/bindings/regulator/richtek,rtmv20-regulator.yaml index a8ccb5cb8d77..446ec5127d1f 100644 --- a/Documentation/devicetree/bindings/regulator/richtek,rtmv20-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/richtek,rtmv20-regulator.yaml @@ -120,7 +120,7 @@ properties: lsw: description: load switch current regulator description. type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# required: - compatible diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml index 027fab3dc181..cc4ceb32e9d6 100644 --- a/Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml @@ -56,7 +56,7 @@ patternProperties: PMIC "RUN" state voltage in uV when PMIC HW states are used. See comments below for bucks/LDOs which support this. 0 means regulator should be disabled at RUN state. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 3300000 @@ -67,7 +67,7 @@ patternProperties: keeps regulator enabled. BD71815 does not change voltage level when PMIC transitions to SNVS.SNVS voltage depends on the previous state (from which the PMIC transitioned to SNVS). - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 3300000 @@ -76,7 +76,7 @@ patternProperties: PMIC "SUSPEND" state voltage in uV when PMIC HW states are used. See comments below for bucks/LDOs which support this. 0 means regulator should be disabled at SUSPEND state. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 3300000 @@ -85,7 +85,7 @@ patternProperties: PMIC "LPSR" state voltage in uV when PMIC HW states are used. See comments below for bucks/LDOs which support this. 0 means regulator should be disabled at LPSR state. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 3300000 diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml index 3cbe3b76ccee..19b253c09e97 100644 --- a/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml @@ -52,7 +52,7 @@ patternProperties: description: PMIC default "RUN" state voltage in uV. See below table for bucks which support this. 0 means disabled. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 3300000 @@ -60,7 +60,7 @@ patternProperties: description: PMIC default "IDLE" state voltage in uV. See below table for bucks which support this. 0 means disabled. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 3300000 @@ -68,7 +68,7 @@ patternProperties: description: PMIC default "SUSPEND" state voltage in uV. See below table for bucks which support this. 0 means disabled. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 3300000 @@ -76,7 +76,7 @@ patternProperties: description: PMIC default "LPSR" state voltage in uV. See below table for bucks which support this. 0 means disabled. - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 3300000 diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml index ab842817d847..6e693fee3493 100644 --- a/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml @@ -55,7 +55,7 @@ patternProperties: should be "buck1", ..., "buck8" rohm,dvs-run-voltage: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 1300000 description: @@ -63,7 +63,7 @@ patternProperties: bucks which support this. 0 means disabled. rohm,dvs-idle-voltage: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 1300000 description: @@ -71,7 +71,7 @@ patternProperties: bucks which support this. 0 means disabled. rohm,dvs-suspend-voltage: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 1300000 description: diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml index 65fc3d15f693..1d3dcfba58b0 100644 --- a/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml @@ -54,7 +54,7 @@ patternProperties: should be "buck1", ..., "buck6" rohm,dvs-run-voltage: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 1300000 description: @@ -62,7 +62,7 @@ patternProperties: bucks which support this. 0 means disabled. rohm,dvs-idle-voltage: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 1300000 description: @@ -70,7 +70,7 @@ patternProperties: bucks which support this. 0 means disabled. rohm,dvs-suspend-voltage: - $ref: "/schemas/types.yaml#/definitions/uint32" + $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 1300000 description: diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml index 89b8592db81d..f573128da06f 100644 --- a/Documentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml @@ -25,7 +25,7 @@ patternProperties: type: object description: Properties for single regulator. - $ref: "regulator.yaml#" + $ref: regulator.yaml# properties: rohm,ocw-fet-ron-micro-ohms: diff --git a/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml b/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml index a6949a581cd1..ddaa112252e5 100644 --- a/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml @@ -42,7 +42,7 @@ properties: reset-names: true allOf: - - $ref: "regulator.yaml#" + - $ref: regulator.yaml# - if: properties: compatible: diff --git a/Documentation/devicetree/bindings/regulator/st,stm32-booster.yaml b/Documentation/devicetree/bindings/regulator/st,stm32-booster.yaml index c82f6f885d97..c863100f6e7d 100644 --- a/Documentation/devicetree/bindings/regulator/st,stm32-booster.yaml +++ b/Documentation/devicetree/bindings/regulator/st,stm32-booster.yaml @@ -14,7 +14,7 @@ description: | to supply ADC analog input switches. allOf: - - $ref: "regulator.yaml#" + - $ref: regulator.yaml# properties: compatible: @@ -23,7 +23,7 @@ properties: - st,stm32mp1-booster st,syscfg: - $ref: "/schemas/types.yaml#/definitions/phandle" + $ref: /schemas/types.yaml#/definitions/phandle description: phandle to system configuration controller. vdda-supply: diff --git a/Documentation/devicetree/bindings/regulator/st,stm32-vrefbuf.yaml b/Documentation/devicetree/bindings/regulator/st,stm32-vrefbuf.yaml index c1bf1f90490a..05f4ad2c7d3a 100644 --- a/Documentation/devicetree/bindings/regulator/st,stm32-vrefbuf.yaml +++ b/Documentation/devicetree/bindings/regulator/st,stm32-vrefbuf.yaml @@ -15,7 +15,7 @@ maintainers: - Fabrice Gasnier allOf: - - $ref: "regulator.yaml#" + - $ref: regulator.yaml# properties: compatible: diff --git a/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml b/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml index bd07b9c81570..7d53cfa2c288 100644 --- a/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml +++ b/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml @@ -26,7 +26,7 @@ patternProperties: "^(reg11|reg18|usb33)$": type: object - $ref: "regulator.yaml#" + $ref: regulator.yaml# required: - compatible diff --git a/Documentation/devicetree/bindings/regulator/ti,tps62360.yaml b/Documentation/devicetree/bindings/regulator/ti,tps62360.yaml index 12aeddedde05..90c39275c150 100644 --- a/Documentation/devicetree/bindings/regulator/ti,tps62360.yaml +++ b/Documentation/devicetree/bindings/regulator/ti,tps62360.yaml @@ -19,7 +19,7 @@ description: | https://www.ti.com/lit/gpn/tps62360 allOf: - - $ref: "regulator.yaml#" + - $ref: regulator.yaml# properties: compatible: diff --git a/Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml b/Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml index dd7a2f92634c..3b16a25ba3b8 100644 --- a/Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml @@ -15,7 +15,7 @@ description: | controller is also embedded. allOf: - - $ref: "regulator.yaml#" + - $ref: regulator.yaml# properties: compatible: diff --git a/Documentation/devicetree/bindings/regulator/wlf,arizona.yaml b/Documentation/devicetree/bindings/regulator/wlf,arizona.yaml index 7b4ae5d23351..011819c10988 100644 --- a/Documentation/devicetree/bindings/regulator/wlf,arizona.yaml +++ b/Documentation/devicetree/bindings/regulator/wlf,arizona.yaml @@ -21,19 +21,19 @@ properties: wlf,ldoena: description: GPIO specifier for the GPIO controlling LDOENA. - $ref: "/schemas/types.yaml#/definitions/phandle-array" + $ref: /schemas/types.yaml#/definitions/phandle-array maxItems: 1 ldo1: description: Initial data for the LDO1 regulator. - $ref: "regulator.yaml#" + $ref: regulator.yaml# type: object micvdd: description: Initial data for the MICVDD regulator. - $ref: "regulator.yaml#" + $ref: regulator.yaml# type: object additionalProperties: true -- cgit v1.2.3 From eef644d3802e7d5b899514dc9c3663a692817162 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 23 Mar 2023 09:33:12 +0100 Subject: regulator: wm8994: Use PROBE_FORCE_SYNCHRONOUS Restore synchronous probing for wm8994 regulators because otherwise the sound device is never initialized on Exynos5250-based Arndale board. Fixes: 259b93b21a9f ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") Signed-off-by: Marek Szyprowski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230323083312.199189-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown --- drivers/regulator/wm8994-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c index 8921051a00e9..2946db448aec 100644 --- a/drivers/regulator/wm8994-regulator.c +++ b/drivers/regulator/wm8994-regulator.c @@ -227,7 +227,7 @@ static struct platform_driver wm8994_ldo_driver = { .probe = wm8994_ldo_probe, .driver = { .name = "wm8994-ldo", - .probe_type = PROBE_PREFER_ASYNCHRONOUS, + .probe_type = PROBE_FORCE_SYNCHRONOUS, }, }; -- cgit v1.2.3 From 557de8d84ae4988b08339032d2f405ef5057e82b Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Thu, 23 Mar 2023 13:20:46 +0000 Subject: regulator: arizona-ldo1: Use PROBE_FORCE_SYNCHRONOUS Restore synchronous probing for Arizona regulators because otherwise the main MFD driver will not find its core supplies. As these regulators are built into the CODEC and typically have no DT representation the regulator framework is unaware of their existence until the driver probes. These means the probing of the driver needs to be synchronous to ensure the regulators are not substitued for the dummy later when the users request them. Fixes: 259b93b21a9f ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230323132047.833737-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown --- drivers/regulator/arizona-ldo1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/arizona-ldo1.c b/drivers/regulator/arizona-ldo1.c index a53d8441702a..b465c0010665 100644 --- a/drivers/regulator/arizona-ldo1.c +++ b/drivers/regulator/arizona-ldo1.c @@ -380,7 +380,7 @@ static struct platform_driver arizona_ldo1_driver = { .remove = arizona_ldo1_remove, .driver = { .name = "arizona-ldo1", - .probe_type = PROBE_PREFER_ASYNCHRONOUS, + .probe_type = PROBE_FORCE_SYNCHRONOUS, }, }; @@ -389,7 +389,7 @@ static struct platform_driver madera_ldo1_driver = { .remove = arizona_ldo1_remove, .driver = { .name = "madera-ldo1", - .probe_type = PROBE_PREFER_ASYNCHRONOUS, + .probe_type = PROBE_FORCE_SYNCHRONOUS, }, }; -- cgit v1.2.3 From b65a0a8edba2c0a03e8fdb03b6807132e4166483 Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Thu, 23 Mar 2023 13:20:47 +0000 Subject: regulator: arizona-micsupp: Use PROBE_FORCE_SYNCHRONOUS Restore synchronous probing for Arizona regulators as the main MFD relies on the ordering of the devices probing. As these regulators are built into the CODEC and typically have no DT representation the regulator framework is unaware of their existence until the driver probes. These means the probing of the driver needs to be synchronous to ensure the regulators are not substitued for the dummy later when the users request them. Fixes: 259b93b21a9f ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230323132047.833737-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown --- drivers/regulator/arizona-micsupp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/arizona-micsupp.c b/drivers/regulator/arizona-micsupp.c index ffd8416487eb..e250e5f3fcbc 100644 --- a/drivers/regulator/arizona-micsupp.c +++ b/drivers/regulator/arizona-micsupp.c @@ -365,7 +365,7 @@ static struct platform_driver arizona_micsupp_driver = { .probe = arizona_micsupp_probe, .driver = { .name = "arizona-micsupp", - .probe_type = PROBE_PREFER_ASYNCHRONOUS, + .probe_type = PROBE_FORCE_SYNCHRONOUS, }, }; @@ -373,7 +373,7 @@ static struct platform_driver madera_micsupp_driver = { .probe = madera_micsupp_probe, .driver = { .name = "madera-micsupp", - .probe_type = PROBE_PREFER_ASYNCHRONOUS, + .probe_type = PROBE_FORCE_SYNCHRONOUS, }, }; -- cgit v1.2.3 From 58973046c1bf782cac01644a9dcd8e5bba9c2f16 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 23 Mar 2023 23:05:18 +0100 Subject: regulator: qcom-rpmh: Use PROBE_FORCE_SYNCHRONOUS Restore synchronous probing for 'qcom,pm8150-rpmh-regulators' because otherwise the UFSHC device is not properly initialized on QRB5165-RB5 board. Fixes: ed6962cc3e05 ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.14 and 4.19") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230323220518.3247530-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown --- drivers/regulator/qcom-rpmh-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index 4826d60e5d95..903032b2875f 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -1462,7 +1462,7 @@ MODULE_DEVICE_TABLE(of, rpmh_regulator_match_table); static struct platform_driver rpmh_regulator_driver = { .driver = { .name = "qcom-rpmh-regulator", - .probe_type = PROBE_PREFER_ASYNCHRONOUS, + .probe_type = PROBE_FORCE_SYNCHRONOUS, .of_match_table = of_match_ptr(rpmh_regulator_match_table), }, .probe = rpmh_regulator_probe, -- cgit v1.2.3 From ad44ac082fdff7ee57fe125432f7d9d7cb610a23 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Fri, 24 Mar 2023 06:34:06 -0700 Subject: regulator: qcom-rpmh: Revert "regulator: qcom-rpmh: Use PROBE_FORCE_SYNCHRONOUS" This reverts commit 58973046c1bf ("regulator: qcom-rpmh: Use PROBE_FORCE_SYNCHRONOUS"). Further digging into the problems that prompted the us to switch to synchronous probe showed that the root cause was a missing "rootwait" in the kernel command line arguments. Let's reinstate asynchronous probe. Fixes: 58973046c1bf ("regulator: qcom-rpmh: Use PROBE_FORCE_SYNCHRONOUS") Cc: Marek Szyprowski Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230324063357.1.Ifdf3625a3c5c9467bd87bfcdf726c884ad220a35@changeid Signed-off-by: Mark Brown --- drivers/regulator/qcom-rpmh-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index 903032b2875f..4826d60e5d95 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -1462,7 +1462,7 @@ MODULE_DEVICE_TABLE(of, rpmh_regulator_match_table); static struct platform_driver rpmh_regulator_driver = { .driver = { .name = "qcom-rpmh-regulator", - .probe_type = PROBE_FORCE_SYNCHRONOUS, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = of_match_ptr(rpmh_regulator_match_table), }, .probe = rpmh_regulator_probe, -- cgit v1.2.3 From 9aa5ef3da6742bb2228308e738c22b49efa6efcc Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 28 Mar 2023 14:00:32 +0800 Subject: dt-bindings: regulator: pf8x00: Remove restrictions for regulator-name Following commit b0de7fa706506 ("regulator: pca9450: Remove restrictions for regulator-name") to remove the constraints on the regulator-name to allow using arbitrary and descriptive names for the regulators. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230328060032.1983381-1-peng.fan@oss.nxp.com Signed-off-by: Mark Brown --- .../bindings/regulator/nxp,pf8x00-regulator.yaml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml index 8c0f37d8d082..6b1c6a176dbe 100644 --- a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml @@ -38,12 +38,6 @@ properties: description: Properties for single LDO regulator. - properties: - regulator-name: - pattern: "^ldo[1-4]$" - description: - should be "ldo1", ..., "ldo4" - unevaluatedProperties: false "^buck[1-7]$": @@ -53,11 +47,6 @@ properties: Properties for single BUCK regulator. properties: - regulator-name: - pattern: "^buck[1-7]$" - description: - should be "buck1", ..., "buck7" - nxp,ilim-ma: $ref: /schemas/types.yaml#/definitions/uint32 minimum: 2100 @@ -90,12 +79,6 @@ properties: description: Properties for single VSNVS regulator. - properties: - regulator-name: - pattern: "^vsnvs$" - description: - should be "vsnvs" - unevaluatedProperties: false additionalProperties: false -- cgit v1.2.3 From e126cdaad15c4206f27b450e5d87391d5066615c Mon Sep 17 00:00:00 2001 From: ChiYuan Huang Date: Wed, 29 Mar 2023 08:43:25 +0800 Subject: regulator: dt-bindings: Add Richtek RT4803 Add the binding document for Richtek RT4803. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1680050606-461-1-git-send-email-cy_huang@richtek.com Signed-off-by: Mark Brown --- .../bindings/regulator/richtek,rt4803.yaml | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt4803.yaml diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt4803.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt4803.yaml new file mode 100644 index 000000000000..6ceba022e550 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/richtek,rt4803.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt4803.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT4803 Boost Regulator + +maintainers: + - ChiYuan Huang + +description: | + RT4803 is a boost regulator that's designed to provide the minimum output + voltage, even if the input voltage is lower than the required voltage. It + supports boost and auto bypass mode that depends on the difference between the + input and output voltage. If the input is lower than the output, mode will + transform to boost mode. Otherwise, turn on bypass switch to enter bypass mode. + + Datasheet is available at + https://www.richtek.com/assets/product_file/RT4803/DS4803-03.pdf + https://www.richtek.com/assets/product_file/RT4803A/DS4803A-06.pdf + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + enum: + - richtek,rt4803 + + reg: + maxItems: 1 + + richtek,vsel-active-high: + type: boolean + description: Specify the VSEL register group is using when system is active + + regulator-allowed-modes: + description: | + Available operating mode + 1: Auto PFM/PWM + 2: Force PWM + items: + enum: [1, 2] + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@75 { + compatible = "richtek,rt4803"; + reg = <0x75>; + richtek,vsel-active-high; + regulator-name = "rt4803-regulator"; + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <4400000>; + regulator-allowed-modes = <1 2>; + regulator-always-on; + }; + }; -- cgit v1.2.3 From 6928a3c082f19404bd41bf33beeae112915dc666 Mon Sep 17 00:00:00 2001 From: ChiYuan Huang Date: Wed, 29 Mar 2023 08:43:26 +0800 Subject: regulator: Add Richtek RT4803 boost regulator RT4803 is a boost converter that integrates an internal bypass FET. It will automatically transform the operation mode between bypass and boost based on the voltage difference of the input and output voltage. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1680050606-461-2-git-send-email-cy_huang@richtek.com Signed-off-by: Mark Brown --- drivers/regulator/Kconfig | 10 +++ drivers/regulator/Makefile | 1 + drivers/regulator/rt4803.c | 216 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 drivers/regulator/rt4803.c diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index d8ee041212df..e5f3613c15fa 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1082,6 +1082,16 @@ config REGULATOR_RT4801 This adds support for voltage regulators in Richtek RT4801 Display Bias IC. The device supports two regulators (DSVP/DSVN). +config REGULATOR_RT4803 + tristate "Richtek RT4803 boost regualtor" + depends on I2C + select REGMAP_I2C + help + This adds support for RT4803 boost converter that integrates the + bypass switch. If the input voltage is low than the required voltage, + RT4803 will enter boost mode. Otherwise, enable internal bypass + switch to enter bypass mode. + config REGULATOR_RT4831 tristate "Richtek RT4831 DSV Regulators" depends on MFD_RT4831 diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index a9fe73309d9e..58dfe0147cd4 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -130,6 +130,7 @@ obj-$(CONFIG_REGULATOR_RK808) += rk808-regulator.o obj-$(CONFIG_REGULATOR_RN5T618) += rn5t618-regulator.o obj-$(CONFIG_REGULATOR_ROHM) += rohm-regulator.o obj-$(CONFIG_REGULATOR_RT4801) += rt4801-regulator.o +obj-$(CONFIG_REGULATOR_RT4803) += rt4803.o obj-$(CONFIG_REGULATOR_RT4831) += rt4831-regulator.o obj-$(CONFIG_REGULATOR_RT5033) += rt5033-regulator.o obj-$(CONFIG_REGULATOR_RT5120) += rt5120-regulator.o diff --git a/drivers/regulator/rt4803.c b/drivers/regulator/rt4803.c new file mode 100644 index 000000000000..c96fb026dc10 --- /dev/null +++ b/drivers/regulator/rt4803.c @@ -0,0 +1,216 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2023 Richtek Technology Corp. + * + * Author: ChiYuan Huang + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define RT4803_AUTO_MODE 1 +#define RT4803_FPWM_MODE 2 + +#define RT4803_REG_CONFIG 0x01 +#define RT4803_REG_VSELL 0x02 +#define RT4803_REG_VSELH 0x03 +#define RT4803_REG_ILIM 0x04 +#define RT4803_REG_STAT 0x05 + +#define RT4803_MODE_MASK GENMASK(1, 0) +#define RT4803_VSEL_MASK GENMASK(4, 0) +#define RT4803_ILIM_MASK GENMASK(3, 0) +#define RT4803_TSD_MASK BIT(7) +#define RT4803_HOTDIE_MASK BIT(6) +#define RT4803_FAULT_MASK BIT(1) +#define RT4803_PGOOD_MASK BIT(0) + +#define RT4803_VOUT_MINUV 2850000 +#define RT4803_VOUT_STEPUV 50000 +#define RT4803_VOUT_NUM 32 + +static int rt4803_set_mode(struct regulator_dev *rdev, unsigned int mode) +{ + struct regmap *regmap = rdev_get_regmap(rdev); + unsigned int modeval; + + switch (mode) { + case REGULATOR_MODE_NORMAL: + modeval = RT4803_AUTO_MODE; + break; + case REGULATOR_MODE_FAST: + modeval = RT4803_FPWM_MODE; + break; + default: + return -EINVAL; + } + + modeval <<= ffs(RT4803_MODE_MASK) - 1; + + return regmap_update_bits(regmap, RT4803_REG_CONFIG, RT4803_MODE_MASK, modeval); +} + +static unsigned int rt4803_get_mode(struct regulator_dev *rdev) +{ + struct regmap *regmap = rdev_get_regmap(rdev); + unsigned int modeval; + int ret; + + ret = regmap_read(regmap, RT4803_REG_CONFIG, &modeval); + if (ret) + return REGULATOR_MODE_INVALID; + + modeval >>= ffs(RT4803_MODE_MASK) - 1; + + switch (modeval) { + case RT4803_AUTO_MODE: + return REGULATOR_MODE_NORMAL; + case RT4803_FPWM_MODE: + return REGULATOR_MODE_FAST; + default: + return REGULATOR_MODE_INVALID; + } +} + +static int rt4803_get_error_flags(struct regulator_dev *rdev, unsigned int *flags) +{ + struct regmap *regmap = rdev_get_regmap(rdev); + unsigned int state, events = 0; + int ret; + + ret = regmap_read(regmap, RT4803_REG_STAT, &state); + if (ret) + return ret; + + if (state & RT4803_PGOOD_MASK) + goto out_error_flag; + + if (state & RT4803_FAULT_MASK) + events |= REGULATOR_ERROR_FAIL; + + if (state & RT4803_HOTDIE_MASK) + events |= REGULATOR_ERROR_OVER_TEMP_WARN; + + if (state & RT4803_TSD_MASK) + events |= REGULATOR_ERROR_OVER_TEMP; + +out_error_flag: + *flags = events; + return 0; +} + +static int rt4803_set_suspend_voltage(struct regulator_dev *rdev, int uV) +{ + struct regmap *regmap = rdev_get_regmap(rdev); + unsigned int reg, vsel; + + if (rdev->desc->vsel_reg == RT4803_REG_VSELL) + reg = RT4803_REG_VSELH; + else + reg = RT4803_REG_VSELL; + + vsel = (uV - rdev->desc->min_uV) / rdev->desc->uV_step; + vsel <<= ffs(RT4803_VSEL_MASK) - 1; + + return regmap_update_bits(regmap, reg, RT4803_VSEL_MASK, vsel); +} + +static const struct regulator_ops rt4803_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_mode = rt4803_set_mode, + .get_mode = rt4803_get_mode, + .get_error_flags = rt4803_get_error_flags, + .set_suspend_voltage = rt4803_set_suspend_voltage, +}; + +static unsigned int rt4803_of_map_mode(unsigned int mode) +{ + switch (mode) { + case RT4803_AUTO_MODE: + return REGULATOR_MODE_NORMAL; + case RT4803_FPWM_MODE: + return REGULATOR_MODE_FAST; + default: + return REGULATOR_MODE_INVALID; + } +} + +static const struct regmap_config rt4803_regmap_config = { + .reg_bits = 8, + .val_bits = 8, + .max_register = RT4803_REG_STAT, +}; + +static int rt4803_probe(struct i2c_client *i2c) +{ + struct device *dev = &i2c->dev; + struct regmap *regmap; + struct regulator_desc *desc; + struct regulator_config cfg = {}; + struct regulator_dev *rdev; + bool vsel_act_high; + int ret; + + desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); + if (!desc) + return -ENOMEM; + + regmap = devm_regmap_init_i2c(i2c, &rt4803_regmap_config); + if (IS_ERR(regmap)) + return dev_err_probe(dev, PTR_ERR(regmap), "Failed to init regmap\n"); + + /* Always configure the input current limit to max 5A at initial */ + ret = regmap_update_bits(regmap, RT4803_REG_ILIM, RT4803_ILIM_MASK, 0xff); + if (ret) + return dev_err_probe(dev, ret, "Failed to config ILIM to max\n"); + + vsel_act_high = device_property_read_bool(dev, "richtek,vsel-active-high"); + + desc->name = "rt4803-regulator"; + desc->type = REGULATOR_VOLTAGE; + desc->owner = THIS_MODULE; + desc->ops = &rt4803_regulator_ops; + desc->min_uV = RT4803_VOUT_MINUV; + desc->uV_step = RT4803_VOUT_STEPUV; + desc->n_voltages = RT4803_VOUT_NUM; + desc->vsel_mask = RT4803_VSEL_MASK; + desc->of_map_mode = rt4803_of_map_mode; + if (vsel_act_high) + desc->vsel_reg = RT4803_REG_VSELH; + else + desc->vsel_reg = RT4803_REG_VSELL; + + cfg.dev = dev; + cfg.of_node = dev_of_node(dev); + cfg.init_data = of_get_regulator_init_data(dev, dev_of_node(dev), desc); + + rdev = devm_regulator_register(dev, desc, &cfg); + return PTR_ERR_OR_ZERO(rdev); +} + +static const struct of_device_id rt4803_device_match_table[] = { + { .compatible = "richtek,rt4803" }, + {} +}; +MODULE_DEVICE_TABLE(of, rt4803_device_match_table); + +static struct i2c_driver rt4803_driver = { + .driver = { + .name = "rt4803", + .of_match_table = rt4803_device_match_table, + }, + .probe = rt4803_probe, +}; +module_i2c_driver(rt4803_driver); + +MODULE_DESCRIPTION("Richtek RT4803 voltage regulator driver"); +MODULE_AUTHOR("ChiYuan Huang "); +MODULE_LICENSE("GPL"); -- cgit v1.2.3 From fc4fef625decc80cf3a72e884a4e37288bfa0f9b Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Sat, 25 Mar 2023 17:54:40 +0530 Subject: regulator: dt-bindings: qcom,rpmh: Add compatible for PMC8180 Commit 71ca776a8885 ("regulator: qcom-rpmh: Add pmc8180 and pmc8180c") introduced these compatible's but the yaml conversion commit 7255f98d08c7 ("regulator: Convert RPMh regulator bindings to YAML") seems to have dropped it So bring it back! Signed-off-by: Vinod Koul Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230325122444.249507-9-vkoul@kernel.org Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml index a765837dc069..7002d2654382 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml @@ -75,6 +75,8 @@ properties: - qcom,pm8550ve-rpmh-regulators - qcom,pm8550vs-rpmh-regulators - qcom,pm8998-rpmh-regulators + - qcom,pmc8180-rpmh-regulators + - qcom,pmc8180c-rpmh-regulators - qcom,pmg1110-rpmh-regulators - qcom,pmi8998-rpmh-regulators - qcom,pmm8155au-rpmh-regulators @@ -232,6 +234,7 @@ allOf: compatible: enum: - qcom,pm8150-rpmh-regulators + - qcom,pmc8180-rpmh-regulators - qcom,pmm8155au-rpmh-regulators then: properties: @@ -249,6 +252,7 @@ allOf: compatible: enum: - qcom,pm8150l-rpmh-regulators + - qcom,pmc8180c-rpmh-regulators then: properties: vdd-bob-supply: -- cgit v1.2.3 From b83a1772be854f87602de14726737d3e5b06e1f4 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Wed, 29 Mar 2023 14:33:53 -0700 Subject: regulator: core: Consistently set mutex_owner when using ww_mutex_lock_slow() When a codepath locks a rdev using ww_mutex_lock_slow() directly then that codepath is responsible for incrementing the "ref_cnt" and also setting the "mutex_owner" to "current". The regulator core consistently got that right for "ref_cnt" but didn't always get it right for "mutex_owner". Let's fix this. It's unlikely that this truly matters because the "mutex_owner" is only needed if we're going to do subsequent locking of the same rdev. However, even though it's not truly needed it seems less surprising if we consistently set "mutex_owner" properly. Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230329143317.RFC.v2.1.I4e9d433ea26360c06dd1381d091c82bb1a4ce843@changeid Signed-off-by: Mark Brown --- drivers/regulator/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 1490eb40c973..9a13240f3084 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -334,6 +334,7 @@ static void regulator_lock_dependent(struct regulator_dev *rdev, ww_mutex_lock_slow(&new_contended_rdev->mutex, ww_ctx); old_contended_rdev = new_contended_rdev; old_contended_rdev->ref_cnt++; + old_contended_rdev->mutex_owner = current; } err = regulator_lock_recursive(rdev, @@ -6048,6 +6049,7 @@ static void regulator_summary_lock(struct ww_acquire_ctx *ww_ctx) ww_mutex_lock_slow(&new_contended_rdev->mutex, ww_ctx); old_contended_rdev = new_contended_rdev; old_contended_rdev->ref_cnt++; + old_contended_rdev->mutex_owner = current; } err = regulator_summary_lock_all(ww_ctx, -- cgit v1.2.3 From cba6cfdc7c3f1516f0d08ddfb24e689af0932573 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Wed, 29 Mar 2023 14:33:54 -0700 Subject: regulator: core: Avoid lockdep reports when resolving supplies An automated bot told me that there was a potential lockdep problem with regulators. This was on the chromeos-5.15 kernel, but I see nothing that would be different downstream compared to upstream. The bot said: ============================================ WARNING: possible recursive locking detected 5.15.104-lockdep-17461-gc1e499ed6604 #1 Not tainted -------------------------------------------- kworker/u16:4/115 is trying to acquire lock: ffffff8083110170 (regulator_ww_class_mutex){+.+.}-{3:3}, at: create_regulator+0x398/0x7ec but task is already holding lock: ffffff808378e170 (regulator_ww_class_mutex){+.+.}-{3:3}, at: ww_mutex_trylock+0x3c/0x7b8 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(regulator_ww_class_mutex); lock(regulator_ww_class_mutex); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by kworker/u16:4/115: #0: ffffff808006a948 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x520/0x1348 #1: ffffffc00e0a7cc0 ((work_completion)(&entry->work)){+.+.}-{0:0}, at: process_one_work+0x55c/0x1348 #2: ffffff80828a2260 (&dev->mutex){....}-{3:3}, at: __device_attach_async_helper+0xd0/0x2a4 #3: ffffff808378e170 (regulator_ww_class_mutex){+.+.}-{3:3}, at: ww_mutex_trylock+0x3c/0x7b8 stack backtrace: CPU: 2 PID: 115 Comm: kworker/u16:4 Not tainted 5.15.104-lockdep-17461-gc1e499ed6604 #1 9292e52fa83c0e23762b2b3aa1bacf5787a4d5da Hardware name: Google Quackingstick (rev0+) (DT) Workqueue: events_unbound async_run_entry_fn Call trace: dump_backtrace+0x0/0x4ec show_stack+0x34/0x50 dump_stack_lvl+0xdc/0x11c dump_stack+0x1c/0x48 __lock_acquire+0x16d4/0x6c74 lock_acquire+0x208/0x750 __mutex_lock_common+0x11c/0x11f8 ww_mutex_lock+0xc0/0x440 create_regulator+0x398/0x7ec regulator_resolve_supply+0x654/0x7c4 regulator_register_resolve_supply+0x30/0x120 class_for_each_device+0x1b8/0x230 regulator_register+0x17a4/0x1f40 devm_regulator_register+0x60/0xd0 reg_fixed_voltage_probe+0x728/0xaec platform_probe+0x150/0x1c8 really_probe+0x274/0xa20 __driver_probe_device+0x1dc/0x3f4 driver_probe_device+0x78/0x1c0 __device_attach_driver+0x1ac/0x2c8 bus_for_each_drv+0x11c/0x190 __device_attach_async_helper+0x1e4/0x2a4 async_run_entry_fn+0xa0/0x3ac process_one_work+0x638/0x1348 worker_thread+0x4a8/0x9c4 kthread+0x2e4/0x3a0 ret_from_fork+0x10/0x20 The problem was first reported soon after we made many of the regulators probe asynchronously, though nothing I've seen implies that the problems couldn't have also happened even without that. I haven't personally been able to reproduce the lockdep issue, but the issue does look somewhat legitimate. Specifically, it looks like in regulator_resolve_supply() we are holding a "rdev" lock while calling set_supply() -> create_regulator() which grabs the lock of a _different_ "rdev" (the one for our supply). This is not necessarily safe from a lockdep perspective since there is no documented ordering between these two locks. In reality, we should always be locking a regulator before the supplying regulator, so I don't expect there to be any real deadlocks in practice. However, the regulator framework in general doesn't express this to lockdep. Let's fix the issue by simply grabbing the two locks involved in the same way we grab multiple locks elsewhere in the regulator framework: using the "wound/wait" mechanisms. Fixes: eaa7995c529b ("regulator: core: avoid regulator_resolve_supply() race condition") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230329143317.RFC.v2.2.I30d8e1ca10cfbe5403884cdd192253a2e063eb9e@changeid Signed-off-by: Mark Brown --- drivers/regulator/core.c | 91 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 83 insertions(+), 8 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 9a13240f3084..08726bc0da9d 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -207,6 +207,78 @@ static void regulator_unlock(struct regulator_dev *rdev) mutex_unlock(®ulator_nesting_mutex); } +/** + * regulator_lock_two - lock two regulators + * @rdev1: first regulator + * @rdev2: second regulator + * @ww_ctx: w/w mutex acquire context + * + * Locks both rdevs using the regulator_ww_class. + */ +static void regulator_lock_two(struct regulator_dev *rdev1, + struct regulator_dev *rdev2, + struct ww_acquire_ctx *ww_ctx) +{ + struct regulator_dev *tmp; + int ret; + + ww_acquire_init(ww_ctx, ®ulator_ww_class); + + /* Try to just grab both of them */ + ret = regulator_lock_nested(rdev1, ww_ctx); + WARN_ON(ret); + ret = regulator_lock_nested(rdev2, ww_ctx); + if (ret != -EDEADLOCK) { + WARN_ON(ret); + goto exit; + } + + while (true) { + /* + * Start of loop: rdev1 was locked and rdev2 was contended. + * Need to unlock rdev1, slowly lock rdev2, then try rdev1 + * again. + */ + regulator_unlock(rdev1); + + ww_mutex_lock_slow(&rdev2->mutex, ww_ctx); + rdev2->ref_cnt++; + rdev2->mutex_owner = current; + ret = regulator_lock_nested(rdev1, ww_ctx); + + if (ret == -EDEADLOCK) { + /* More contention; swap which needs to be slow */ + tmp = rdev1; + rdev1 = rdev2; + rdev2 = tmp; + } else { + WARN_ON(ret); + break; + } + } + +exit: + ww_acquire_done(ww_ctx); +} + +/** + * regulator_unlock_two - unlock two regulators + * @rdev1: first regulator + * @rdev2: second regulator + * @ww_ctx: w/w mutex acquire context + * + * The inverse of regulator_lock_two(). + */ + +static void regulator_unlock_two(struct regulator_dev *rdev1, + struct regulator_dev *rdev2, + struct ww_acquire_ctx *ww_ctx) +{ + regulator_unlock(rdev2); + regulator_unlock(rdev1); + ww_acquire_fini(ww_ctx); +} + static bool regulator_supply_is_couple(struct regulator_dev *rdev) { struct regulator_dev *c_rdev; @@ -1627,8 +1699,8 @@ static int set_machine_constraints(struct regulator_dev *rdev) /** * set_supply - set regulator supply regulator - * @rdev: regulator name - * @supply_rdev: supply regulator name + * @rdev: regulator (locked) + * @supply_rdev: supply regulator (locked)) * * Called by platform initialisation code to set the supply regulator for this * regulator. This ensures that a regulators supply will also be enabled by the @@ -1800,6 +1872,8 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, struct regulator *regulator; int err = 0; + lockdep_assert_held_once(&rdev->mutex.base); + if (dev) { char buf[REG_STR_SIZE]; int size; @@ -1827,9 +1901,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, regulator->rdev = rdev; regulator->supply_name = supply_name; - regulator_lock(rdev); list_add(®ulator->list, &rdev->consumer_list); - regulator_unlock(rdev); if (dev) { regulator->dev = dev; @@ -1995,6 +2067,7 @@ static int regulator_resolve_supply(struct regulator_dev *rdev) { struct regulator_dev *r; struct device *dev = rdev->dev.parent; + struct ww_acquire_ctx ww_ctx; int ret = 0; /* No supply to resolve? */ @@ -2061,23 +2134,23 @@ static int regulator_resolve_supply(struct regulator_dev *rdev) * between rdev->supply null check and setting rdev->supply in * set_supply() from concurrent tasks. */ - regulator_lock(rdev); + regulator_lock_two(rdev, r, &ww_ctx); /* Supply just resolved by a concurrent task? */ if (rdev->supply) { - regulator_unlock(rdev); + regulator_unlock_two(rdev, r, &ww_ctx); put_device(&r->dev); goto out; } ret = set_supply(rdev, r); if (ret < 0) { - regulator_unlock(rdev); + regulator_unlock_two(rdev, r, &ww_ctx); put_device(&r->dev); goto out; } - regulator_unlock(rdev); + regulator_unlock_two(rdev, r, &ww_ctx); /* * In set_machine_constraints() we may have turned this regulator on @@ -2190,7 +2263,9 @@ struct regulator *_regulator_get(struct device *dev, const char *id, return regulator; } + regulator_lock(rdev); regulator = create_regulator(rdev, dev, id); + regulator_unlock(rdev); if (regulator == NULL) { regulator = ERR_PTR(-ENOMEM); module_put(rdev->owner); -- cgit v1.2.3 From 65f1b1dc0cc90236ed9be3970f4a763e853f3aab Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Thu, 6 Apr 2023 21:28:10 +0200 Subject: regulator: qcom-rpmh: add support for pmm8654au regulators Add the RPMH regulators exposed by the PMM8654au PMIC and its variants. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230406192811.460888-3-brgl@bgdev.pl Signed-off-by: Mark Brown --- drivers/regulator/qcom-rpmh-regulator.c | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index 4826d60e5d95..b0a58c62b1e2 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -694,6 +694,16 @@ static const struct rpmh_vreg_hw_data pmic5_pldo_lv = { .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, }; +static const struct rpmh_vreg_hw_data pmic5_pldo515_mv = { + .regulator_type = VRM, + .ops = &rpmh_regulator_vrm_drms_ops, + .voltage_range = REGULATOR_LINEAR_RANGE(1800000, 0, 187, 8000), + .n_voltages = 188, + .hpm_min_load_uA = 10000, + .pmic_mode_map = pmic_mode_map_pmic5_ldo, + .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, +}; + static const struct rpmh_vreg_hw_data pmic5_nldo = { .regulator_type = VRM, .ops = &rpmh_regulator_vrm_drms_ops, @@ -704,6 +714,16 @@ static const struct rpmh_vreg_hw_data pmic5_nldo = { .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, }; +static const struct rpmh_vreg_hw_data pmic5_nldo515 = { + .regulator_type = VRM, + .ops = &rpmh_regulator_vrm_drms_ops, + .voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 210, 8000), + .n_voltages = 211, + .hpm_min_load_uA = 30000, + .pmic_mode_map = pmic_mode_map_pmic5_ldo, + .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, +}; + static const struct rpmh_vreg_hw_data pmic5_hfsmps510 = { .regulator_type = VRM, .ops = &rpmh_regulator_vrm_ops, @@ -749,6 +769,15 @@ static const struct rpmh_vreg_hw_data pmic5_ftsmps525_mv = { .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, }; +static const struct rpmh_vreg_hw_data pmic5_ftsmps527 = { + .regulator_type = VRM, + .ops = &rpmh_regulator_vrm_ops, + .voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 215, 8000), + .n_voltages = 215, + .pmic_mode_map = pmic_mode_map_pmic5_smps, + .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, +}; + static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = { .regulator_type = VRM, .ops = &rpmh_regulator_vrm_ops, @@ -937,6 +966,28 @@ static const struct rpmh_vreg_init_data pmm8155au_vreg_data[] = { {} }; +static const struct rpmh_vreg_init_data pmm8654au_vreg_data[] = { + RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps527, "vdd-s1"), + RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps527, "vdd-s2"), + RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps527, "vdd-s3"), + RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps527, "vdd-s4"), + RPMH_VREG("smps5", "smp%s5", &pmic5_ftsmps527, "vdd-s5"), + RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps527, "vdd-s6"), + RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps527, "vdd-s7"), + RPMH_VREG("smps8", "smp%s8", &pmic5_ftsmps527, "vdd-s8"), + RPMH_VREG("smps9", "smp%s9", &pmic5_ftsmps527, "vdd-s9"), + RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo515, "vdd-s9"), + RPMH_VREG("ldo2", "ldo%s2", &pmic5_nldo515, "vdd-l2-l3"), + RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo515, "vdd-l2-l3"), + RPMH_VREG("ldo4", "ldo%s4", &pmic5_nldo515, "vdd-s9"), + RPMH_VREG("ldo5", "ldo%s5", &pmic5_nldo515, "vdd-s9"), + RPMH_VREG("ldo6", "ldo%s6", &pmic5_nldo515, "vdd-l6-l7"), + RPMH_VREG("ldo7", "ldo%s7", &pmic5_nldo515, "vdd-l6-l7"), + RPMH_VREG("ldo8", "ldo%s8", &pmic5_pldo515_mv, "vdd-l8-l9"), + RPMH_VREG("ldo9", "ldo%s9", &pmic5_pldo, "vdd-l8-l9"), + {} +}; + static const struct rpmh_vreg_init_data pm8350_vreg_data[] = { RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps510, "vdd-s1"), RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps510, "vdd-s2"), @@ -1431,6 +1482,10 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = { .compatible = "qcom,pmm8155au-rpmh-regulators", .data = pmm8155au_vreg_data, }, + { + .compatible = "qcom,pmm8654au-rpmh-regulators", + .data = pmm8654au_vreg_data, + }, { .compatible = "qcom,pmx55-rpmh-regulators", .data = pmx55_vreg_data, -- cgit v1.2.3 From ba0887a6b94ea7f77df1e464aeca45758b4d92c3 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Thu, 6 Apr 2023 21:28:09 +0200 Subject: regulator: qcom,rpmh: add compatible for pmm8654au RPMH Add the compatible for the pmm8654au RPMH regulators present on the sa8775p-ride development board. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230406192811.460888-2-brgl@bgdev.pl Signed-off-by: Mark Brown --- .../bindings/regulator/qcom,rpmh-regulator.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml index 7002d2654382..f879ccbb3767 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml @@ -80,6 +80,7 @@ properties: - qcom,pmg1110-rpmh-regulators - qcom,pmi8998-rpmh-regulators - qcom,pmm8155au-rpmh-regulators + - qcom,pmm8654au-rpmh-regulators - qcom,pmr735a-rpmh-regulators - qcom,pmx55-rpmh-regulators - qcom,pmx65-rpmh-regulators @@ -247,6 +248,22 @@ allOf: patternProperties: "^vdd-s([1-9]|10)-supply$": true + - if: + properties: + compatible: + enum: + - qcom,pmm8654au-rpmh-regulators + then: + properties: + vdd-l1-supply: true + vdd-l2-l3-supply: true + vdd-l4-supply: true + vdd-l5-supply: true + vdd-l6-l7-supply: true + vdd-l8-l9-supply: true + patternProperties: + "^vdd-s[1-9]-supply$": true + - if: properties: compatible: -- cgit v1.2.3 From e953450cf0f622e3249202e985c79d3faf9a58f2 Mon Sep 17 00:00:00 2001 From: Devi Priya Date: Fri, 7 Apr 2023 21:27:23 +0530 Subject: regulator: qcom_smd: Add s1 sub-node to mp5496 regulator Adding s1 sub-node entry to mp5496 regulator node. Reviewed-by: Rob Herring Signed-off-by: Devi Priya Link: https://lore.kernel.org/r/20230407155727.20615-2-quic_devipriy@quicinc.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml index 8c45f53212b1..a8ca8e0b27f8 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml @@ -22,7 +22,7 @@ description: Each sub-node is identified using the node's name, with valid values listed for each of the pmics below. - For mp5496, s2 + For mp5496, s1, s2 For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22 -- cgit v1.2.3 From 60bbee7db43b97bf8c0978cc91f78d1746351871 Mon Sep 17 00:00:00 2001 From: Devi Priya Date: Fri, 7 Apr 2023 21:27:24 +0530 Subject: regulator: qcom_smd: Add MP5496 S1 regulator Adding support for MP5496 S1 regulator on IPQ9574 SoC. Co-developed-by: Praveenkumar I Signed-off-by: Praveenkumar I Signed-off-by: Devi Priya Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230407155727.20615-3-quic_devipriy@quicinc.com Signed-off-by: Mark Brown --- drivers/regulator/qcom_smd-regulator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c index 6f722b2d682e..18189f35db68 100644 --- a/drivers/regulator/qcom_smd-regulator.c +++ b/drivers/regulator/qcom_smd-regulator.c @@ -749,7 +749,7 @@ static const struct regulator_desc pms405_pldo600 = { .ops = &rpm_smps_ldo_ops, }; -static const struct regulator_desc mp5496_smpa2 = { +static const struct regulator_desc mp5496_smps = { .linear_ranges = (struct linear_range[]) { REGULATOR_LINEAR_RANGE(600000, 0, 127, 12500), }, @@ -794,7 +794,8 @@ struct rpm_regulator_data { }; static const struct rpm_regulator_data rpm_mp5496_regulators[] = { - { "s2", QCOM_SMD_RPM_SMPA, 2, &mp5496_smpa2, "s2" }, + { "s1", QCOM_SMD_RPM_SMPA, 1, &mp5496_smps, "s1" }, + { "s2", QCOM_SMD_RPM_SMPA, 2, &mp5496_smps, "s2" }, { "l2", QCOM_SMD_RPM_LDOA, 2, &mp5496_ldoa2, "l2" }, {} }; -- cgit v1.2.3 From e7abf7134beaeb9be9075214a32863e06cde4a0b Mon Sep 17 00:00:00 2001 From: Cristian Ciocaltea Date: Thu, 6 Apr 2023 22:41:51 +0300 Subject: regulator: dt-bindings: fcs,fan53555: Add support for RK860X Add compatibles to support Rockchip RK860X regulators. RK8600/RK8601 are pretty similar to the FAN53555 regulators, while RK8602/RK8603 are a bit different, having a wider voltage selection range. Signed-off-by: Cristian Ciocaltea Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230406194158.963352-2-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown --- .../devicetree/bindings/regulator/fcs,fan53555.yaml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/fcs,fan53555.yaml b/Documentation/devicetree/bindings/regulator/fcs,fan53555.yaml index c0dbba843f70..69bae90fc4b2 100644 --- a/Documentation/devicetree/bindings/regulator/fcs,fan53555.yaml +++ b/Documentation/devicetree/bindings/regulator/fcs,fan53555.yaml @@ -14,12 +14,21 @@ allOf: properties: compatible: - enum: - - fcs,fan53555 - - fcs,fan53526 - - silergy,syr827 - - silergy,syr828 - - tcs,tcs4525 + oneOf: + - enum: + - fcs,fan53555 + - fcs,fan53526 + - rockchip,rk8600 + - rockchip,rk8602 + - silergy,syr827 + - silergy,syr828 + - tcs,tcs4525 + - items: + - const: rockchip,rk8601 + - const: rockchip,rk8600 + - items: + - const: rockchip,rk8603 + - const: rockchip,rk8602 reg: maxItems: 1 -- cgit v1.2.3 From d5edc0e36bb1657d2c46b7521010d4f0894a5c74 Mon Sep 17 00:00:00 2001 From: Cristian Ciocaltea Date: Thu, 6 Apr 2023 22:41:54 +0300 Subject: regulator: fan53555: Remove unused *_SLEW_SHIFT definitions Commit b61ac767db4d ("regulator: fan53555: Convert to use regulator_set_ramp_delay_regmap") removed the slew_shift member from struct fan53555_device_info, hence the {CTL,TCS}_SLEW_SHIFT definitions remained unused. Drop them. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406194158.963352-5-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown --- drivers/regulator/fan53555.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 41537c45f036..cdab382ce4b8 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -49,7 +49,6 @@ /* Control bit definitions */ #define CTL_OUTPUT_DISCHG (1 << 7) #define CTL_SLEW_MASK (0x7 << 4) -#define CTL_SLEW_SHIFT 4 #define CTL_RESET (1 << 2) #define CTL_MODE_VSEL0_MODE BIT(0) #define CTL_MODE_VSEL1_MODE BIT(1) @@ -60,7 +59,6 @@ #define TCS_VSEL0_MODE (1 << 7) #define TCS_VSEL1_MODE (1 << 6) -#define TCS_SLEW_SHIFT 3 #define TCS_SLEW_MASK GENMASK(4, 3) enum fan53555_vendor { -- cgit v1.2.3 From d25016618c0845b2a0f9ae64d084a66efd39b03c Mon Sep 17 00:00:00 2001 From: Cristian Ciocaltea Date: Thu, 6 Apr 2023 22:41:55 +0300 Subject: regulator: fan53555: Make use of the bit macros For consistency and improved clarity, use BIT() and GENMASK() macros for defining the bitfields inside the registers. No functional changes intended. While here, also fix DIE_{ID,REV} inconsistent indentation. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406194158.963352-6-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown --- drivers/regulator/fan53555.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index cdab382ce4b8..16a0f11601f8 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -41,23 +41,23 @@ #define FAN53555_MONITOR 0x05 /* VSEL bit definitions */ -#define VSEL_BUCK_EN (1 << 7) -#define VSEL_MODE (1 << 6) +#define VSEL_BUCK_EN BIT(7) +#define VSEL_MODE BIT(6) /* Chip ID and Verison */ -#define DIE_ID 0x0F /* ID1 */ -#define DIE_REV 0x0F /* ID2 */ +#define DIE_ID 0x0F /* ID1 */ +#define DIE_REV 0x0F /* ID2 */ /* Control bit definitions */ -#define CTL_OUTPUT_DISCHG (1 << 7) -#define CTL_SLEW_MASK (0x7 << 4) -#define CTL_RESET (1 << 2) +#define CTL_OUTPUT_DISCHG BIT(7) +#define CTL_SLEW_MASK GENMASK(6, 4) +#define CTL_RESET BIT(2) #define CTL_MODE_VSEL0_MODE BIT(0) #define CTL_MODE_VSEL1_MODE BIT(1) #define FAN53555_NVOLTAGES 64 /* Numbers of voltages */ #define FAN53526_NVOLTAGES 128 -#define TCS_VSEL0_MODE (1 << 7) -#define TCS_VSEL1_MODE (1 << 6) +#define TCS_VSEL0_MODE BIT(7) +#define TCS_VSEL1_MODE BIT(6) #define TCS_SLEW_MASK GENMASK(4, 3) -- cgit v1.2.3 From 6bb18339c6b54e0241344280fe4d14909db9356c Mon Sep 17 00:00:00 2001 From: Cristian Ciocaltea Date: Thu, 6 Apr 2023 22:41:56 +0300 Subject: regulator: fan53555: Improve vsel_mask computation In preparation for introducing support for additional regulators which do not use the maximum number of voltage selectors available for a given mask, improve the mask computation formula by using fls(). Note fls() requires the bitops header, hence include it explicitly and drop bits.h which is already pulled by bitops.h. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406194158.963352-7-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown --- drivers/regulator/fan53555.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 16a0f11601f8..997cecd77971 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -8,7 +8,7 @@ // Copyright (c) 2012 Marvell Technology Ltd. // Yunfan Zhang -#include +#include #include #include #include @@ -486,7 +486,7 @@ static int fan53555_regulator_register(struct fan53555_device_info *di, rdesc->min_uV = di->vsel_min; rdesc->uV_step = di->vsel_step; rdesc->vsel_reg = di->vol_reg; - rdesc->vsel_mask = di->vsel_count - 1; + rdesc->vsel_mask = BIT(fls(di->vsel_count - 1)) - 1; rdesc->ramp_reg = di->slew_reg; rdesc->ramp_mask = di->slew_mask; rdesc->ramp_delay_table = di->ramp_delay_table; -- cgit v1.2.3 From 2c82f5b8ae6d0b5bbac1526021d9c3120d183555 Mon Sep 17 00:00:00 2001 From: Cristian Ciocaltea Date: Thu, 6 Apr 2023 22:41:57 +0300 Subject: regulator: fan53555: Use dev_err_probe Use dev_err_probe() instead of dev_err() in the probe function, which ensures the error code is always printed and, additionally, simplifies the code a bit. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406194158.963352-8-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown --- drivers/regulator/fan53555.c | 47 ++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 997cecd77971..7e54518c0708 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -568,10 +568,9 @@ static int fan53555_regulator_probe(struct i2c_client *client) if (!pdata) pdata = fan53555_parse_dt(&client->dev, np, &di->desc); - if (!pdata || !pdata->regulator) { - dev_err(&client->dev, "Platform data not found!\n"); - return -ENODEV; - } + if (!pdata || !pdata->regulator) + return dev_err_probe(&client->dev, -ENODEV, + "Platform data not found!\n"); di->regulator = pdata->regulator; if (client->dev.of_node) { @@ -580,10 +579,9 @@ static int fan53555_regulator_probe(struct i2c_client *client) } else { /* if no ramp constraint set, get the pdata ramp_delay */ if (!di->regulator->constraints.ramp_delay) { - if (pdata->slew_rate >= ARRAY_SIZE(slew_rates)) { - dev_err(&client->dev, "Invalid slew_rate\n"); - return -EINVAL; - } + if (pdata->slew_rate >= ARRAY_SIZE(slew_rates)) + return dev_err_probe(&client->dev, -EINVAL, + "Invalid slew_rate\n"); di->regulator->constraints.ramp_delay = slew_rates[pdata->slew_rate]; @@ -593,34 +591,31 @@ static int fan53555_regulator_probe(struct i2c_client *client) } regmap = devm_regmap_init_i2c(client, &fan53555_regmap_config); - if (IS_ERR(regmap)) { - dev_err(&client->dev, "Failed to allocate regmap!\n"); - return PTR_ERR(regmap); - } + if (IS_ERR(regmap)) + return dev_err_probe(&client->dev, PTR_ERR(regmap), + "Failed to allocate regmap!\n"); + di->dev = &client->dev; i2c_set_clientdata(client, di); /* Get chip ID */ ret = regmap_read(regmap, FAN53555_ID1, &val); - if (ret < 0) { - dev_err(&client->dev, "Failed to get chip ID!\n"); - return ret; - } + if (ret < 0) + return dev_err_probe(&client->dev, ret, "Failed to get chip ID!\n"); + di->chip_id = val & DIE_ID; /* Get chip revision */ ret = regmap_read(regmap, FAN53555_ID2, &val); - if (ret < 0) { - dev_err(&client->dev, "Failed to get chip Rev!\n"); - return ret; - } + if (ret < 0) + return dev_err_probe(&client->dev, ret, "Failed to get chip Rev!\n"); + di->chip_rev = val & DIE_REV; dev_info(&client->dev, "FAN53555 Option[%d] Rev[%d] Detected!\n", di->chip_id, di->chip_rev); /* Device init */ ret = fan53555_device_setup(di, pdata); - if (ret < 0) { - dev_err(&client->dev, "Failed to setup device!\n"); - return ret; - } + if (ret < 0) + return dev_err_probe(&client->dev, ret, "Failed to setup device!\n"); + /* Register regulator */ config.dev = di->dev; config.init_data = di->regulator; @@ -630,9 +625,9 @@ static int fan53555_regulator_probe(struct i2c_client *client) ret = fan53555_regulator_register(di, &config); if (ret < 0) - dev_err(&client->dev, "Failed to register regulator!\n"); - return ret; + dev_err_probe(&client->dev, ret, "Failed to register regulator!\n"); + return ret; } static const struct i2c_device_id fan53555_id[] = { -- cgit v1.2.3 From a27e71a66ee0f887fefcc31b85a804b0905fa865 Mon Sep 17 00:00:00 2001 From: Cristian Ciocaltea Date: Thu, 6 Apr 2023 22:41:58 +0300 Subject: regulator: fan53555: Add support for RK860X Extend the existing fan53555 driver to support the Rockchip RK860X regulators. RK8600/RK8601 are pretty similar to the FAN53555 regulators. RK8602/RK8603 are a bit different, having a wider output voltage selection range, from 0.5 V to 1.5 V in 6.25 mV steps. They also use additional VSEL0/VSEL1 registers for the voltage selector, but the enable and mode bits are still located in the original FAN53555 specific VSEL0/VSEL1 registers. Signed-off-by: Cristian Ciocaltea Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230406194158.963352-9-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown --- drivers/regulator/fan53555.c | 121 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 118 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 7e54518c0708..4b8655778177 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -26,6 +26,9 @@ #define FAN53555_VSEL0 0x00 #define FAN53555_VSEL1 0x01 +#define RK8602_VSEL0 0x06 +#define RK8602_VSEL1 0x07 + #define TCS4525_VSEL0 0x11 #define TCS4525_VSEL1 0x10 #define TCS4525_TIME 0x13 @@ -55,6 +58,7 @@ #define FAN53555_NVOLTAGES 64 /* Numbers of voltages */ #define FAN53526_NVOLTAGES 128 +#define RK8602_NVOLTAGES 160 #define TCS_VSEL0_MODE BIT(7) #define TCS_VSEL1_MODE BIT(6) @@ -64,6 +68,8 @@ enum fan53555_vendor { FAN53526_VENDOR_FAIRCHILD = 0, FAN53555_VENDOR_FAIRCHILD, + FAN53555_VENDOR_ROCKCHIP, /* RK8600, RK8601 */ + RK8602_VENDOR_ROCKCHIP, /* RK8602, RK8603 */ FAN53555_VENDOR_SILERGY, FAN53526_VENDOR_TCS, }; @@ -87,6 +93,14 @@ enum { FAN53555_CHIP_ID_08 = 8, }; +enum { + RK8600_CHIP_ID_08 = 8, /* RK8600, RK8601 */ +}; + +enum { + RK8602_CHIP_ID_10 = 10, /* RK8602, RK8603 */ +}; + enum { TCS4525_CHIP_ID_12 = 12, }; @@ -117,6 +131,8 @@ struct fan53555_device_info { /* Voltage setting register */ unsigned int vol_reg; unsigned int sleep_reg; + unsigned int en_reg; + unsigned int sleep_en_reg; /* Voltage range and step(linear) */ unsigned int vsel_min; unsigned int vsel_step; @@ -159,7 +175,7 @@ static int fan53555_set_suspend_enable(struct regulator_dev *rdev) { struct fan53555_device_info *di = rdev_get_drvdata(rdev); - return regmap_update_bits(rdev->regmap, di->sleep_reg, + return regmap_update_bits(rdev->regmap, di->sleep_en_reg, VSEL_BUCK_EN, VSEL_BUCK_EN); } @@ -167,7 +183,7 @@ static int fan53555_set_suspend_disable(struct regulator_dev *rdev) { struct fan53555_device_info *di = rdev_get_drvdata(rdev); - return regmap_update_bits(rdev->regmap, di->sleep_reg, + return regmap_update_bits(rdev->regmap, di->sleep_en_reg, VSEL_BUCK_EN, 0); } @@ -317,6 +333,50 @@ static int fan53555_voltages_setup_fairchild(struct fan53555_device_info *di) return 0; } +static int fan53555_voltages_setup_rockchip(struct fan53555_device_info *di) +{ + /* Init voltage range and step */ + switch (di->chip_id) { + case RK8600_CHIP_ID_08: + di->vsel_min = 712500; + di->vsel_step = 12500; + break; + default: + dev_err(di->dev, + "Chip ID %d not supported!\n", di->chip_id); + return -EINVAL; + } + di->slew_reg = FAN53555_CONTROL; + di->slew_mask = CTL_SLEW_MASK; + di->ramp_delay_table = slew_rates; + di->n_ramp_values = ARRAY_SIZE(slew_rates); + di->vsel_count = FAN53555_NVOLTAGES; + + return 0; +} + +static int rk8602_voltages_setup_rockchip(struct fan53555_device_info *di) +{ + /* Init voltage range and step */ + switch (di->chip_id) { + case RK8602_CHIP_ID_10: + di->vsel_min = 500000; + di->vsel_step = 6250; + break; + default: + dev_err(di->dev, + "Chip ID %d not supported!\n", di->chip_id); + return -EINVAL; + } + di->slew_reg = FAN53555_CONTROL; + di->slew_mask = CTL_SLEW_MASK; + di->ramp_delay_table = slew_rates; + di->n_ramp_values = ARRAY_SIZE(slew_rates); + di->vsel_count = RK8602_NVOLTAGES; + + return 0; +} + static int fan53555_voltages_setup_silergy(struct fan53555_device_info *di) { /* Init voltage range and step */ @@ -377,6 +437,7 @@ static int fan53555_device_setup(struct fan53555_device_info *di, switch (di->vendor) { case FAN53526_VENDOR_FAIRCHILD: case FAN53555_VENDOR_FAIRCHILD: + case FAN53555_VENDOR_ROCKCHIP: case FAN53555_VENDOR_SILERGY: switch (pdata->sleep_vsel_id) { case FAN53555_VSEL_ID_0: @@ -391,6 +452,27 @@ static int fan53555_device_setup(struct fan53555_device_info *di, dev_err(di->dev, "Invalid VSEL ID!\n"); return -EINVAL; } + di->sleep_en_reg = di->sleep_reg; + di->en_reg = di->vol_reg; + break; + case RK8602_VENDOR_ROCKCHIP: + switch (pdata->sleep_vsel_id) { + case FAN53555_VSEL_ID_0: + di->sleep_reg = RK8602_VSEL0; + di->vol_reg = RK8602_VSEL1; + di->sleep_en_reg = FAN53555_VSEL0; + di->en_reg = FAN53555_VSEL1; + break; + case FAN53555_VSEL_ID_1: + di->sleep_reg = RK8602_VSEL1; + di->vol_reg = RK8602_VSEL0; + di->sleep_en_reg = FAN53555_VSEL1; + di->en_reg = FAN53555_VSEL0; + break; + default: + dev_err(di->dev, "Invalid VSEL ID!\n"); + return -EINVAL; + } break; case FAN53526_VENDOR_TCS: switch (pdata->sleep_vsel_id) { @@ -406,6 +488,8 @@ static int fan53555_device_setup(struct fan53555_device_info *di, dev_err(di->dev, "Invalid VSEL ID!\n"); return -EINVAL; } + di->sleep_en_reg = di->sleep_reg; + di->en_reg = di->vol_reg; break; default: dev_err(di->dev, "vendor %d not supported!\n", di->vendor); @@ -427,10 +511,23 @@ static int fan53555_device_setup(struct fan53555_device_info *di, } break; case FAN53555_VENDOR_FAIRCHILD: + case FAN53555_VENDOR_ROCKCHIP: case FAN53555_VENDOR_SILERGY: di->mode_reg = di->vol_reg; di->mode_mask = VSEL_MODE; break; + case RK8602_VENDOR_ROCKCHIP: + di->mode_mask = VSEL_MODE; + + switch (pdata->sleep_vsel_id) { + case FAN53555_VSEL_ID_0: + di->mode_reg = FAN53555_VSEL1; + break; + case FAN53555_VSEL_ID_1: + di->mode_reg = FAN53555_VSEL0; + break; + } + break; case FAN53526_VENDOR_TCS: di->mode_reg = TCS4525_COMMAND; @@ -456,6 +553,12 @@ static int fan53555_device_setup(struct fan53555_device_info *di, case FAN53555_VENDOR_FAIRCHILD: ret = fan53555_voltages_setup_fairchild(di); break; + case FAN53555_VENDOR_ROCKCHIP: + ret = fan53555_voltages_setup_rockchip(di); + break; + case RK8602_VENDOR_ROCKCHIP: + ret = rk8602_voltages_setup_rockchip(di); + break; case FAN53555_VENDOR_SILERGY: ret = fan53555_voltages_setup_silergy(di); break; @@ -481,7 +584,7 @@ static int fan53555_regulator_register(struct fan53555_device_info *di, rdesc->ops = &fan53555_regulator_ops; rdesc->type = REGULATOR_VOLTAGE; rdesc->n_voltages = di->vsel_count; - rdesc->enable_reg = di->vol_reg; + rdesc->enable_reg = di->en_reg; rdesc->enable_mask = VSEL_BUCK_EN; rdesc->min_uV = di->vsel_min; rdesc->uV_step = di->vsel_step; @@ -531,6 +634,12 @@ static const struct of_device_id __maybe_unused fan53555_dt_ids[] = { }, { .compatible = "fcs,fan53555", .data = (void *)FAN53555_VENDOR_FAIRCHILD + }, { + .compatible = "rockchip,rk8600", + .data = (void *)FAN53555_VENDOR_ROCKCHIP + }, { + .compatible = "rockchip,rk8602", + .data = (void *)RK8602_VENDOR_ROCKCHIP }, { .compatible = "silergy,syr827", .data = (void *)FAN53555_VENDOR_SILERGY, @@ -637,6 +746,12 @@ static const struct i2c_device_id fan53555_id[] = { }, { .name = "fan53555", .driver_data = FAN53555_VENDOR_FAIRCHILD + }, { + .name = "rk8600", + .driver_data = FAN53555_VENDOR_ROCKCHIP + }, { + .name = "rk8602", + .driver_data = RK8602_VENDOR_ROCKCHIP }, { .name = "syr827", .driver_data = FAN53555_VENDOR_SILERGY -- cgit v1.2.3 From 13186dae182ab1a2a52a53424672f49cf3e81f9b Mon Sep 17 00:00:00 2001 From: Benjamin Bara Date: Wed, 5 Apr 2023 19:14:34 +0200 Subject: regulator: da9063: add voltage monitoring registers Add the definitions for the registers responsible for voltage monitoring. Add a voltage monitor enable bitfield per regulator. Reviewed-by: Matti Vaittinen Reviewed-by: Adam Ward Signed-off-by: Benjamin Bara Link: https://lore.kernel.org/r/20230403-da9063-disable-unused-v3-1-cc4dc698864c@skidata.com Signed-off-by: Mark Brown --- drivers/regulator/da9063-regulator.c | 29 +++++++++++++++++++++++++++++ include/linux/mfd/da9063/registers.h | 23 +++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c index e092e4df86ab..7d204b1d6b3f 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c @@ -83,6 +83,9 @@ struct da9063_regulator_info { /* DA9063 event detection bit */ struct reg_field oc_event; + + /* DA9063 voltage monitor bit */ + struct reg_field vmon; }; /* Macros for LDO */ @@ -148,6 +151,7 @@ struct da9063_regulator { struct regmap_field *suspend; struct regmap_field *sleep; struct regmap_field *suspend_sleep; + struct regmap_field *vmon; }; /* Encapsulates all information for the regulators driver */ @@ -581,36 +585,42 @@ static const struct da9063_regulator_info da9063_regulator_info[] = { da9063_buck_a_limits, DA9063_REG_BUCK_ILIM_C, DA9063_BCORE1_ILIM_MASK), DA9063_BUCK_COMMON_FIELDS(BCORE1), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BCORE1_MON_EN), }, { DA9063_BUCK(DA9063, BCORE2, 300, 10, 1570, da9063_buck_a_limits, DA9063_REG_BUCK_ILIM_C, DA9063_BCORE2_ILIM_MASK), DA9063_BUCK_COMMON_FIELDS(BCORE2), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BCORE2_MON_EN), }, { DA9063_BUCK(DA9063, BPRO, 530, 10, 1800, da9063_buck_a_limits, DA9063_REG_BUCK_ILIM_B, DA9063_BPRO_ILIM_MASK), DA9063_BUCK_COMMON_FIELDS(BPRO), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BPRO_MON_EN), }, { DA9063_BUCK(DA9063, BMEM, 800, 20, 3340, da9063_buck_b_limits, DA9063_REG_BUCK_ILIM_A, DA9063_BMEM_ILIM_MASK), DA9063_BUCK_COMMON_FIELDS(BMEM), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BMEM_MON_EN), }, { DA9063_BUCK(DA9063, BIO, 800, 20, 3340, da9063_buck_b_limits, DA9063_REG_BUCK_ILIM_A, DA9063_BIO_ILIM_MASK), DA9063_BUCK_COMMON_FIELDS(BIO), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BIO_MON_EN), }, { DA9063_BUCK(DA9063, BPERI, 800, 20, 3340, da9063_buck_b_limits, DA9063_REG_BUCK_ILIM_B, DA9063_BPERI_ILIM_MASK), DA9063_BUCK_COMMON_FIELDS(BPERI), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BPERI_MON_EN), }, { DA9063_BUCK(DA9063, BCORES_MERGED, 300, 10, 1570, @@ -618,6 +628,7 @@ static const struct da9063_regulator_info da9063_regulator_info[] = { DA9063_REG_BUCK_ILIM_C, DA9063_BCORE1_ILIM_MASK), /* BCORES_MERGED uses the same register fields as BCORE1 */ DA9063_BUCK_COMMON_FIELDS(BCORE1), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BCORE1_MON_EN), }, { DA9063_BUCK(DA9063, BMEM_BIO_MERGED, 800, 20, 3340, @@ -625,47 +636,59 @@ static const struct da9063_regulator_info da9063_regulator_info[] = { DA9063_REG_BUCK_ILIM_A, DA9063_BMEM_ILIM_MASK), /* BMEM_BIO_MERGED uses the same register fields as BMEM */ DA9063_BUCK_COMMON_FIELDS(BMEM), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BMEM_MON_EN), }, { DA9063_LDO(DA9063, LDO3, 900, 20, 3440), .oc_event = BFIELD(DA9063_REG_STATUS_D, DA9063_LDO3_LIM), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO3_MON_EN), }, { DA9063_LDO(DA9063, LDO7, 900, 50, 3600), .oc_event = BFIELD(DA9063_REG_STATUS_D, DA9063_LDO7_LIM), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO7_MON_EN), }, { DA9063_LDO(DA9063, LDO8, 900, 50, 3600), .oc_event = BFIELD(DA9063_REG_STATUS_D, DA9063_LDO8_LIM), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO8_MON_EN), }, { DA9063_LDO(DA9063, LDO9, 950, 50, 3600), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_3, DA9063_LDO9_MON_EN), }, { DA9063_LDO(DA9063, LDO11, 900, 50, 3600), .oc_event = BFIELD(DA9063_REG_STATUS_D, DA9063_LDO11_LIM), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_3, DA9063_LDO11_MON_EN), }, /* The following LDOs are present only on DA9063, not on DA9063L */ { DA9063_LDO(DA9063, LDO1, 600, 20, 1860), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO1_MON_EN), }, { DA9063_LDO(DA9063, LDO2, 600, 20, 1860), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO2_MON_EN), }, { DA9063_LDO(DA9063, LDO4, 900, 20, 3440), .oc_event = BFIELD(DA9063_REG_STATUS_D, DA9063_LDO4_LIM), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO4_MON_EN), }, { DA9063_LDO(DA9063, LDO5, 900, 50, 3600), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO5_MON_EN), }, { DA9063_LDO(DA9063, LDO6, 900, 50, 3600), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO6_MON_EN), }, { DA9063_LDO(DA9063, LDO10, 900, 50, 3600), + .vmon = BFIELD(DA9063_BB_REG_MON_REG_3, DA9063_LDO10_MON_EN), }, }; @@ -932,6 +955,12 @@ static int da9063_regulator_probe(struct platform_device *pdev) if (IS_ERR(regl->suspend_sleep)) return PTR_ERR(regl->suspend_sleep); } + if (regl->info->vmon.reg) { + regl->vmon = devm_regmap_field_alloc(&pdev->dev, + da9063->regmap, regl->info->vmon); + if (IS_ERR(regl->vmon)) + return PTR_ERR(regl->vmon); + } /* Register regulator */ memset(&config, 0, sizeof(config)); diff --git a/include/linux/mfd/da9063/registers.h b/include/linux/mfd/da9063/registers.h index 6e0f66a2e727..7b8364bd08a0 100644 --- a/include/linux/mfd/da9063/registers.h +++ b/include/linux/mfd/da9063/registers.h @@ -1040,6 +1040,29 @@ /* DA9063_REG_CONFIG_J (addr=0x10F) */ #define DA9063_TWOWIRE_TO 0x40 +/* DA9063_REG_MON_REG_2 (addr=0x115) */ +#define DA9063_LDO1_MON_EN 0x01 +#define DA9063_LDO2_MON_EN 0x02 +#define DA9063_LDO3_MON_EN 0x04 +#define DA9063_LDO4_MON_EN 0x08 +#define DA9063_LDO5_MON_EN 0x10 +#define DA9063_LDO6_MON_EN 0x20 +#define DA9063_LDO7_MON_EN 0x40 +#define DA9063_LDO8_MON_EN 0x80 + +/* DA9063_REG_MON_REG_3 (addr=0x116) */ +#define DA9063_LDO9_MON_EN 0x01 +#define DA9063_LDO10_MON_EN 0x02 +#define DA9063_LDO11_MON_EN 0x04 + +/* DA9063_REG_MON_REG_4 (addr=0x117) */ +#define DA9063_BCORE1_MON_EN 0x04 +#define DA9063_BCORE2_MON_EN 0x08 +#define DA9063_BPRO_MON_EN 0x10 +#define DA9063_BIO_MON_EN 0x20 +#define DA9063_BMEM_MON_EN 0x40 +#define DA9063_BPERI_MON_EN 0x80 + /* DA9063_REG_MON_REG_5 (addr=0x116) */ #define DA9063_MON_A8_IDX_MASK 0x07 #define DA9063_MON_A8_IDX_NONE 0x00 -- cgit v1.2.3 From b8717a80e6ee6500ae396d21aac2a00947bba993 Mon Sep 17 00:00:00 2001 From: Benjamin Bara Date: Wed, 5 Apr 2023 19:14:35 +0200 Subject: regulator: da9063: implement setter for voltage monitoring Allow to en- and disable voltage monitoring from the device tree. Consider that the da9063 only monitors under- *and* over-voltage together, so both must be set to the same severity and value. Reviewed-by: Adam Ward Signed-off-by: Benjamin Bara Link: https://lore.kernel.org/r/20230403-da9063-disable-unused-v3-2-cc4dc698864c@skidata.com Signed-off-by: Mark Brown --- drivers/regulator/da9063-regulator.c | 118 ++++++++++++++++++++++++++--------- 1 file changed, 90 insertions(+), 28 deletions(-) diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c index 7d204b1d6b3f..c5dd77be558b 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c @@ -207,6 +207,24 @@ static const unsigned int da9063_bmem_bio_merged_limits[] = { 4600000, 4800000, 5000000, 5200000, 5400000, 5600000, 5800000, 6000000 }; +static int da9063_set_xvp(struct regulator_dev *rdev, int lim_uV, int severity, bool enable) +{ + struct da9063_regulator *regl = rdev_get_drvdata(rdev); + struct device *dev = regl->hw->dev; + + dev_dbg(dev, "%s: lim: %d, sev: %d, en: %d\n", regl->desc.name, lim_uV, severity, enable); + + /* + * only support enable and disable. + * the da9063 offers a GPIO (GP_FB2) which is unasserted if an XV happens. + * therefore ignore severity here, as there might be handlers in hardware. + */ + if (lim_uV) + return -EINVAL; + + return regmap_field_write(regl->vmon, enable ? 1 : 0); +} + static int da9063_buck_set_mode(struct regulator_dev *rdev, unsigned int mode) { struct da9063_regulator *regl = rdev_get_drvdata(rdev); @@ -545,37 +563,41 @@ static int da9063_buck_get_current_limit(struct regulator_dev *rdev) } static const struct regulator_ops da9063_buck_ops = { - .enable = regulator_enable_regmap, - .disable = regulator_disable_regmap, - .is_enabled = regulator_is_enabled_regmap, - .get_voltage_sel = regulator_get_voltage_sel_regmap, - .set_voltage_sel = regulator_set_voltage_sel_regmap, - .list_voltage = regulator_list_voltage_linear, - .set_current_limit = da9063_buck_set_current_limit, - .get_current_limit = da9063_buck_get_current_limit, - .set_mode = da9063_buck_set_mode, - .get_mode = da9063_buck_get_mode, - .get_status = da9063_buck_get_status, - .set_suspend_voltage = da9063_set_suspend_voltage, - .set_suspend_enable = da9063_suspend_enable, - .set_suspend_disable = da9063_suspend_disable, - .set_suspend_mode = da9063_buck_set_suspend_mode, + .enable = regulator_enable_regmap, + .disable = regulator_disable_regmap, + .is_enabled = regulator_is_enabled_regmap, + .get_voltage_sel = regulator_get_voltage_sel_regmap, + .set_voltage_sel = regulator_set_voltage_sel_regmap, + .list_voltage = regulator_list_voltage_linear, + .set_current_limit = da9063_buck_set_current_limit, + .get_current_limit = da9063_buck_get_current_limit, + .set_mode = da9063_buck_set_mode, + .get_mode = da9063_buck_get_mode, + .get_status = da9063_buck_get_status, + .set_suspend_voltage = da9063_set_suspend_voltage, + .set_suspend_enable = da9063_suspend_enable, + .set_suspend_disable = da9063_suspend_disable, + .set_suspend_mode = da9063_buck_set_suspend_mode, + .set_over_voltage_protection = da9063_set_xvp, + .set_under_voltage_protection = da9063_set_xvp, }; static const struct regulator_ops da9063_ldo_ops = { - .enable = regulator_enable_regmap, - .disable = regulator_disable_regmap, - .is_enabled = regulator_is_enabled_regmap, - .get_voltage_sel = regulator_get_voltage_sel_regmap, - .set_voltage_sel = regulator_set_voltage_sel_regmap, - .list_voltage = regulator_list_voltage_linear, - .set_mode = da9063_ldo_set_mode, - .get_mode = da9063_ldo_get_mode, - .get_status = da9063_ldo_get_status, - .set_suspend_voltage = da9063_set_suspend_voltage, - .set_suspend_enable = da9063_suspend_enable, - .set_suspend_disable = da9063_suspend_disable, - .set_suspend_mode = da9063_ldo_set_suspend_mode, + .enable = regulator_enable_regmap, + .disable = regulator_disable_regmap, + .is_enabled = regulator_is_enabled_regmap, + .get_voltage_sel = regulator_get_voltage_sel_regmap, + .set_voltage_sel = regulator_set_voltage_sel_regmap, + .list_voltage = regulator_list_voltage_linear, + .set_mode = da9063_ldo_set_mode, + .get_mode = da9063_ldo_get_mode, + .get_status = da9063_ldo_get_status, + .set_suspend_voltage = da9063_set_suspend_voltage, + .set_suspend_enable = da9063_suspend_enable, + .set_suspend_disable = da9063_suspend_disable, + .set_suspend_mode = da9063_ldo_set_suspend_mode, + .set_over_voltage_protection = da9063_set_xvp, + .set_under_voltage_protection = da9063_set_xvp, }; /* Info of regulators for DA9063 */ @@ -749,6 +771,41 @@ static const struct regulator_init_data *da9063_get_regulator_initdata( return NULL; } +static int da9063_check_xvp_constraints(struct regulator_config *config) +{ + struct da9063_regulator *regl = config->driver_data; + const struct regulation_constraints *constr = &config->init_data->constraints; + const struct notification_limit *uv_l = &constr->under_voltage_limits; + const struct notification_limit *ov_l = &constr->over_voltage_limits; + + /* make sure that only one severity is used to clarify if unchanged, enabled or disabled */ + if ((!!uv_l->prot + !!uv_l->err + !!uv_l->warn) > 1) { + dev_err(config->dev, "%s: at most one voltage monitoring severity allowed!\n", + regl->desc.name); + return -EINVAL; + } + + /* make sure that UV and OV monitoring is set to the same severity and value */ + if (uv_l->prot != ov_l->prot) { + dev_err(config->dev, + "%s: protection-microvolt: value must be equal for uv and ov!\n", + regl->desc.name); + return -EINVAL; + } + if (uv_l->err != ov_l->err) { + dev_err(config->dev, "%s: error-microvolt: value must be equal for uv and ov!\n", + regl->desc.name); + return -EINVAL; + } + if (uv_l->warn != ov_l->warn) { + dev_err(config->dev, "%s: warn-microvolt: value must be equal for uv and ov!\n", + regl->desc.name); + return -EINVAL; + } + + return 0; +} + static struct of_regulator_match da9063_matches[] = { [DA9063_ID_BCORE1] = { .name = "bcore1" }, [DA9063_ID_BCORE2] = { .name = "bcore2" }, @@ -970,6 +1027,11 @@ static int da9063_regulator_probe(struct platform_device *pdev) if (da9063_reg_matches) config.of_node = da9063_reg_matches[id].of_node; config.regmap = da9063->regmap; + + ret = da9063_check_xvp_constraints(&config); + if (ret) + return ret; + regl->rdev = devm_regulator_register(&pdev->dev, ®l->desc, &config); if (IS_ERR(regl->rdev)) { -- cgit v1.2.3 From 0271b61ba3bb06fff4726951667f46e68412b8c2 Mon Sep 17 00:00:00 2001 From: Benjamin Bara Date: Wed, 5 Apr 2023 19:14:36 +0200 Subject: dt-bindings: mfd: dlg,da9063: document voltage monitoring Document that the da9063 only provides under- *and* over-voltage monitoring in one, and therefore requires both to be configured with the same severity and value. Add an example for clarification. Signed-off-by: Benjamin Bara Acked-by: Krzysztof Kozlowski Reviewed-by: Adam Ward Link: https://lore.kernel.org/r/20230403-da9063-disable-unused-v3-3-cc4dc698864c@skidata.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/mfd/dlg,da9063.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/dlg,da9063.yaml b/Documentation/devicetree/bindings/mfd/dlg,da9063.yaml index e8e74e91070c..c5a7e10d7d80 100644 --- a/Documentation/devicetree/bindings/mfd/dlg,da9063.yaml +++ b/Documentation/devicetree/bindings/mfd/dlg,da9063.yaml @@ -12,6 +12,11 @@ maintainers: description: | For device-tree bindings of other sub-modules refer to the binding documents under the respective sub-system directories. + Using regulator-{uv,ov}-{warn,error,protection}-microvolt requires special + handling: First, when GP_FB2 is used, it must be ensured that there is no + moment where all voltage monitors are disabled. Next, as da9063 only supports + UV *and* OV monitoring, both must be set to the same severity and value + (0: disable, 1: enable). properties: compatible: @@ -121,11 +126,19 @@ examples: regulator-max-microamp = <2000000>; regulator-boot-on; }; + ldo6 { + /* UNUSED */ + regulator-name = "LDO_6"; + regulator-uv-protection-microvolt = <0>; + regulator-ov-protection-microvolt = <0>; + }; ldo11 { regulator-name = "LDO_11"; regulator-min-microvolt = <900000>; - regulator-max-microvolt = <3600000>; - regulator-boot-on; + regulator-max-microvolt = <900000>; + regulator-uv-protection-microvolt = <1>; + regulator-ov-protection-microvolt = <1>; + regulator-always-on; }; }; }; -- cgit v1.2.3 From c4a413e56d16a2ae84e6d8992f215c4dcc7fac20 Mon Sep 17 00:00:00 2001 From: YAN SHI Date: Wed, 12 Apr 2023 11:35:29 +0800 Subject: regulator: stm32-pwr: fix of_iomap leak Smatch reports: drivers/regulator/stm32-pwr.c:166 stm32_pwr_regulator_probe() warn: 'base' from of_iomap() not released on lines: 151,166. In stm32_pwr_regulator_probe(), base is not released when devm_kzalloc() fails to allocate memory or devm_regulator_register() fails to register a new regulator device, which may cause a leak. To fix this issue, replace of_iomap() with devm_platform_ioremap_resource(). devm_platform_ioremap_resource() is a specialized function for platform devices. It allows 'base' to be automatically released whether the probe function succeeds or fails. Besides, use IS_ERR(base) instead of !base as the return value of devm_platform_ioremap_resource() can either be a pointer to the remapped memory or an ERR_PTR() encoded error code if the operation fails. Fixes: dc62f951a6a8 ("regulator: stm32-pwr: Fix return value check in stm32_pwr_regulator_probe()") Signed-off-by: YAN SHI Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304111750.o2643eJN-lkp@intel.com/ Reviewed-by: Dongliang Mu Link: https://lore.kernel.org/r/20230412033529.18890-1-m202071378@hust.edu.cn Signed-off-by: Mark Brown --- drivers/regulator/stm32-pwr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c index 2803a199826f..68aa9d92953d 100644 --- a/drivers/regulator/stm32-pwr.c +++ b/drivers/regulator/stm32-pwr.c @@ -129,17 +129,16 @@ static const struct regulator_desc stm32_pwr_desc[] = { static int stm32_pwr_regulator_probe(struct platform_device *pdev) { - struct device_node *np = pdev->dev.of_node; struct stm32_pwr_reg *priv; void __iomem *base; struct regulator_dev *rdev; struct regulator_config config = { }; int i, ret = 0; - base = of_iomap(np, 0); - if (!base) { + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) { dev_err(&pdev->dev, "Unable to map IO memory\n"); - return -ENOMEM; + return PTR_ERR(base); } config.dev = &pdev->dev; -- cgit v1.2.3 From 902f8c9830c35cc61a7b3f63003c7246b2bf06ca Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Mon, 27 Mar 2023 10:06:25 +0200 Subject: regulator: dt-bindings: qcom,rpmh: Correct PM8550 family supplies PM8550 is different than PM8550VE/VS, because the latter has much smaller amount of supplies (l1-3 and s1-6) and regulators. The PM8550 has on the other hand one pin for vdd-l1-l4-l10 supplies. Correct the if:then: clause with their supplies. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Abel Vesa Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230327080626.24200-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown --- .../bindings/regulator/qcom,rpmh-regulator.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml index f879ccbb3767..5f9ae89a220d 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml @@ -329,19 +329,29 @@ allOf: compatible: enum: - qcom,pm8550-rpmh-regulators - - qcom,pm8550ve-rpmh-regulators - - qcom,pm8550vs-rpmh-regulators then: properties: + vdd-l1-l4-l10-supply: true vdd-l2-l13-l14-supply: true vdd-l5-l16-supply: true vdd-l6-l7-supply: true vdd-l8-l9-supply: true patternProperties: - "^vdd-l([1-4]|1[0-7])-supply$": true + "^vdd-l(3|1[1-7])-supply$": true "^vdd-s[1-6]-supply$": true "^vdd-bob[1-2]-supply$": true + - if: + properties: + compatible: + enum: + - qcom,pm8550ve-rpmh-regulators + - qcom,pm8550vs-rpmh-regulators + then: + patternProperties: + "^vdd-l[1-3]-supply$": true + "^vdd-s[1-6]-supply$": true + - if: properties: compatible: -- cgit v1.2.3 From 37473397b852f556d8b9428ccbfd51886037842d Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Thu, 13 Apr 2023 17:34:17 -0700 Subject: regulator: core: Make regulator_lock_two() logic easier to follow The regulator_lock_two() function could be made clearer in the case of lock contention by having a local variable for each of the held and contended locks. Let's do that. At the same time, let's use the swap() function instead of open coding it. This change is expected to be a no-op and simply improves code clarity. Suggested-by: Stephen Boyd Link: https://lore.kernel.org/r/CAE-0n53Eb1BeDPmjBycXUaQAF4ppiAM6UDWje_jiB9GAmR8MMw@mail.gmail.com Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230413173359.1.I1ae92b25689bd6579952e6d458b79f5f8054a0c9@changeid Signed-off-by: Mark Brown --- drivers/regulator/core.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 08726bc0da9d..dc741ac156c3 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -219,7 +219,7 @@ static void regulator_lock_two(struct regulator_dev *rdev1, struct regulator_dev *rdev2, struct ww_acquire_ctx *ww_ctx) { - struct regulator_dev *tmp; + struct regulator_dev *held, *contended; int ret; ww_acquire_init(ww_ctx, ®ulator_ww_class); @@ -233,25 +233,18 @@ static void regulator_lock_two(struct regulator_dev *rdev1, goto exit; } + held = rdev1; + contended = rdev2; while (true) { - /* - * Start of loop: rdev1 was locked and rdev2 was contended. - * Need to unlock rdev1, slowly lock rdev2, then try rdev1 - * again. - */ - regulator_unlock(rdev1); - - ww_mutex_lock_slow(&rdev2->mutex, ww_ctx); - rdev2->ref_cnt++; - rdev2->mutex_owner = current; - ret = regulator_lock_nested(rdev1, ww_ctx); - - if (ret == -EDEADLOCK) { - /* More contention; swap which needs to be slow */ - tmp = rdev1; - rdev1 = rdev2; - rdev2 = tmp; - } else { + regulator_unlock(held); + + ww_mutex_lock_slow(&contended->mutex, ww_ctx); + contended->ref_cnt++; + contended->mutex_owner = current; + swap(held, contended); + ret = regulator_lock_nested(contended, ww_ctx); + + if (ret != -EDEADLOCK) { WARN_ON(ret); break; } -- cgit v1.2.3 From ed479907ff79007548c3bd1aed387f8cf0a62065 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Tue, 18 Apr 2023 09:17:34 +0200 Subject: regulator: dt-bindings: qcom,rpmh: Combine PM6150L and PM8150L if-then The supplies for PM6150L and PM8150L are the same, so they can be part of one if-then block, for smaller code. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230418071734.5706-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown --- .../bindings/regulator/qcom,rpmh-regulator.yaml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml index 5f9ae89a220d..b9498504ad79 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml @@ -147,6 +147,8 @@ allOf: compatible: enum: - qcom,pm6150l-rpmh-regulators + - qcom,pm8150l-rpmh-regulators + - qcom,pmc8180c-rpmh-regulators then: properties: vdd-bob-supply: @@ -264,24 +266,6 @@ allOf: patternProperties: "^vdd-s[1-9]-supply$": true - - if: - properties: - compatible: - enum: - - qcom,pm8150l-rpmh-regulators - - qcom,pmc8180c-rpmh-regulators - then: - properties: - vdd-bob-supply: - description: BOB regulator parent supply phandle. - vdd-l1-l8-supply: true - vdd-l2-l3-supply: true - vdd-l4-l5-l6-supply: true - vdd-l7-l11-supply: true - vdd-l9-l10-supply: true - patternProperties: - "^vdd-s[1-8]-supply$": true - - if: properties: compatible: -- cgit v1.2.3