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

Merge tag 'regulator-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator updates from Mark Brown:
"A fairly quiet release, there were some cleanup and a couple of new
devices but the biggest change was converting most of the drivers to
use asynchronous probe. This allows us to ramp up multiple regulators
in parallel during boot which can have a noticable impact on modern
systems.

Summary:

- Update of drivers to PROBE_PREFER_ASYNCHRONOUS to mitigate issues
with ramp times slowing down boots.

- Convert to void remove callbacks.

- Support for voltage monitoring on DA9063

- Support for Qualcomm PMC8180 and PMM8654au, Richtek RT4803 and
RT5739, Rockchip RK860x"

* tag 'regulator-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (46 commits)
regulator: dt-bindings: qcom,rpmh: Combine PM6150L and PM8150L if-then
regulator: core: Make regulator_lock_two() logic easier to follow
regulator: dt-bindings: qcom,rpmh: Correct PM8550 family supplies
regulator: stm32-pwr: fix of_iomap leak
dt-bindings: mfd: dlg,da9063: document voltage monitoring
regulator: da9063: implement setter for voltage monitoring
regulator: da9063: add voltage monitoring registers
regulator: fan53555: Add support for RK860X
regulator: fan53555: Use dev_err_probe
regulator: fan53555: Improve vsel_mask computation
regulator: fan53555: Make use of the bit macros
regulator: fan53555: Remove unused *_SLEW_SHIFT definitions
regulator: dt-bindings: fcs,fan53555: Add support for RK860X
regulator: qcom_smd: Add MP5496 S1 regulator
regulator: qcom_smd: Add s1 sub-node to mp5496 regulator
regulator: qcom,rpmh: add compatible for pmm8654au RPMH
regulator: qcom-rpmh: add support for pmm8654au regulators
regulator: core: Avoid lockdep reports when resolving supplies
regulator: core: Consistently set mutex_owner when using ww_mutex_lock_slow()
regulator: dt-bindings: qcom,rpmh: Add compatible for PMC8180
...

+1475 -271
+15 -2
Documentation/devicetree/bindings/mfd/dlg,da9063.yaml
··· 12 12 description: | 13 13 For device-tree bindings of other sub-modules refer to the binding documents 14 14 under the respective sub-system directories. 15 + Using regulator-{uv,ov}-{warn,error,protection}-microvolt requires special 16 + handling: First, when GP_FB2 is used, it must be ensured that there is no 17 + moment where all voltage monitors are disabled. Next, as da9063 only supports 18 + UV *and* OV monitoring, both must be set to the same severity and value 19 + (0: disable, 1: enable). 15 20 16 21 properties: 17 22 compatible: ··· 126 121 regulator-max-microamp = <2000000>; 127 122 regulator-boot-on; 128 123 }; 124 + ldo6 { 125 + /* UNUSED */ 126 + regulator-name = "LDO_6"; 127 + regulator-uv-protection-microvolt = <0>; 128 + regulator-ov-protection-microvolt = <0>; 129 + }; 129 130 ldo11 { 130 131 regulator-name = "LDO_11"; 131 132 regulator-min-microvolt = <900000>; 132 - regulator-max-microvolt = <3600000>; 133 - regulator-boot-on; 133 + regulator-max-microvolt = <900000>; 134 + regulator-uv-protection-microvolt = <1>; 135 + regulator-ov-protection-microvolt = <1>; 136 + regulator-always-on; 134 137 }; 135 138 }; 136 139 };
+11 -11
Documentation/devicetree/bindings/regulator/anatop-regulator.yaml
··· 10 10 - Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> 11 11 12 12 allOf: 13 - - $ref: "regulator.yaml#" 13 + - $ref: regulator.yaml# 14 14 15 15 properties: 16 16 compatible: ··· 19 19 regulator-name: true 20 20 21 21 anatop-reg-offset: 22 - $ref: '/schemas/types.yaml#/definitions/uint32' 22 + $ref: /schemas/types.yaml#/definitions/uint32 23 23 description: u32 value representing the anatop MFD register offset. 24 24 25 25 anatop-vol-bit-shift: 26 - $ref: '/schemas/types.yaml#/definitions/uint32' 26 + $ref: /schemas/types.yaml#/definitions/uint32 27 27 description: u32 value representing the bit shift for the register. 28 28 29 29 anatop-vol-bit-width: 30 - $ref: '/schemas/types.yaml#/definitions/uint32' 30 + $ref: /schemas/types.yaml#/definitions/uint32 31 31 description: u32 value representing the number of bits used in the register. 32 32 33 33 anatop-min-bit-val: 34 - $ref: '/schemas/types.yaml#/definitions/uint32' 34 + $ref: /schemas/types.yaml#/definitions/uint32 35 35 description: u32 value representing the minimum value of this register. 36 36 37 37 anatop-min-voltage: 38 - $ref: '/schemas/types.yaml#/definitions/uint32' 38 + $ref: /schemas/types.yaml#/definitions/uint32 39 39 description: u32 value representing the minimum voltage of this regulator. 40 40 41 41 anatop-max-voltage: 42 - $ref: '/schemas/types.yaml#/definitions/uint32' 42 + $ref: /schemas/types.yaml#/definitions/uint32 43 43 description: u32 value representing the maximum voltage of this regulator. 44 44 45 45 anatop-delay-reg-offset: 46 - $ref: '/schemas/types.yaml#/definitions/uint32' 46 + $ref: /schemas/types.yaml#/definitions/uint32 47 47 description: u32 value representing the anatop MFD step time register offset. 48 48 49 49 anatop-delay-bit-shift: 50 - $ref: '/schemas/types.yaml#/definitions/uint32' 50 + $ref: /schemas/types.yaml#/definitions/uint32 51 51 description: u32 value representing the bit shift for the step time register. 52 52 53 53 anatop-delay-bit-width: 54 - $ref: '/schemas/types.yaml#/definitions/uint32' 54 + $ref: /schemas/types.yaml#/definitions/uint32 55 55 description: u32 value representing the number of bits used in the step time register. 56 56 57 57 anatop-enable-bit: 58 - $ref: '/schemas/types.yaml#/definitions/uint32' 58 + $ref: /schemas/types.yaml#/definitions/uint32 59 59 description: u32 value representing regulator enable bit offset. 60 60 61 61 vin-supply:
+1 -1
Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
··· 109 109 description: Specify a valid GPIO for platform control of the regulator 110 110 111 111 dlg,ripple-cancel: 112 - $ref: "/schemas/types.yaml#/definitions/uint32" 112 + $ref: /schemas/types.yaml#/definitions/uint32 113 113 enum: [ 0, 1, 2, 3 ] 114 114 description: | 115 115 Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
+15 -6
Documentation/devicetree/bindings/regulator/fcs,fan53555.yaml
··· 14 14 15 15 properties: 16 16 compatible: 17 - enum: 18 - - fcs,fan53555 19 - - fcs,fan53526 20 - - silergy,syr827 21 - - silergy,syr828 22 - - tcs,tcs4525 17 + oneOf: 18 + - enum: 19 + - fcs,fan53555 20 + - fcs,fan53526 21 + - rockchip,rk8600 22 + - rockchip,rk8602 23 + - silergy,syr827 24 + - silergy,syr828 25 + - tcs,tcs4525 26 + - items: 27 + - const: rockchip,rk8601 28 + - const: rockchip,rk8600 29 + - items: 30 + - const: rockchip,rk8603 31 + - const: rockchip,rk8602 23 32 24 33 reg: 25 34 maxItems: 1
+1 -1
Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
··· 17 17 to be the same. 18 18 19 19 allOf: 20 - - $ref: "regulator.yaml#" 20 + - $ref: regulator.yaml# 21 21 - if: 22 22 properties: 23 23 compatible:
+1 -1
Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.yaml
··· 14 14 regulator.yaml, can also be used. 15 15 16 16 allOf: 17 - - $ref: "regulator.yaml#" 17 + - $ref: regulator.yaml# 18 18 19 19 properties: 20 20 compatible:
+1 -1
Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
··· 15 15 regulator.txt, can also be used. 16 16 17 17 allOf: 18 - - $ref: "regulator.yaml#" 18 + - $ref: regulator.yaml# 19 19 20 20 properties: 21 21 compatible:
+1 -1
Documentation/devicetree/bindings/regulator/max77650-regulator.yaml
··· 25 25 26 26 patternProperties: 27 27 "^regulator-(ldo|sbb[0-2])$": 28 - $ref: "regulator.yaml#" 28 + $ref: regulator.yaml# 29 29 unevaluatedProperties: false 30 30 31 31 required:
+1 -1
Documentation/devicetree/bindings/regulator/max8660.yaml
··· 25 25 26 26 patternProperties: 27 27 "^regulator-.+$": 28 - $ref: "regulator.yaml#" 28 + $ref: regulator.yaml# 29 29 unevaluatedProperties: false 30 30 31 31 additionalProperties: false
+1 -1
Documentation/devicetree/bindings/regulator/max8893.yaml
··· 25 25 26 26 patternProperties: 27 27 "^(ldo[1-5]|buck)$": 28 - $ref: "regulator.yaml#" 28 + $ref: regulator.yaml# 29 29 30 30 additionalProperties: false 31 31
+6 -6
Documentation/devicetree/bindings/regulator/mediatek,mt6331-regulator.yaml
··· 18 18 patternProperties: 19 19 "^buck-v(core2|io18|dvfs11|dvfs12|dvfs13|dvfs14)$": 20 20 type: object 21 - $ref: "regulator.yaml#" 21 + $ref: regulator.yaml# 22 22 23 23 properties: 24 24 regulator-name: ··· 28 28 29 29 "^ldo-v(avdd32aud|auxa32)$": 30 30 type: object 31 - $ref: "regulator.yaml#" 31 + $ref: regulator.yaml# 32 32 33 33 properties: 34 34 regulator-name: ··· 38 38 39 39 "^ldo-v(dig18|emc33|ibr|mc|mch|mipi|rtc|sram|usb10)$": 40 40 type: object 41 - $ref: "regulator.yaml#" 41 + $ref: regulator.yaml# 42 42 43 43 properties: 44 44 regulator-name: ··· 48 48 49 49 "^ldo-vcam(a|af|d|io)$": 50 50 type: object 51 - $ref: "regulator.yaml#" 51 + $ref: regulator.yaml# 52 52 53 53 properties: 54 54 regulator-name: ··· 58 58 59 59 "^ldo-vtcxo[12]$": 60 60 type: object 61 - $ref: "regulator.yaml#" 61 + $ref: regulator.yaml# 62 62 63 63 properties: 64 64 regulator-name: ··· 71 71 72 72 "^ldo-vgp[1234]$": 73 73 type: object 74 - $ref: "regulator.yaml#" 74 + $ref: regulator.yaml# 75 75 76 76 properties: 77 77 regulator-name:
+2 -2
Documentation/devicetree/bindings/regulator/mediatek,mt6332-regulator.yaml
··· 18 18 patternProperties: 19 19 "^buck-v(dram|dvfs2|pa|rf18a|rf18b|sbst)$": 20 20 type: object 21 - $ref: "regulator.yaml#" 21 + $ref: regulator.yaml# 22 22 23 23 properties: 24 24 regulator-name: ··· 28 28 29 29 "^ldo-v(bif28|dig18|sram|usb33)$": 30 30 type: object 31 - $ref: "regulator.yaml#" 31 + $ref: regulator.yaml# 32 32 33 33 properties: 34 34 regulator-name:
+2 -2
Documentation/devicetree/bindings/regulator/mps,mp5416.yaml
··· 28 28 29 29 patternProperties: 30 30 "^buck[1-4]$": 31 - $ref: "regulator.yaml#" 31 + $ref: regulator.yaml# 32 32 type: object 33 33 34 34 "^ldo[1-4]$": 35 - $ref: "regulator.yaml#" 35 + $ref: regulator.yaml# 36 36 type: object 37 37 38 38 additionalProperties: false
+1 -1
Documentation/devicetree/bindings/regulator/mps,mp886x.yaml
··· 28 28 mps,fb-voltage-divider: 29 29 description: An array of two integers containing the resistor 30 30 values R1 and R2 of the feedback voltage divider in kilo ohms. 31 - $ref: "/schemas/types.yaml#/definitions/uint32-array" 31 + $ref: /schemas/types.yaml#/definitions/uint32-array 32 32 maxItems: 2 33 33 34 34 mps,switch-frequency-hz:
+3 -3
Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml
··· 29 29 30 30 properties: 31 31 mps,switch-freq: 32 - $ref: "/schemas/types.yaml#/definitions/uint8" 32 + $ref: /schemas/types.yaml#/definitions/uint8 33 33 enum: [0, 1, 2, 3] 34 34 default: 2 35 35 description: | ··· 51 51 52 52 properties: 53 53 mps,buck-softstart: 54 - $ref: "/schemas/types.yaml#/definitions/uint8" 54 + $ref: /schemas/types.yaml#/definitions/uint8 55 55 enum: [0, 1, 2, 3] 56 56 description: | 57 57 defines the soft start time of this buck, must be one of the following 58 58 corresponding values 150us, 300us, 610us, 920us 59 59 60 60 mps,buck-phase-delay: 61 - $ref: "/schemas/types.yaml#/definitions/uint8" 61 + $ref: /schemas/types.yaml#/definitions/uint8 62 62 enum: [0, 1, 2, 3] 63 63 description: | 64 64 defines the phase delay of this buck, must be one of the following
+1 -1
Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml
··· 28 28 patternProperties: 29 29 "^vbuck[1-4]$": 30 30 type: object 31 - $ref: "regulator.yaml#" 31 + $ref: regulator.yaml# 32 32 unevaluatedProperties: false 33 33 34 34 properties:
+8 -8
Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml
··· 17 17 patternProperties: 18 18 "^buck_v(s1|gpu11|modem|pu|core|s2|pa|proc2|proc1|core_sshub)$": 19 19 type: object 20 - $ref: "regulator.yaml#" 20 + $ref: regulator.yaml# 21 21 22 22 properties: 23 23 regulator-name: ··· 27 27 28 28 "^ldo_v(ibr|rf12|usb|camio|efuse|xo22)$": 29 29 type: object 30 - $ref: "regulator.yaml#" 30 + $ref: regulator.yaml# 31 31 32 32 properties: 33 33 regulator-name: ··· 37 37 38 38 "^ldo_v(rfck|emc|a12|a09|ufs|bbck)$": 39 39 type: object 40 - $ref: "regulator.yaml#" 40 + $ref: regulator.yaml# 41 41 42 42 properties: 43 43 regulator-name: ··· 47 47 48 48 "^ldo_vcn(18|13|33_1_bt|13_1_wifi|33_2_bt|33_2_wifi)$": 49 49 type: object 50 - $ref: "regulator.yaml#" 50 + $ref: regulator.yaml# 51 51 52 52 properties: 53 53 regulator-name: ··· 57 57 58 58 "^ldo_vsram_(proc2|others|md|proc1|others_sshub)$": 59 59 type: object 60 - $ref: "regulator.yaml#" 60 + $ref: regulator.yaml# 61 61 62 62 properties: 63 63 regulator-name: ··· 67 67 68 68 "^ldo_v(fe|bif|io)28$": 69 69 type: object 70 - $ref: "regulator.yaml#" 70 + $ref: regulator.yaml# 71 71 72 72 properties: 73 73 regulator-name: ··· 77 77 78 78 "^ldo_v(aud|io|aux|rf|m)18$": 79 79 type: object 80 - $ref: "regulator.yaml#" 80 + $ref: regulator.yaml# 81 81 82 82 properties: 83 83 regulator-name: ··· 87 87 88 88 "^ldo_vsim[12]$": 89 89 type: object 90 - $ref: "regulator.yaml#" 90 + $ref: regulator.yaml# 91 91 92 92 properties: 93 93 regulator-name:
+2 -2
Documentation/devicetree/bindings/regulator/mt6360-regulator.yaml
··· 26 26 27 27 patternProperties: 28 28 "^buck[12]$": 29 - $ref: "regulator.yaml#" 29 + $ref: regulator.yaml# 30 30 unevaluatedProperties: false 31 31 32 32 "^ldo[123567]$": 33 - $ref: "regulator.yaml#" 33 + $ref: regulator.yaml# 34 34 unevaluatedProperties: false 35 35 36 36 required:
+2 -2
Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml
··· 57 57 58 58 properties: 59 59 nxp,dvs-run-voltage: 60 - $ref: "/schemas/types.yaml#/definitions/uint32" 60 + $ref: /schemas/types.yaml#/definitions/uint32 61 61 minimum: 600000 62 62 maximum: 2187500 63 63 description: ··· 65 65 dvs(dynamic voltage scaling) property. 66 66 67 67 nxp,dvs-standby-voltage: 68 - $ref: "/schemas/types.yaml#/definitions/uint32" 68 + $ref: /schemas/types.yaml#/definitions/uint32 69 69 minimum: 600000 70 70 maximum: 2187500 71 71 description:
+2 -19
Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml
··· 38 38 description: 39 39 Properties for single LDO regulator. 40 40 41 - properties: 42 - regulator-name: 43 - pattern: "^ldo[1-4]$" 44 - description: 45 - should be "ldo1", ..., "ldo4" 46 - 47 41 unevaluatedProperties: false 48 42 49 43 "^buck[1-7]$": ··· 47 53 Properties for single BUCK regulator. 48 54 49 55 properties: 50 - regulator-name: 51 - pattern: "^buck[1-7]$" 52 - description: 53 - should be "buck1", ..., "buck7" 54 - 55 56 nxp,ilim-ma: 56 - $ref: "/schemas/types.yaml#/definitions/uint32" 57 + $ref: /schemas/types.yaml#/definitions/uint32 57 58 minimum: 2100 58 59 maximum: 4500 59 60 deprecated: true ··· 64 75 4500 65 76 66 77 nxp,phase-shift: 67 - $ref: "/schemas/types.yaml#/definitions/uint32" 78 + $ref: /schemas/types.yaml#/definitions/uint32 68 79 default: 0 69 80 enum: [ 0, 45, 90, 135, 180, 225, 270, 315 ] 70 81 description: ··· 78 89 $ref: regulator.yaml# 79 90 description: 80 91 Properties for single VSNVS regulator. 81 - 82 - properties: 83 - regulator-name: 84 - pattern: "^vsnvs$" 85 - description: 86 - should be "vsnvs" 87 92 88 93 unevaluatedProperties: false 89 94
+4 -4
Documentation/devicetree/bindings/regulator/pfuze100.yaml
··· 63 63 64 64 patternProperties: 65 65 "^sw([1-4]|[1-4][a-c]|[1-4][a-c][a-c])$": 66 - $ref: "regulator.yaml#" 66 + $ref: regulator.yaml# 67 67 type: object 68 68 69 69 "^vgen[1-6]$": 70 - $ref: "regulator.yaml#" 70 + $ref: regulator.yaml# 71 71 type: object 72 72 73 73 "^vldo[1-4]$": 74 - $ref: "regulator.yaml#" 74 + $ref: regulator.yaml# 75 75 type: object 76 76 77 77 "^(vsnvs|vref|vrefddr|swbst|coin|v33|vccsd)$": 78 - $ref: "regulator.yaml#" 78 + $ref: regulator.yaml# 79 79 type: object 80 80 81 81 additionalProperties: false
+30 -15
Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
··· 75 75 - qcom,pm8550ve-rpmh-regulators 76 76 - qcom,pm8550vs-rpmh-regulators 77 77 - qcom,pm8998-rpmh-regulators 78 + - qcom,pmc8180-rpmh-regulators 79 + - qcom,pmc8180c-rpmh-regulators 78 80 - qcom,pmg1110-rpmh-regulators 79 81 - qcom,pmi8998-rpmh-regulators 80 82 - qcom,pmm8155au-rpmh-regulators 83 + - qcom,pmm8654au-rpmh-regulators 81 84 - qcom,pmr735a-rpmh-regulators 82 85 - qcom,pmx55-rpmh-regulators 83 86 - qcom,pmx65-rpmh-regulators ··· 108 105 109 106 bob: 110 107 type: object 111 - $ref: "regulator.yaml#" 108 + $ref: regulator.yaml# 112 109 description: BOB regulator node. 113 110 dependencies: 114 - regulator-allow-set-load: ["regulator-allowed-modes"] 111 + regulator-allow-set-load: [ regulator-allowed-modes ] 115 112 116 113 patternProperties: 117 114 "^(smps|ldo|lvs|bob)[0-9]+$": 118 115 type: object 119 - $ref: "regulator.yaml#" 116 + $ref: regulator.yaml# 120 117 description: smps/ldo regulator nodes(s). 121 118 dependencies: 122 - regulator-allow-set-load: ["regulator-allowed-modes"] 119 + regulator-allow-set-load: [ regulator-allowed-modes ] 123 120 124 121 required: 125 122 - compatible ··· 147 144 compatible: 148 145 enum: 149 146 - qcom,pm6150l-rpmh-regulators 147 + - qcom,pm8150l-rpmh-regulators 148 + - qcom,pmc8180c-rpmh-regulators 150 149 then: 151 150 properties: 152 151 vdd-bob-supply: ··· 237 232 compatible: 238 233 enum: 239 234 - qcom,pm8150-rpmh-regulators 235 + - qcom,pmc8180-rpmh-regulators 240 236 - qcom,pmm8155au-rpmh-regulators 241 237 then: 242 238 properties: ··· 254 248 properties: 255 249 compatible: 256 250 enum: 257 - - qcom,pm8150l-rpmh-regulators 251 + - qcom,pmm8654au-rpmh-regulators 258 252 then: 259 253 properties: 260 - vdd-bob-supply: 261 - description: BOB regulator parent supply phandle. 262 - vdd-l1-l8-supply: true 254 + vdd-l1-supply: true 263 255 vdd-l2-l3-supply: true 264 - vdd-l4-l5-l6-supply: true 265 - vdd-l7-l11-supply: true 266 - vdd-l9-l10-supply: true 256 + vdd-l4-supply: true 257 + vdd-l5-supply: true 258 + vdd-l6-l7-supply: true 259 + vdd-l8-l9-supply: true 267 260 patternProperties: 268 - "^vdd-s[1-8]-supply$": true 261 + "^vdd-s[1-9]-supply$": true 269 262 270 263 - if: 271 264 properties: ··· 313 308 compatible: 314 309 enum: 315 310 - qcom,pm8550-rpmh-regulators 316 - - qcom,pm8550ve-rpmh-regulators 317 - - qcom,pm8550vs-rpmh-regulators 318 311 then: 319 312 properties: 313 + vdd-l1-l4-l10-supply: true 320 314 vdd-l2-l13-l14-supply: true 321 315 vdd-l5-l16-supply: true 322 316 vdd-l6-l7-supply: true 323 317 vdd-l8-l9-supply: true 324 318 patternProperties: 325 - "^vdd-l([1-4]|1[0-7])-supply$": true 319 + "^vdd-l(3|1[1-7])-supply$": true 326 320 "^vdd-s[1-6]-supply$": true 327 321 "^vdd-bob[1-2]-supply$": true 322 + 323 + - if: 324 + properties: 325 + compatible: 326 + enum: 327 + - qcom,pm8550ve-rpmh-regulators 328 + - qcom,pm8550vs-rpmh-regulators 329 + then: 330 + patternProperties: 331 + "^vdd-l[1-3]-supply$": true 332 + "^vdd-s[1-6]-supply$": true 328 333 329 334 - if: 330 335 properties:
+1 -1
Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
··· 22 22 Each sub-node is identified using the node's name, with valid values listed 23 23 for each of the pmics below. 24 24 25 - For mp5496, s2 25 + For mp5496, s1, s2 26 26 27 27 For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, 28 28 l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22
+1 -1
Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator.yaml
··· 15 15 and control the backlight. 16 16 17 17 allOf: 18 - - $ref: "regulator.yaml#" 18 + - $ref: regulator.yaml# 19 19 20 20 properties: 21 21 compatible:
+11 -11
Documentation/devicetree/bindings/regulator/regulator.yaml
··· 13 13 properties: 14 14 regulator-name: 15 15 description: A string used as a descriptive name for regulator outputs 16 - $ref: "/schemas/types.yaml#/definitions/string" 16 + $ref: /schemas/types.yaml#/definitions/string 17 17 18 18 regulator-min-microvolt: 19 19 description: smallest voltage consumers may set ··· 23 23 24 24 regulator-microvolt-offset: 25 25 description: Offset applied to voltages to compensate for voltage drops 26 - $ref: "/schemas/types.yaml#/definitions/uint32" 26 + $ref: /schemas/types.yaml#/definitions/uint32 27 27 28 28 regulator-min-microamp: 29 29 description: smallest current consumers may set ··· 59 59 description: ramp delay for regulator(in uV/us) For hardware which supports 60 60 disabling ramp rate, it should be explicitly initialised to zero (regulator-ramp-delay 61 61 = <0>) for disabling ramp delay. 62 - $ref: "/schemas/types.yaml#/definitions/uint32" 62 + $ref: /schemas/types.yaml#/definitions/uint32 63 63 64 64 regulator-enable-ramp-delay: 65 65 description: The time taken, in microseconds, for the supply rail to ··· 68 68 required due to the combination of internal ramping of the regulator 69 69 itself, and board design issues such as trace capacitance and load 70 70 on the supply. 71 - $ref: "/schemas/types.yaml#/definitions/uint32" 71 + $ref: /schemas/types.yaml#/definitions/uint32 72 72 73 73 regulator-settling-time-us: 74 74 description: Settling time, in microseconds, for voltage change if regulator ··· 95 95 description: initial operating mode. The set of possible operating modes 96 96 depends on the capabilities of every hardware so each device binding 97 97 documentation explains which values the regulator supports. 98 - $ref: "/schemas/types.yaml#/definitions/uint32" 98 + $ref: /schemas/types.yaml#/definitions/uint32 99 99 100 100 regulator-allowed-modes: 101 101 description: list of operating modes that software is allowed to configure ··· 103 103 The set of possible operating modes depends on the capabilities of 104 104 every hardware so each device binding document explains which values 105 105 the regulator supports. 106 - $ref: "/schemas/types.yaml#/definitions/uint32-array" 106 + $ref: /schemas/types.yaml#/definitions/uint32-array 107 107 108 108 regulator-system-load: 109 109 description: Load in uA present on regulator that is not captured by 110 110 any consumer request. 111 - $ref: "/schemas/types.yaml#/definitions/uint32" 111 + $ref: /schemas/types.yaml#/definitions/uint32 112 112 113 113 regulator-pull-down: 114 114 description: Enable pull down resistor when the regulator is disabled. ··· 206 206 0: Disable active discharge. 207 207 1: Enable active discharge. 208 208 Absence of this property will leave configuration to default. 209 - $ref: "/schemas/types.yaml#/definitions/uint32" 209 + $ref: /schemas/types.yaml#/definitions/uint32 210 210 enum: [0, 1] 211 211 212 212 regulator-coupled-with: 213 213 description: Regulators with which the regulator is coupled. The linkage 214 214 is 2-way - all coupled regulators should be linked with each other. 215 215 A regulator should not be coupled with its supplier. 216 - $ref: "/schemas/types.yaml#/definitions/phandle-array" 216 + $ref: /schemas/types.yaml#/definitions/phandle-array 217 217 items: 218 218 maxItems: 1 219 219 ··· 221 221 description: Array of maximum spread between voltages of coupled regulators 222 222 in microvolts, each value in the array relates to the corresponding 223 223 couple specified by the regulator-coupled-with property. 224 - $ref: "/schemas/types.yaml#/definitions/uint32-array" 224 + $ref: /schemas/types.yaml#/definitions/uint32-array 225 225 226 226 regulator-max-step-microvolt: 227 227 description: Maximum difference between current and target voltages ··· 269 269 of possible operating modes depends on the capabilities of every 270 270 hardware so the valid modes are documented on each regulator device 271 271 tree binding document. 272 - $ref: "/schemas/types.yaml#/definitions/uint32" 272 + $ref: /schemas/types.yaml#/definitions/uint32 273 273 274 274 additionalProperties: false 275 275
+68
Documentation/devicetree/bindings/regulator/richtek,rt4803.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/richtek,rt4803.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Richtek RT4803 Boost Regulator 8 + 9 + maintainers: 10 + - ChiYuan Huang <cy_huang@richtek.com> 11 + 12 + description: | 13 + RT4803 is a boost regulator that's designed to provide the minimum output 14 + voltage, even if the input voltage is lower than the required voltage. It 15 + supports boost and auto bypass mode that depends on the difference between the 16 + input and output voltage. If the input is lower than the output, mode will 17 + transform to boost mode. Otherwise, turn on bypass switch to enter bypass mode. 18 + 19 + Datasheet is available at 20 + https://www.richtek.com/assets/product_file/RT4803/DS4803-03.pdf 21 + https://www.richtek.com/assets/product_file/RT4803A/DS4803A-06.pdf 22 + 23 + allOf: 24 + - $ref: regulator.yaml# 25 + 26 + properties: 27 + compatible: 28 + enum: 29 + - richtek,rt4803 30 + 31 + reg: 32 + maxItems: 1 33 + 34 + richtek,vsel-active-high: 35 + type: boolean 36 + description: Specify the VSEL register group is using when system is active 37 + 38 + regulator-allowed-modes: 39 + description: | 40 + Available operating mode 41 + 1: Auto PFM/PWM 42 + 2: Force PWM 43 + items: 44 + enum: [1, 2] 45 + 46 + required: 47 + - compatible 48 + - reg 49 + 50 + unevaluatedProperties: false 51 + 52 + examples: 53 + - | 54 + i2c { 55 + #address-cells = <1>; 56 + #size-cells = <0>; 57 + 58 + regulator@75 { 59 + compatible = "richtek,rt4803"; 60 + reg = <0x75>; 61 + richtek,vsel-active-high; 62 + regulator-name = "rt4803-regulator"; 63 + regulator-min-microvolt = <2850000>; 64 + regulator-max-microvolt = <4400000>; 65 + regulator-allowed-modes = <1 2>; 66 + regulator-always-on; 67 + }; 68 + };
+72
Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/richtek,rt5739.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Richtek RT5739 Step-Down Buck Converter 8 + 9 + maintainers: 10 + - ChiYuan Huang <cy_huang@richtek.com> 11 + 12 + description: | 13 + The RT5739 is a step-down switching buck converter that can deliver the 14 + programmable output voltage from 300mV to 1300mV with wide input voltage 15 + supply of 2.5V to 5.5V. It can provide up to 3.5A continuous current 16 + capability at over 80% high efficiency. 17 + 18 + allOf: 19 + - $ref: regulator.yaml# 20 + 21 + properties: 22 + compatible: 23 + enum: 24 + - richtek,rt5739 25 + 26 + reg: 27 + maxItems: 1 28 + 29 + enable-gpios: 30 + maxItems: 1 31 + 32 + richtek,vsel-active-high: 33 + description: | 34 + If property is present, use the 'VSEL1' register group for buck control. 35 + Else, use the 'VSEL0' register group. This depends on external hardware 36 + 'VSEL' pin connection. 37 + type: boolean 38 + 39 + regulator-allowed-modes: 40 + description: | 41 + buck allowed operating mode 42 + 0: Auto PFM/PWM mode 43 + 1: Forced PWM mode 44 + items: 45 + enum: [0, 1] 46 + 47 + required: 48 + - compatible 49 + - reg 50 + 51 + unevaluatedProperties: false 52 + 53 + examples: 54 + - | 55 + #include <dt-bindings/gpio/gpio.h> 56 + 57 + i2c { 58 + #address-cells = <1>; 59 + #size-cells = <0>; 60 + 61 + regulator@50 { 62 + compatible = "richtek,rt5739"; 63 + reg = <0x50>; 64 + enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>; 65 + richtek,vsel-active-high; 66 + regulator-name = "richtek,rt5739-buck"; 67 + regulator-min-microvolt = <300000>; 68 + regulator-max-microvolt = <1300000>; 69 + regulator-allowed-modes = <0 1>; 70 + regulator-boot-on; 71 + }; 72 + };
+4 -4
Documentation/devicetree/bindings/regulator/richtek,rt6245-regulator.yaml
··· 32 32 maxItems: 1 33 33 34 34 richtek,oc-level-select: 35 - $ref: "/schemas/types.yaml#/definitions/uint8" 35 + $ref: /schemas/types.yaml#/definitions/uint8 36 36 enum: [0, 1, 2, 3] 37 37 description: | 38 38 Over current level selection. Each respective value means the current ··· 40 40 in chip default. 41 41 42 42 richtek,ot-level-select: 43 - $ref: "/schemas/types.yaml#/definitions/uint8" 43 + $ref: /schemas/types.yaml#/definitions/uint8 44 44 enum: [0, 1, 2] 45 45 description: | 46 46 Over temperature level selection. Each respective value means the degree ··· 48 48 default. 49 49 50 50 richtek,pgdly-time-select: 51 - $ref: "/schemas/types.yaml#/definitions/uint8" 51 + $ref: /schemas/types.yaml#/definitions/uint8 52 52 enum: [0, 1, 2, 3] 53 53 description: | 54 54 Power good signal delay time selection. Each respective value means the ··· 57 57 58 58 59 59 richtek,switch-freq-select: 60 - $ref: "/schemas/types.yaml#/definitions/uint8" 60 + $ref: /schemas/types.yaml#/definitions/uint8 61 61 enum: [0, 1, 2] 62 62 description: | 63 63 Buck switch frequency selection. Each respective value means 400KHz,
+1 -1
Documentation/devicetree/bindings/regulator/richtek,rtmv20-regulator.yaml
··· 120 120 lsw: 121 121 description: load switch current regulator description. 122 122 type: object 123 - $ref: "regulator.yaml#" 123 + $ref: regulator.yaml# 124 124 125 125 required: 126 126 - compatible
+4 -4
Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml
··· 56 56 PMIC "RUN" state voltage in uV when PMIC HW states are used. See 57 57 comments below for bucks/LDOs which support this. 0 means 58 58 regulator should be disabled at RUN state. 59 - $ref: "/schemas/types.yaml#/definitions/uint32" 59 + $ref: /schemas/types.yaml#/definitions/uint32 60 60 minimum: 0 61 61 maximum: 3300000 62 62 ··· 67 67 keeps regulator enabled. BD71815 does not change voltage level 68 68 when PMIC transitions to SNVS.SNVS voltage depends on the previous 69 69 state (from which the PMIC transitioned to SNVS). 70 - $ref: "/schemas/types.yaml#/definitions/uint32" 70 + $ref: /schemas/types.yaml#/definitions/uint32 71 71 minimum: 0 72 72 maximum: 3300000 73 73 ··· 76 76 PMIC "SUSPEND" state voltage in uV when PMIC HW states are used. See 77 77 comments below for bucks/LDOs which support this. 0 means 78 78 regulator should be disabled at SUSPEND state. 79 - $ref: "/schemas/types.yaml#/definitions/uint32" 79 + $ref: /schemas/types.yaml#/definitions/uint32 80 80 minimum: 0 81 81 maximum: 3300000 82 82 ··· 85 85 PMIC "LPSR" state voltage in uV when PMIC HW states are used. See 86 86 comments below for bucks/LDOs which support this. 0 means 87 87 regulator should be disabled at LPSR state. 88 - $ref: "/schemas/types.yaml#/definitions/uint32" 88 + $ref: /schemas/types.yaml#/definitions/uint32 89 89 minimum: 0 90 90 maximum: 3300000 91 91
+4 -4
Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml
··· 52 52 description: 53 53 PMIC default "RUN" state voltage in uV. See below table for 54 54 bucks which support this. 0 means disabled. 55 - $ref: "/schemas/types.yaml#/definitions/uint32" 55 + $ref: /schemas/types.yaml#/definitions/uint32 56 56 minimum: 0 57 57 maximum: 3300000 58 58 ··· 60 60 description: 61 61 PMIC default "IDLE" state voltage in uV. See below table for 62 62 bucks which support this. 0 means disabled. 63 - $ref: "/schemas/types.yaml#/definitions/uint32" 63 + $ref: /schemas/types.yaml#/definitions/uint32 64 64 minimum: 0 65 65 maximum: 3300000 66 66 ··· 68 68 description: 69 69 PMIC default "SUSPEND" state voltage in uV. See below table for 70 70 bucks which support this. 0 means disabled. 71 - $ref: "/schemas/types.yaml#/definitions/uint32" 71 + $ref: /schemas/types.yaml#/definitions/uint32 72 72 minimum: 0 73 73 maximum: 3300000 74 74 ··· 76 76 description: 77 77 PMIC default "LPSR" state voltage in uV. See below table for 78 78 bucks which support this. 0 means disabled. 79 - $ref: "/schemas/types.yaml#/definitions/uint32" 79 + $ref: /schemas/types.yaml#/definitions/uint32 80 80 minimum: 0 81 81 maximum: 3300000 82 82
+3 -3
Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml
··· 55 55 should be "buck1", ..., "buck8" 56 56 57 57 rohm,dvs-run-voltage: 58 - $ref: "/schemas/types.yaml#/definitions/uint32" 58 + $ref: /schemas/types.yaml#/definitions/uint32 59 59 minimum: 0 60 60 maximum: 1300000 61 61 description: ··· 63 63 bucks which support this. 0 means disabled. 64 64 65 65 rohm,dvs-idle-voltage: 66 - $ref: "/schemas/types.yaml#/definitions/uint32" 66 + $ref: /schemas/types.yaml#/definitions/uint32 67 67 minimum: 0 68 68 maximum: 1300000 69 69 description: ··· 71 71 bucks which support this. 0 means disabled. 72 72 73 73 rohm,dvs-suspend-voltage: 74 - $ref: "/schemas/types.yaml#/definitions/uint32" 74 + $ref: /schemas/types.yaml#/definitions/uint32 75 75 minimum: 0 76 76 maximum: 1300000 77 77 description:
+3 -3
Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml
··· 54 54 should be "buck1", ..., "buck6" 55 55 56 56 rohm,dvs-run-voltage: 57 - $ref: "/schemas/types.yaml#/definitions/uint32" 57 + $ref: /schemas/types.yaml#/definitions/uint32 58 58 minimum: 0 59 59 maximum: 1300000 60 60 description: ··· 62 62 bucks which support this. 0 means disabled. 63 63 64 64 rohm,dvs-idle-voltage: 65 - $ref: "/schemas/types.yaml#/definitions/uint32" 65 + $ref: /schemas/types.yaml#/definitions/uint32 66 66 minimum: 0 67 67 maximum: 1300000 68 68 description: ··· 70 70 bucks which support this. 0 means disabled. 71 71 72 72 rohm,dvs-suspend-voltage: 73 - $ref: "/schemas/types.yaml#/definitions/uint32" 73 + $ref: /schemas/types.yaml#/definitions/uint32 74 74 minimum: 0 75 75 maximum: 1300000 76 76 description:
+1 -1
Documentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml
··· 25 25 type: object 26 26 description: 27 27 Properties for single regulator. 28 - $ref: "regulator.yaml#" 28 + $ref: regulator.yaml# 29 29 30 30 properties: 31 31 rohm,ocw-fet-ron-micro-ohms:
+1 -1
Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml
··· 42 42 reset-names: true 43 43 44 44 allOf: 45 - - $ref: "regulator.yaml#" 45 + - $ref: regulator.yaml# 46 46 - if: 47 47 properties: 48 48 compatible:
+2 -2
Documentation/devicetree/bindings/regulator/st,stm32-booster.yaml
··· 14 14 to supply ADC analog input switches. 15 15 16 16 allOf: 17 - - $ref: "regulator.yaml#" 17 + - $ref: regulator.yaml# 18 18 19 19 properties: 20 20 compatible: ··· 23 23 - st,stm32mp1-booster 24 24 25 25 st,syscfg: 26 - $ref: "/schemas/types.yaml#/definitions/phandle" 26 + $ref: /schemas/types.yaml#/definitions/phandle 27 27 description: phandle to system configuration controller. 28 28 29 29 vdda-supply:
+1 -1
Documentation/devicetree/bindings/regulator/st,stm32-vrefbuf.yaml
··· 15 15 - Fabrice Gasnier <fabrice.gasnier@foss.st.com> 16 16 17 17 allOf: 18 - - $ref: "regulator.yaml#" 18 + - $ref: regulator.yaml# 19 19 20 20 properties: 21 21 compatible:
+1 -1
Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml
··· 26 26 "^(reg11|reg18|usb33)$": 27 27 type: object 28 28 29 - $ref: "regulator.yaml#" 29 + $ref: regulator.yaml# 30 30 31 31 required: 32 32 - compatible
+1 -1
Documentation/devicetree/bindings/regulator/ti,tps62360.yaml
··· 19 19 https://www.ti.com/lit/gpn/tps62360 20 20 21 21 allOf: 22 - - $ref: "regulator.yaml#" 22 + - $ref: regulator.yaml# 23 23 24 24 properties: 25 25 compatible:
+1 -1
Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml
··· 15 15 controller is also embedded. 16 16 17 17 allOf: 18 - - $ref: "regulator.yaml#" 18 + - $ref: regulator.yaml# 19 19 20 20 properties: 21 21 compatible:
+3 -3
Documentation/devicetree/bindings/regulator/wlf,arizona.yaml
··· 21 21 wlf,ldoena: 22 22 description: 23 23 GPIO specifier for the GPIO controlling LDOENA. 24 - $ref: "/schemas/types.yaml#/definitions/phandle-array" 24 + $ref: /schemas/types.yaml#/definitions/phandle-array 25 25 maxItems: 1 26 26 27 27 ldo1: 28 28 description: 29 29 Initial data for the LDO1 regulator. 30 - $ref: "regulator.yaml#" 30 + $ref: regulator.yaml# 31 31 type: object 32 32 33 33 micvdd: 34 34 description: 35 35 Initial data for the MICVDD regulator. 36 - $ref: "regulator.yaml#" 36 + $ref: regulator.yaml# 37 37 type: object 38 38 39 39 additionalProperties: true
+1
drivers/regulator/88pg86x.c
··· 101 101 static struct i2c_driver pg86x_regulator_driver = { 102 102 .driver = { 103 103 .name = "88pg86x", 104 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 104 105 .of_match_table = of_match_ptr(pg86x_dt_ids), 105 106 }, 106 107 .probe_new = pg86x_i2c_probe,
+1
drivers/regulator/88pm800-regulator.c
··· 274 274 static struct platform_driver pm800_regulator_driver = { 275 275 .driver = { 276 276 .name = "88pm80x-regulator", 277 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 277 278 }, 278 279 .probe = pm800_regulator_probe, 279 280 };
+1
drivers/regulator/88pm8607.c
··· 383 383 static struct platform_driver pm8607_regulator_driver = { 384 384 .driver = { 385 385 .name = "88pm860x-regulator", 386 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 386 387 }, 387 388 .probe = pm8607_regulator_probe, 388 389 .id_table = pm8607_regulator_driver_ids,
+23
drivers/regulator/Kconfig
··· 1082 1082 This adds support for voltage regulators in Richtek RT4801 Display Bias IC. 1083 1083 The device supports two regulators (DSVP/DSVN). 1084 1084 1085 + config REGULATOR_RT4803 1086 + tristate "Richtek RT4803 boost regualtor" 1087 + depends on I2C 1088 + select REGMAP_I2C 1089 + help 1090 + This adds support for RT4803 boost converter that integrates the 1091 + bypass switch. If the input voltage is low than the required voltage, 1092 + RT4803 will enter boost mode. Otherwise, enable internal bypass 1093 + switch to enter bypass mode. 1094 + 1085 1095 config REGULATOR_RT4831 1086 1096 tristate "Richtek RT4831 DSV Regulators" 1087 1097 depends on MFD_RT4831 ··· 1129 1119 It integratas 1 channel buck controller, 3 channels high efficiency 1130 1120 buck converters, 1 LDO, mute AC OFF depop function, with the general 1131 1121 I2C control interface. 1122 + 1123 + config REGULATOR_RT5739 1124 + tristate "Richtek RT5739 Regulator" 1125 + depends on I2C 1126 + select REGMAP_I2C 1127 + help 1128 + This adds support for voltage regulator in Richtek RT5739. 1129 + It's a step-down switching voltage regulator. Using a proprietary 1130 + architecture with synchronous rectification, it is capable of 1131 + delivering 3.5A continuously at over 80% efficiency. 1132 + 1133 + This driver can also be built as a module. If so, the module 1134 + will be called rt5739. 1132 1135 1133 1136 config REGULATOR_RT5759 1134 1137 tristate "Richtek RT5759 Regulator"
+2
drivers/regulator/Makefile
··· 130 130 obj-$(CONFIG_REGULATOR_RN5T618) += rn5t618-regulator.o 131 131 obj-$(CONFIG_REGULATOR_ROHM) += rohm-regulator.o 132 132 obj-$(CONFIG_REGULATOR_RT4801) += rt4801-regulator.o 133 + obj-$(CONFIG_REGULATOR_RT4803) += rt4803.o 133 134 obj-$(CONFIG_REGULATOR_RT4831) += rt4831-regulator.o 134 135 obj-$(CONFIG_REGULATOR_RT5033) += rt5033-regulator.o 135 136 obj-$(CONFIG_REGULATOR_RT5120) += rt5120-regulator.o 136 137 obj-$(CONFIG_REGULATOR_RT5190A) += rt5190a-regulator.o 138 + obj-$(CONFIG_REGULATOR_RT5739) += rt5739.o 137 139 obj-$(CONFIG_REGULATOR_RT5759) += rt5759-regulator.o 138 140 obj-$(CONFIG_REGULATOR_RT6160) += rt6160-regulator.o 139 141 obj-$(CONFIG_REGULATOR_RT6190) += rt6190-regulator.o
+1
drivers/regulator/aat2870-regulator.c
··· 178 178 static struct platform_driver aat2870_regulator_driver = { 179 179 .driver = { 180 180 .name = "aat2870-regulator", 181 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 181 182 }, 182 183 .probe = aat2870_regulator_probe, 183 184 };
+1
drivers/regulator/ab8500-ext.c
··· 446 446 .probe = ab8500_ext_regulator_probe, 447 447 .driver = { 448 448 .name = "ab8500-ext-regulator", 449 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 449 450 }, 450 451 }; 451 452
+1
drivers/regulator/ab8500.c
··· 1737 1737 .probe = ab8500_regulator_probe, 1738 1738 .driver = { 1739 1739 .name = "ab8500-regulator", 1740 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1740 1741 }, 1741 1742 }; 1742 1743
+1
drivers/regulator/act8865-regulator.c
··· 789 789 static struct i2c_driver act8865_pmic_driver = { 790 790 .driver = { 791 791 .name = "act8865", 792 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 792 793 }, 793 794 .probe_new = act8865_pmic_probe, 794 795 .id_table = act8865_ids,
+1
drivers/regulator/act8945a-regulator.c
··· 348 348 static struct platform_driver act8945a_pmic_driver = { 349 349 .driver = { 350 350 .name = "act8945a-regulator", 351 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 351 352 .pm = &act8945a_pm, 352 353 }, 353 354 .probe = act8945a_pmic_probe,
+1
drivers/regulator/ad5398.c
··· 257 257 .probe_new = ad5398_probe, 258 258 .driver = { 259 259 .name = "ad5398", 260 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 260 261 }, 261 262 .id_table = ad5398_id, 262 263 };
+1
drivers/regulator/anatop-regulator.c
··· 328 328 static struct platform_driver anatop_regulator_driver = { 329 329 .driver = { 330 330 .name = "anatop_regulator", 331 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 331 332 .of_match_table = of_anatop_regulator_match_tbl, 332 333 }, 333 334 .probe = anatop_regulator_probe,
+2
drivers/regulator/arizona-ldo1.c
··· 380 380 .remove = arizona_ldo1_remove, 381 381 .driver = { 382 382 .name = "arizona-ldo1", 383 + .probe_type = PROBE_FORCE_SYNCHRONOUS, 383 384 }, 384 385 }; 385 386 ··· 389 388 .remove = arizona_ldo1_remove, 390 389 .driver = { 391 390 .name = "madera-ldo1", 391 + .probe_type = PROBE_FORCE_SYNCHRONOUS, 392 392 }, 393 393 }; 394 394
+2
drivers/regulator/arizona-micsupp.c
··· 365 365 .probe = arizona_micsupp_probe, 366 366 .driver = { 367 367 .name = "arizona-micsupp", 368 + .probe_type = PROBE_FORCE_SYNCHRONOUS, 368 369 }, 369 370 }; 370 371 ··· 373 372 .probe = madera_micsupp_probe, 374 373 .driver = { 375 374 .name = "madera-micsupp", 375 + .probe_type = PROBE_FORCE_SYNCHRONOUS, 376 376 }, 377 377 }; 378 378
+1
drivers/regulator/as3711-regulator.c
··· 243 243 static struct platform_driver as3711_regulator_driver = { 244 244 .driver = { 245 245 .name = "as3711-regulator", 246 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 246 247 }, 247 248 .probe = as3711_regulator_probe, 248 249 };
+1
drivers/regulator/as3722-regulator.c
··· 831 831 static struct platform_driver as3722_regulator_driver = { 832 832 .driver = { 833 833 .name = "as3722-regulator", 834 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 834 835 .of_match_table = of_as3722_regulator_match, 835 836 }, 836 837 .probe = as3722_regulator_probe,
+1
drivers/regulator/atc260x-regulator.c
··· 530 530 .probe = atc260x_regulator_probe, 531 531 .driver = { 532 532 .name = "atc260x-regulator", 533 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 533 534 }, 534 535 }; 535 536
+1
drivers/regulator/axp20x-regulator.c
··· 1364 1364 .probe = axp20x_regulator_probe, 1365 1365 .driver = { 1366 1366 .name = "axp20x-regulator", 1367 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1367 1368 }, 1368 1369 }; 1369 1370
+1
drivers/regulator/bcm590xx-regulator.c
··· 354 354 static struct platform_driver bcm590xx_regulator_driver = { 355 355 .driver = { 356 356 .name = "bcm590xx-vregs", 357 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 357 358 }, 358 359 .probe = bcm590xx_probe, 359 360 };
+5 -4
drivers/regulator/bd71815-regulator.c
··· 201 201 202 202 data = container_of(desc, struct bd71815_regulator, desc); 203 203 204 - if (of_find_property(np, "rohm,dvs-run-voltage", NULL) || 205 - of_find_property(np, "rohm,dvs-suspend-voltage", NULL) || 206 - of_find_property(np, "rohm,dvs-lpsr-voltage", NULL) || 207 - of_find_property(np, "rohm,dvs-snvs-voltage", NULL)) { 204 + if (of_property_present(np, "rohm,dvs-run-voltage") || 205 + of_property_present(np, "rohm,dvs-suspend-voltage") || 206 + of_property_present(np, "rohm,dvs-lpsr-voltage") || 207 + of_property_present(np, "rohm,dvs-snvs-voltage")) { 208 208 ret = regmap_read(cfg->regmap, desc->vsel_reg, &val); 209 209 if (ret) 210 210 return ret; ··· 619 619 static struct platform_driver bd7181x_regulator = { 620 620 .driver = { 621 621 .name = "bd7181x-pmic", 622 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 622 623 }, 623 624 .probe = bd7181x_probe, 624 625 .id_table = bd7181x_pmic_id,
+2 -1
drivers/regulator/bd71828-regulator.c
··· 771 771 772 772 static struct platform_driver bd71828_regulator = { 773 773 .driver = { 774 - .name = "bd71828-pmic" 774 + .name = "bd71828-pmic", 775 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 775 776 }, 776 777 .probe = bd71828_probe, 777 778 };
+1
drivers/regulator/bd718x7-regulator.c
··· 1829 1829 static struct platform_driver bd718xx_regulator = { 1830 1830 .driver = { 1831 1831 .name = "bd718xx-pmic", 1832 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1832 1833 }, 1833 1834 .probe = bd718xx_probe, 1834 1835 .id_table = bd718x7_pmic_id,
+1
drivers/regulator/bd9571mwv-regulator.c
··· 353 353 static struct platform_driver bd9571mwv_regulator_driver = { 354 354 .driver = { 355 355 .name = "bd9571mwv-regulator", 356 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 356 357 .pm = DEV_PM_OPS, 357 358 }, 358 359 .probe = bd9571mwv_regulator_probe,
+1
drivers/regulator/bd9576-regulator.c
··· 1126 1126 static struct platform_driver bd957x_regulator = { 1127 1127 .driver = { 1128 1128 .name = "bd957x-pmic", 1129 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1129 1130 }, 1130 1131 .probe = bd957x_probe, 1131 1132 .id_table = bd957x_pmic_id,
+81 -12
drivers/regulator/core.c
··· 207 207 mutex_unlock(&regulator_nesting_mutex); 208 208 } 209 209 210 + /** 211 + * regulator_lock_two - lock two regulators 212 + * @rdev1: first regulator 213 + * @rdev2: second regulator 214 + * @ww_ctx: w/w mutex acquire context 215 + * 216 + * Locks both rdevs using the regulator_ww_class. 217 + */ 218 + static void regulator_lock_two(struct regulator_dev *rdev1, 219 + struct regulator_dev *rdev2, 220 + struct ww_acquire_ctx *ww_ctx) 221 + { 222 + struct regulator_dev *held, *contended; 223 + int ret; 224 + 225 + ww_acquire_init(ww_ctx, &regulator_ww_class); 226 + 227 + /* Try to just grab both of them */ 228 + ret = regulator_lock_nested(rdev1, ww_ctx); 229 + WARN_ON(ret); 230 + ret = regulator_lock_nested(rdev2, ww_ctx); 231 + if (ret != -EDEADLOCK) { 232 + WARN_ON(ret); 233 + goto exit; 234 + } 235 + 236 + held = rdev1; 237 + contended = rdev2; 238 + while (true) { 239 + regulator_unlock(held); 240 + 241 + ww_mutex_lock_slow(&contended->mutex, ww_ctx); 242 + contended->ref_cnt++; 243 + contended->mutex_owner = current; 244 + swap(held, contended); 245 + ret = regulator_lock_nested(contended, ww_ctx); 246 + 247 + if (ret != -EDEADLOCK) { 248 + WARN_ON(ret); 249 + break; 250 + } 251 + } 252 + 253 + exit: 254 + ww_acquire_done(ww_ctx); 255 + } 256 + 257 + /** 258 + * regulator_unlock_two - unlock two regulators 259 + * @rdev1: first regulator 260 + * @rdev2: second regulator 261 + * @ww_ctx: w/w mutex acquire context 262 + * 263 + * The inverse of regulator_lock_two(). 264 + */ 265 + 266 + static void regulator_unlock_two(struct regulator_dev *rdev1, 267 + struct regulator_dev *rdev2, 268 + struct ww_acquire_ctx *ww_ctx) 269 + { 270 + regulator_unlock(rdev2); 271 + regulator_unlock(rdev1); 272 + ww_acquire_fini(ww_ctx); 273 + } 274 + 210 275 static bool regulator_supply_is_couple(struct regulator_dev *rdev) 211 276 { 212 277 struct regulator_dev *c_rdev; ··· 399 334 ww_mutex_lock_slow(&new_contended_rdev->mutex, ww_ctx); 400 335 old_contended_rdev = new_contended_rdev; 401 336 old_contended_rdev->ref_cnt++; 337 + old_contended_rdev->mutex_owner = current; 402 338 } 403 339 404 340 err = regulator_lock_recursive(rdev, ··· 1649 1583 rdev->constraints->always_on = true; 1650 1584 } 1651 1585 1652 - if (rdev->desc->off_on_delay) 1653 - rdev->last_off = ktime_get_boottime(); 1654 - 1655 1586 /* If the constraints say the regulator should be on at this point 1656 1587 * and we have control then make sure it is enabled. 1657 1588 */ ··· 1682 1619 1683 1620 if (rdev->constraints->always_on) 1684 1621 rdev->use_count++; 1622 + } else if (rdev->desc->off_on_delay) { 1623 + rdev->last_off = ktime_get(); 1685 1624 } 1686 1625 1687 1626 print_constraints(rdev); ··· 1692 1627 1693 1628 /** 1694 1629 * set_supply - set regulator supply regulator 1695 - * @rdev: regulator name 1696 - * @supply_rdev: supply regulator name 1630 + * @rdev: regulator (locked) 1631 + * @supply_rdev: supply regulator (locked)) 1697 1632 * 1698 1633 * Called by platform initialisation code to set the supply regulator for this 1699 1634 * regulator. This ensures that a regulators supply will also be enabled by the ··· 1865 1800 struct regulator *regulator; 1866 1801 int err = 0; 1867 1802 1803 + lockdep_assert_held_once(&rdev->mutex.base); 1804 + 1868 1805 if (dev) { 1869 1806 char buf[REG_STR_SIZE]; 1870 1807 int size; ··· 1894 1827 regulator->rdev = rdev; 1895 1828 regulator->supply_name = supply_name; 1896 1829 1897 - regulator_lock(rdev); 1898 1830 list_add(&regulator->list, &rdev->consumer_list); 1899 - regulator_unlock(rdev); 1900 1831 1901 1832 if (dev) { 1902 1833 regulator->dev = dev; ··· 2060 1995 { 2061 1996 struct regulator_dev *r; 2062 1997 struct device *dev = rdev->dev.parent; 1998 + struct ww_acquire_ctx ww_ctx; 2063 1999 int ret = 0; 2064 2000 2065 2001 /* No supply to resolve? */ ··· 2127 2061 * between rdev->supply null check and setting rdev->supply in 2128 2062 * set_supply() from concurrent tasks. 2129 2063 */ 2130 - regulator_lock(rdev); 2064 + regulator_lock_two(rdev, r, &ww_ctx); 2131 2065 2132 2066 /* Supply just resolved by a concurrent task? */ 2133 2067 if (rdev->supply) { 2134 - regulator_unlock(rdev); 2068 + regulator_unlock_two(rdev, r, &ww_ctx); 2135 2069 put_device(&r->dev); 2136 2070 goto out; 2137 2071 } 2138 2072 2139 2073 ret = set_supply(rdev, r); 2140 2074 if (ret < 0) { 2141 - regulator_unlock(rdev); 2075 + regulator_unlock_two(rdev, r, &ww_ctx); 2142 2076 put_device(&r->dev); 2143 2077 goto out; 2144 2078 } 2145 2079 2146 - regulator_unlock(rdev); 2080 + regulator_unlock_two(rdev, r, &ww_ctx); 2147 2081 2148 2082 /* 2149 2083 * In set_machine_constraints() we may have turned this regulator on ··· 2256 2190 return regulator; 2257 2191 } 2258 2192 2193 + regulator_lock(rdev); 2259 2194 regulator = create_regulator(rdev, dev, id); 2195 + regulator_unlock(rdev); 2260 2196 if (regulator == NULL) { 2261 2197 regulator = ERR_PTR(-ENOMEM); 2262 2198 module_put(rdev->owner); ··· 2736 2668 2737 2669 trace_regulator_enable(rdev_get_name(rdev)); 2738 2670 2739 - if (rdev->desc->off_on_delay && rdev->last_off) { 2671 + if (rdev->desc->off_on_delay) { 2740 2672 /* if needed, keep a distance of off_on_delay from last time 2741 2673 * this regulator was disabled. 2742 2674 */ ··· 6117 6049 ww_mutex_lock_slow(&new_contended_rdev->mutex, ww_ctx); 6118 6050 old_contended_rdev = new_contended_rdev; 6119 6051 old_contended_rdev->ref_cnt++; 6052 + old_contended_rdev->mutex_owner = current; 6120 6053 } 6121 6054 6122 6055 err = regulator_summary_lock_all(ww_ctx,
+1
drivers/regulator/cpcap-regulator.c
··· 553 553 .probe = cpcap_regulator_probe, 554 554 .driver = { 555 555 .name = "cpcap-regulator", 556 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 556 557 .of_match_table = of_match_ptr(cpcap_regulator_id_table), 557 558 }, 558 559 };
+1
drivers/regulator/cros-ec-regulator.c
··· 215 215 .probe = cros_ec_regulator_probe, 216 216 .driver = { 217 217 .name = "cros-ec-regulator", 218 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 218 219 .of_match_table = regulator_cros_ec_of_match, 219 220 }, 220 221 };
+1
drivers/regulator/da903x-regulator.c
··· 471 471 static struct platform_driver da903x_regulator_driver = { 472 472 .driver = { 473 473 .name = "da903x-regulator", 474 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 474 475 }, 475 476 .probe = da903x_regulator_probe, 476 477 };
+1
drivers/regulator/da9052-regulator.c
··· 438 438 .probe = da9052_regulator_probe, 439 439 .driver = { 440 440 .name = "da9052-regulator", 441 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 441 442 }, 442 443 }; 443 444
+1
drivers/regulator/da9055-regulator.c
··· 576 576 .probe = da9055_regulator_probe, 577 577 .driver = { 578 578 .name = "da9055-regulator", 579 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 579 580 }, 580 581 }; 581 582
+1
drivers/regulator/da9062-regulator.c
··· 1033 1033 static struct platform_driver da9062_regulator_driver = { 1034 1034 .driver = { 1035 1035 .name = "da9062-regulators", 1036 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1036 1037 }, 1037 1038 .probe = da9062_regulator_probe, 1038 1039 };
+120 -28
drivers/regulator/da9063-regulator.c
··· 83 83 84 84 /* DA9063 event detection bit */ 85 85 struct reg_field oc_event; 86 + 87 + /* DA9063 voltage monitor bit */ 88 + struct reg_field vmon; 86 89 }; 87 90 88 91 /* Macros for LDO */ ··· 151 148 struct regmap_field *suspend; 152 149 struct regmap_field *sleep; 153 150 struct regmap_field *suspend_sleep; 151 + struct regmap_field *vmon; 154 152 }; 155 153 156 154 /* Encapsulates all information for the regulators driver */ ··· 206 202 3000000, 3200000, 3400000, 3600000, 3800000, 4000000, 4200000, 4400000, 207 203 4600000, 4800000, 5000000, 5200000, 5400000, 5600000, 5800000, 6000000 208 204 }; 205 + 206 + static int da9063_set_xvp(struct regulator_dev *rdev, int lim_uV, int severity, bool enable) 207 + { 208 + struct da9063_regulator *regl = rdev_get_drvdata(rdev); 209 + struct device *dev = regl->hw->dev; 210 + 211 + dev_dbg(dev, "%s: lim: %d, sev: %d, en: %d\n", regl->desc.name, lim_uV, severity, enable); 212 + 213 + /* 214 + * only support enable and disable. 215 + * the da9063 offers a GPIO (GP_FB2) which is unasserted if an XV happens. 216 + * therefore ignore severity here, as there might be handlers in hardware. 217 + */ 218 + if (lim_uV) 219 + return -EINVAL; 220 + 221 + return regmap_field_write(regl->vmon, enable ? 1 : 0); 222 + } 209 223 210 224 static int da9063_buck_set_mode(struct regulator_dev *rdev, unsigned int mode) 211 225 { ··· 563 541 } 564 542 565 543 static const struct regulator_ops da9063_buck_ops = { 566 - .enable = regulator_enable_regmap, 567 - .disable = regulator_disable_regmap, 568 - .is_enabled = regulator_is_enabled_regmap, 569 - .get_voltage_sel = regulator_get_voltage_sel_regmap, 570 - .set_voltage_sel = regulator_set_voltage_sel_regmap, 571 - .list_voltage = regulator_list_voltage_linear, 572 - .set_current_limit = da9063_buck_set_current_limit, 573 - .get_current_limit = da9063_buck_get_current_limit, 574 - .set_mode = da9063_buck_set_mode, 575 - .get_mode = da9063_buck_get_mode, 576 - .get_status = da9063_buck_get_status, 577 - .set_suspend_voltage = da9063_set_suspend_voltage, 578 - .set_suspend_enable = da9063_suspend_enable, 579 - .set_suspend_disable = da9063_suspend_disable, 580 - .set_suspend_mode = da9063_buck_set_suspend_mode, 544 + .enable = regulator_enable_regmap, 545 + .disable = regulator_disable_regmap, 546 + .is_enabled = regulator_is_enabled_regmap, 547 + .get_voltage_sel = regulator_get_voltage_sel_regmap, 548 + .set_voltage_sel = regulator_set_voltage_sel_regmap, 549 + .list_voltage = regulator_list_voltage_linear, 550 + .set_current_limit = da9063_buck_set_current_limit, 551 + .get_current_limit = da9063_buck_get_current_limit, 552 + .set_mode = da9063_buck_set_mode, 553 + .get_mode = da9063_buck_get_mode, 554 + .get_status = da9063_buck_get_status, 555 + .set_suspend_voltage = da9063_set_suspend_voltage, 556 + .set_suspend_enable = da9063_suspend_enable, 557 + .set_suspend_disable = da9063_suspend_disable, 558 + .set_suspend_mode = da9063_buck_set_suspend_mode, 559 + .set_over_voltage_protection = da9063_set_xvp, 560 + .set_under_voltage_protection = da9063_set_xvp, 581 561 }; 582 562 583 563 static const struct regulator_ops da9063_ldo_ops = { 584 - .enable = regulator_enable_regmap, 585 - .disable = regulator_disable_regmap, 586 - .is_enabled = regulator_is_enabled_regmap, 587 - .get_voltage_sel = regulator_get_voltage_sel_regmap, 588 - .set_voltage_sel = regulator_set_voltage_sel_regmap, 589 - .list_voltage = regulator_list_voltage_linear, 590 - .set_mode = da9063_ldo_set_mode, 591 - .get_mode = da9063_ldo_get_mode, 592 - .get_status = da9063_ldo_get_status, 593 - .set_suspend_voltage = da9063_set_suspend_voltage, 594 - .set_suspend_enable = da9063_suspend_enable, 595 - .set_suspend_disable = da9063_suspend_disable, 596 - .set_suspend_mode = da9063_ldo_set_suspend_mode, 564 + .enable = regulator_enable_regmap, 565 + .disable = regulator_disable_regmap, 566 + .is_enabled = regulator_is_enabled_regmap, 567 + .get_voltage_sel = regulator_get_voltage_sel_regmap, 568 + .set_voltage_sel = regulator_set_voltage_sel_regmap, 569 + .list_voltage = regulator_list_voltage_linear, 570 + .set_mode = da9063_ldo_set_mode, 571 + .get_mode = da9063_ldo_get_mode, 572 + .get_status = da9063_ldo_get_status, 573 + .set_suspend_voltage = da9063_set_suspend_voltage, 574 + .set_suspend_enable = da9063_suspend_enable, 575 + .set_suspend_disable = da9063_suspend_disable, 576 + .set_suspend_mode = da9063_ldo_set_suspend_mode, 577 + .set_over_voltage_protection = da9063_set_xvp, 578 + .set_under_voltage_protection = da9063_set_xvp, 597 579 }; 598 580 599 581 /* Info of regulators for DA9063 */ ··· 607 581 da9063_buck_a_limits, 608 582 DA9063_REG_BUCK_ILIM_C, DA9063_BCORE1_ILIM_MASK), 609 583 DA9063_BUCK_COMMON_FIELDS(BCORE1), 584 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BCORE1_MON_EN), 610 585 }, 611 586 { 612 587 DA9063_BUCK(DA9063, BCORE2, 300, 10, 1570, 613 588 da9063_buck_a_limits, 614 589 DA9063_REG_BUCK_ILIM_C, DA9063_BCORE2_ILIM_MASK), 615 590 DA9063_BUCK_COMMON_FIELDS(BCORE2), 591 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BCORE2_MON_EN), 616 592 }, 617 593 { 618 594 DA9063_BUCK(DA9063, BPRO, 530, 10, 1800, 619 595 da9063_buck_a_limits, 620 596 DA9063_REG_BUCK_ILIM_B, DA9063_BPRO_ILIM_MASK), 621 597 DA9063_BUCK_COMMON_FIELDS(BPRO), 598 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BPRO_MON_EN), 622 599 }, 623 600 { 624 601 DA9063_BUCK(DA9063, BMEM, 800, 20, 3340, 625 602 da9063_buck_b_limits, 626 603 DA9063_REG_BUCK_ILIM_A, DA9063_BMEM_ILIM_MASK), 627 604 DA9063_BUCK_COMMON_FIELDS(BMEM), 605 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BMEM_MON_EN), 628 606 }, 629 607 { 630 608 DA9063_BUCK(DA9063, BIO, 800, 20, 3340, 631 609 da9063_buck_b_limits, 632 610 DA9063_REG_BUCK_ILIM_A, DA9063_BIO_ILIM_MASK), 633 611 DA9063_BUCK_COMMON_FIELDS(BIO), 612 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BIO_MON_EN), 634 613 }, 635 614 { 636 615 DA9063_BUCK(DA9063, BPERI, 800, 20, 3340, 637 616 da9063_buck_b_limits, 638 617 DA9063_REG_BUCK_ILIM_B, DA9063_BPERI_ILIM_MASK), 639 618 DA9063_BUCK_COMMON_FIELDS(BPERI), 619 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BPERI_MON_EN), 640 620 }, 641 621 { 642 622 DA9063_BUCK(DA9063, BCORES_MERGED, 300, 10, 1570, ··· 650 618 DA9063_REG_BUCK_ILIM_C, DA9063_BCORE1_ILIM_MASK), 651 619 /* BCORES_MERGED uses the same register fields as BCORE1 */ 652 620 DA9063_BUCK_COMMON_FIELDS(BCORE1), 621 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BCORE1_MON_EN), 653 622 }, 654 623 { 655 624 DA9063_BUCK(DA9063, BMEM_BIO_MERGED, 800, 20, 3340, ··· 658 625 DA9063_REG_BUCK_ILIM_A, DA9063_BMEM_ILIM_MASK), 659 626 /* BMEM_BIO_MERGED uses the same register fields as BMEM */ 660 627 DA9063_BUCK_COMMON_FIELDS(BMEM), 628 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_4, DA9063_BMEM_MON_EN), 661 629 }, 662 630 { 663 631 DA9063_LDO(DA9063, LDO3, 900, 20, 3440), 664 632 .oc_event = BFIELD(DA9063_REG_STATUS_D, DA9063_LDO3_LIM), 633 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO3_MON_EN), 665 634 }, 666 635 { 667 636 DA9063_LDO(DA9063, LDO7, 900, 50, 3600), 668 637 .oc_event = BFIELD(DA9063_REG_STATUS_D, DA9063_LDO7_LIM), 638 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO7_MON_EN), 669 639 }, 670 640 { 671 641 DA9063_LDO(DA9063, LDO8, 900, 50, 3600), 672 642 .oc_event = BFIELD(DA9063_REG_STATUS_D, DA9063_LDO8_LIM), 643 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO8_MON_EN), 673 644 }, 674 645 { 675 646 DA9063_LDO(DA9063, LDO9, 950, 50, 3600), 647 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_3, DA9063_LDO9_MON_EN), 676 648 }, 677 649 { 678 650 DA9063_LDO(DA9063, LDO11, 900, 50, 3600), 679 651 .oc_event = BFIELD(DA9063_REG_STATUS_D, DA9063_LDO11_LIM), 652 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_3, DA9063_LDO11_MON_EN), 680 653 }, 681 654 682 655 /* The following LDOs are present only on DA9063, not on DA9063L */ 683 656 { 684 657 DA9063_LDO(DA9063, LDO1, 600, 20, 1860), 658 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO1_MON_EN), 685 659 }, 686 660 { 687 661 DA9063_LDO(DA9063, LDO2, 600, 20, 1860), 662 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO2_MON_EN), 688 663 }, 689 664 { 690 665 DA9063_LDO(DA9063, LDO4, 900, 20, 3440), 691 666 .oc_event = BFIELD(DA9063_REG_STATUS_D, DA9063_LDO4_LIM), 667 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO4_MON_EN), 692 668 }, 693 669 { 694 670 DA9063_LDO(DA9063, LDO5, 900, 50, 3600), 671 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO5_MON_EN), 695 672 }, 696 673 { 697 674 DA9063_LDO(DA9063, LDO6, 900, 50, 3600), 675 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_2, DA9063_LDO6_MON_EN), 698 676 }, 699 677 700 678 { 701 679 DA9063_LDO(DA9063, LDO10, 900, 50, 3600), 680 + .vmon = BFIELD(DA9063_BB_REG_MON_REG_3, DA9063_LDO10_MON_EN), 702 681 }, 703 682 }; 704 683 ··· 769 724 } 770 725 771 726 return NULL; 727 + } 728 + 729 + static int da9063_check_xvp_constraints(struct regulator_config *config) 730 + { 731 + struct da9063_regulator *regl = config->driver_data; 732 + const struct regulation_constraints *constr = &config->init_data->constraints; 733 + const struct notification_limit *uv_l = &constr->under_voltage_limits; 734 + const struct notification_limit *ov_l = &constr->over_voltage_limits; 735 + 736 + /* make sure that only one severity is used to clarify if unchanged, enabled or disabled */ 737 + if ((!!uv_l->prot + !!uv_l->err + !!uv_l->warn) > 1) { 738 + dev_err(config->dev, "%s: at most one voltage monitoring severity allowed!\n", 739 + regl->desc.name); 740 + return -EINVAL; 741 + } 742 + 743 + /* make sure that UV and OV monitoring is set to the same severity and value */ 744 + if (uv_l->prot != ov_l->prot) { 745 + dev_err(config->dev, 746 + "%s: protection-microvolt: value must be equal for uv and ov!\n", 747 + regl->desc.name); 748 + return -EINVAL; 749 + } 750 + if (uv_l->err != ov_l->err) { 751 + dev_err(config->dev, "%s: error-microvolt: value must be equal for uv and ov!\n", 752 + regl->desc.name); 753 + return -EINVAL; 754 + } 755 + if (uv_l->warn != ov_l->warn) { 756 + dev_err(config->dev, "%s: warn-microvolt: value must be equal for uv and ov!\n", 757 + regl->desc.name); 758 + return -EINVAL; 759 + } 760 + 761 + return 0; 772 762 } 773 763 774 764 static struct of_regulator_match da9063_matches[] = { ··· 1012 932 if (IS_ERR(regl->suspend_sleep)) 1013 933 return PTR_ERR(regl->suspend_sleep); 1014 934 } 935 + if (regl->info->vmon.reg) { 936 + regl->vmon = devm_regmap_field_alloc(&pdev->dev, 937 + da9063->regmap, regl->info->vmon); 938 + if (IS_ERR(regl->vmon)) 939 + return PTR_ERR(regl->vmon); 940 + } 1015 941 1016 942 /* Register regulator */ 1017 943 memset(&config, 0, sizeof(config)); ··· 1027 941 if (da9063_reg_matches) 1028 942 config.of_node = da9063_reg_matches[id].of_node; 1029 943 config.regmap = da9063->regmap; 944 + 945 + ret = da9063_check_xvp_constraints(&config); 946 + if (ret) 947 + return ret; 948 + 1030 949 regl->rdev = devm_regulator_register(&pdev->dev, &regl->desc, 1031 950 &config); 1032 951 if (IS_ERR(regl->rdev)) { ··· 1062 971 static struct platform_driver da9063_regulator_driver = { 1063 972 .driver = { 1064 973 .name = DA9063_DRVNAME_REGULATORS, 974 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1065 975 }, 1066 976 .probe = da9063_regulator_probe, 1067 977 };
+1
drivers/regulator/da9121-regulator.c
··· 1194 1194 static struct i2c_driver da9121_regulator_driver = { 1195 1195 .driver = { 1196 1196 .name = "da9121", 1197 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1197 1198 .of_match_table = of_match_ptr(da9121_dt_ids), 1198 1199 }, 1199 1200 .probe_new = da9121_i2c_probe,
+1
drivers/regulator/da9210-regulator.c
··· 221 221 static struct i2c_driver da9210_regulator_driver = { 222 222 .driver = { 223 223 .name = "da9210", 224 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 224 225 .of_match_table = of_match_ptr(da9210_dt_ids), 225 226 }, 226 227 .probe_new = da9210_i2c_probe,
+1
drivers/regulator/da9211-regulator.c
··· 552 552 static struct i2c_driver da9211_regulator_driver = { 553 553 .driver = { 554 554 .name = "da9211", 555 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 555 556 .of_match_table = of_match_ptr(da9211_dt_ids), 556 557 }, 557 558 .probe_new = da9211_i2c_probe,
+1
drivers/regulator/db8500-prcmu.c
··· 479 479 static struct platform_driver db8500_regulator_driver = { 480 480 .driver = { 481 481 .name = "db8500-prcmu-regulators", 482 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 482 483 }, 483 484 .probe = db8500_regulator_probe, 484 485 .remove = db8500_regulator_remove,
+1
drivers/regulator/dummy.c
··· 60 60 .probe = dummy_regulator_probe, 61 61 .driver = { 62 62 .name = "reg-dummy", 63 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 63 64 }, 64 65 }; 65 66
+151 -42
drivers/regulator/fan53555.c
··· 8 8 // Copyright (c) 2012 Marvell Technology Ltd. 9 9 // Yunfan Zhang <yfzhang@marvell.com> 10 10 11 - #include <linux/bits.h> 11 + #include <linux/bitops.h> 12 12 #include <linux/err.h> 13 13 #include <linux/i2c.h> 14 14 #include <linux/module.h> ··· 26 26 #define FAN53555_VSEL0 0x00 27 27 #define FAN53555_VSEL1 0x01 28 28 29 + #define RK8602_VSEL0 0x06 30 + #define RK8602_VSEL1 0x07 31 + 29 32 #define TCS4525_VSEL0 0x11 30 33 #define TCS4525_VSEL1 0x10 31 34 #define TCS4525_TIME 0x13 ··· 44 41 #define FAN53555_MONITOR 0x05 45 42 46 43 /* VSEL bit definitions */ 47 - #define VSEL_BUCK_EN (1 << 7) 48 - #define VSEL_MODE (1 << 6) 44 + #define VSEL_BUCK_EN BIT(7) 45 + #define VSEL_MODE BIT(6) 49 46 /* Chip ID and Verison */ 50 - #define DIE_ID 0x0F /* ID1 */ 51 - #define DIE_REV 0x0F /* ID2 */ 47 + #define DIE_ID 0x0F /* ID1 */ 48 + #define DIE_REV 0x0F /* ID2 */ 52 49 /* Control bit definitions */ 53 - #define CTL_OUTPUT_DISCHG (1 << 7) 54 - #define CTL_SLEW_MASK (0x7 << 4) 55 - #define CTL_SLEW_SHIFT 4 56 - #define CTL_RESET (1 << 2) 50 + #define CTL_OUTPUT_DISCHG BIT(7) 51 + #define CTL_SLEW_MASK GENMASK(6, 4) 52 + #define CTL_RESET BIT(2) 57 53 #define CTL_MODE_VSEL0_MODE BIT(0) 58 54 #define CTL_MODE_VSEL1_MODE BIT(1) 59 55 60 56 #define FAN53555_NVOLTAGES 64 /* Numbers of voltages */ 61 57 #define FAN53526_NVOLTAGES 128 58 + #define RK8602_NVOLTAGES 160 62 59 63 - #define TCS_VSEL0_MODE (1 << 7) 64 - #define TCS_VSEL1_MODE (1 << 6) 60 + #define TCS_VSEL0_MODE BIT(7) 61 + #define TCS_VSEL1_MODE BIT(6) 65 62 66 - #define TCS_SLEW_SHIFT 3 67 63 #define TCS_SLEW_MASK GENMASK(4, 3) 68 64 69 65 enum fan53555_vendor { 70 66 FAN53526_VENDOR_FAIRCHILD = 0, 71 67 FAN53555_VENDOR_FAIRCHILD, 68 + FAN53555_VENDOR_ROCKCHIP, /* RK8600, RK8601 */ 69 + RK8602_VENDOR_ROCKCHIP, /* RK8602, RK8603 */ 72 70 FAN53555_VENDOR_SILERGY, 73 71 FAN53526_VENDOR_TCS, 74 72 }; ··· 91 87 FAN53555_CHIP_ID_04, 92 88 FAN53555_CHIP_ID_05, 93 89 FAN53555_CHIP_ID_08 = 8, 90 + }; 91 + 92 + enum { 93 + RK8600_CHIP_ID_08 = 8, /* RK8600, RK8601 */ 94 + }; 95 + 96 + enum { 97 + RK8602_CHIP_ID_10 = 10, /* RK8602, RK8603 */ 94 98 }; 95 99 96 100 enum { ··· 131 119 /* Voltage setting register */ 132 120 unsigned int vol_reg; 133 121 unsigned int sleep_reg; 122 + unsigned int en_reg; 123 + unsigned int sleep_en_reg; 134 124 /* Voltage range and step(linear) */ 135 125 unsigned int vsel_min; 136 126 unsigned int vsel_step; ··· 175 161 { 176 162 struct fan53555_device_info *di = rdev_get_drvdata(rdev); 177 163 178 - return regmap_update_bits(rdev->regmap, di->sleep_reg, 164 + return regmap_update_bits(rdev->regmap, di->sleep_en_reg, 179 165 VSEL_BUCK_EN, VSEL_BUCK_EN); 180 166 } 181 167 ··· 183 169 { 184 170 struct fan53555_device_info *di = rdev_get_drvdata(rdev); 185 171 186 - return regmap_update_bits(rdev->regmap, di->sleep_reg, 172 + return regmap_update_bits(rdev->regmap, di->sleep_en_reg, 187 173 VSEL_BUCK_EN, 0); 188 174 } 189 175 ··· 333 319 return 0; 334 320 } 335 321 322 + static int fan53555_voltages_setup_rockchip(struct fan53555_device_info *di) 323 + { 324 + /* Init voltage range and step */ 325 + switch (di->chip_id) { 326 + case RK8600_CHIP_ID_08: 327 + di->vsel_min = 712500; 328 + di->vsel_step = 12500; 329 + break; 330 + default: 331 + dev_err(di->dev, 332 + "Chip ID %d not supported!\n", di->chip_id); 333 + return -EINVAL; 334 + } 335 + di->slew_reg = FAN53555_CONTROL; 336 + di->slew_mask = CTL_SLEW_MASK; 337 + di->ramp_delay_table = slew_rates; 338 + di->n_ramp_values = ARRAY_SIZE(slew_rates); 339 + di->vsel_count = FAN53555_NVOLTAGES; 340 + 341 + return 0; 342 + } 343 + 344 + static int rk8602_voltages_setup_rockchip(struct fan53555_device_info *di) 345 + { 346 + /* Init voltage range and step */ 347 + switch (di->chip_id) { 348 + case RK8602_CHIP_ID_10: 349 + di->vsel_min = 500000; 350 + di->vsel_step = 6250; 351 + break; 352 + default: 353 + dev_err(di->dev, 354 + "Chip ID %d not supported!\n", di->chip_id); 355 + return -EINVAL; 356 + } 357 + di->slew_reg = FAN53555_CONTROL; 358 + di->slew_mask = CTL_SLEW_MASK; 359 + di->ramp_delay_table = slew_rates; 360 + di->n_ramp_values = ARRAY_SIZE(slew_rates); 361 + di->vsel_count = RK8602_NVOLTAGES; 362 + 363 + return 0; 364 + } 365 + 336 366 static int fan53555_voltages_setup_silergy(struct fan53555_device_info *di) 337 367 { 338 368 /* Init voltage range and step */ ··· 437 379 switch (di->vendor) { 438 380 case FAN53526_VENDOR_FAIRCHILD: 439 381 case FAN53555_VENDOR_FAIRCHILD: 382 + case FAN53555_VENDOR_ROCKCHIP: 440 383 case FAN53555_VENDOR_SILERGY: 441 384 switch (pdata->sleep_vsel_id) { 442 385 case FAN53555_VSEL_ID_0: ··· 447 388 case FAN53555_VSEL_ID_1: 448 389 di->sleep_reg = FAN53555_VSEL1; 449 390 di->vol_reg = FAN53555_VSEL0; 391 + break; 392 + default: 393 + dev_err(di->dev, "Invalid VSEL ID!\n"); 394 + return -EINVAL; 395 + } 396 + di->sleep_en_reg = di->sleep_reg; 397 + di->en_reg = di->vol_reg; 398 + break; 399 + case RK8602_VENDOR_ROCKCHIP: 400 + switch (pdata->sleep_vsel_id) { 401 + case FAN53555_VSEL_ID_0: 402 + di->sleep_reg = RK8602_VSEL0; 403 + di->vol_reg = RK8602_VSEL1; 404 + di->sleep_en_reg = FAN53555_VSEL0; 405 + di->en_reg = FAN53555_VSEL1; 406 + break; 407 + case FAN53555_VSEL_ID_1: 408 + di->sleep_reg = RK8602_VSEL1; 409 + di->vol_reg = RK8602_VSEL0; 410 + di->sleep_en_reg = FAN53555_VSEL1; 411 + di->en_reg = FAN53555_VSEL0; 450 412 break; 451 413 default: 452 414 dev_err(di->dev, "Invalid VSEL ID!\n"); ··· 488 408 dev_err(di->dev, "Invalid VSEL ID!\n"); 489 409 return -EINVAL; 490 410 } 411 + di->sleep_en_reg = di->sleep_reg; 412 + di->en_reg = di->vol_reg; 491 413 break; 492 414 default: 493 415 dev_err(di->dev, "vendor %d not supported!\n", di->vendor); ··· 511 429 } 512 430 break; 513 431 case FAN53555_VENDOR_FAIRCHILD: 432 + case FAN53555_VENDOR_ROCKCHIP: 514 433 case FAN53555_VENDOR_SILERGY: 515 434 di->mode_reg = di->vol_reg; 516 435 di->mode_mask = VSEL_MODE; 436 + break; 437 + case RK8602_VENDOR_ROCKCHIP: 438 + di->mode_mask = VSEL_MODE; 439 + 440 + switch (pdata->sleep_vsel_id) { 441 + case FAN53555_VSEL_ID_0: 442 + di->mode_reg = FAN53555_VSEL1; 443 + break; 444 + case FAN53555_VSEL_ID_1: 445 + di->mode_reg = FAN53555_VSEL0; 446 + break; 447 + } 517 448 break; 518 449 case FAN53526_VENDOR_TCS: 519 450 di->mode_reg = TCS4525_COMMAND; ··· 553 458 case FAN53555_VENDOR_FAIRCHILD: 554 459 ret = fan53555_voltages_setup_fairchild(di); 555 460 break; 461 + case FAN53555_VENDOR_ROCKCHIP: 462 + ret = fan53555_voltages_setup_rockchip(di); 463 + break; 464 + case RK8602_VENDOR_ROCKCHIP: 465 + ret = rk8602_voltages_setup_rockchip(di); 466 + break; 556 467 case FAN53555_VENDOR_SILERGY: 557 468 ret = fan53555_voltages_setup_silergy(di); 558 469 break; ··· 584 483 rdesc->ops = &fan53555_regulator_ops; 585 484 rdesc->type = REGULATOR_VOLTAGE; 586 485 rdesc->n_voltages = di->vsel_count; 587 - rdesc->enable_reg = di->vol_reg; 486 + rdesc->enable_reg = di->en_reg; 588 487 rdesc->enable_mask = VSEL_BUCK_EN; 589 488 rdesc->min_uV = di->vsel_min; 590 489 rdesc->uV_step = di->vsel_step; 591 490 rdesc->vsel_reg = di->vol_reg; 592 - rdesc->vsel_mask = di->vsel_count - 1; 491 + rdesc->vsel_mask = BIT(fls(di->vsel_count - 1)) - 1; 593 492 rdesc->ramp_reg = di->slew_reg; 594 493 rdesc->ramp_mask = di->slew_mask; 595 494 rdesc->ramp_delay_table = di->ramp_delay_table; ··· 635 534 .compatible = "fcs,fan53555", 636 535 .data = (void *)FAN53555_VENDOR_FAIRCHILD 637 536 }, { 537 + .compatible = "rockchip,rk8600", 538 + .data = (void *)FAN53555_VENDOR_ROCKCHIP 539 + }, { 540 + .compatible = "rockchip,rk8602", 541 + .data = (void *)RK8602_VENDOR_ROCKCHIP 542 + }, { 638 543 .compatible = "silergy,syr827", 639 544 .data = (void *)FAN53555_VENDOR_SILERGY, 640 545 }, { ··· 677 570 if (!pdata) 678 571 pdata = fan53555_parse_dt(&client->dev, np, &di->desc); 679 572 680 - if (!pdata || !pdata->regulator) { 681 - dev_err(&client->dev, "Platform data not found!\n"); 682 - return -ENODEV; 683 - } 573 + if (!pdata || !pdata->regulator) 574 + return dev_err_probe(&client->dev, -ENODEV, 575 + "Platform data not found!\n"); 684 576 685 577 di->regulator = pdata->regulator; 686 578 if (client->dev.of_node) { ··· 688 582 } else { 689 583 /* if no ramp constraint set, get the pdata ramp_delay */ 690 584 if (!di->regulator->constraints.ramp_delay) { 691 - if (pdata->slew_rate >= ARRAY_SIZE(slew_rates)) { 692 - dev_err(&client->dev, "Invalid slew_rate\n"); 693 - return -EINVAL; 694 - } 585 + if (pdata->slew_rate >= ARRAY_SIZE(slew_rates)) 586 + return dev_err_probe(&client->dev, -EINVAL, 587 + "Invalid slew_rate\n"); 695 588 696 589 di->regulator->constraints.ramp_delay 697 590 = slew_rates[pdata->slew_rate]; ··· 700 595 } 701 596 702 597 regmap = devm_regmap_init_i2c(client, &fan53555_regmap_config); 703 - if (IS_ERR(regmap)) { 704 - dev_err(&client->dev, "Failed to allocate regmap!\n"); 705 - return PTR_ERR(regmap); 706 - } 598 + if (IS_ERR(regmap)) 599 + return dev_err_probe(&client->dev, PTR_ERR(regmap), 600 + "Failed to allocate regmap!\n"); 601 + 707 602 di->dev = &client->dev; 708 603 i2c_set_clientdata(client, di); 709 604 /* Get chip ID */ 710 605 ret = regmap_read(regmap, FAN53555_ID1, &val); 711 - if (ret < 0) { 712 - dev_err(&client->dev, "Failed to get chip ID!\n"); 713 - return ret; 714 - } 606 + if (ret < 0) 607 + return dev_err_probe(&client->dev, ret, "Failed to get chip ID!\n"); 608 + 715 609 di->chip_id = val & DIE_ID; 716 610 /* Get chip revision */ 717 611 ret = regmap_read(regmap, FAN53555_ID2, &val); 718 - if (ret < 0) { 719 - dev_err(&client->dev, "Failed to get chip Rev!\n"); 720 - return ret; 721 - } 612 + if (ret < 0) 613 + return dev_err_probe(&client->dev, ret, "Failed to get chip Rev!\n"); 614 + 722 615 di->chip_rev = val & DIE_REV; 723 616 dev_info(&client->dev, "FAN53555 Option[%d] Rev[%d] Detected!\n", 724 617 di->chip_id, di->chip_rev); 725 618 /* Device init */ 726 619 ret = fan53555_device_setup(di, pdata); 727 - if (ret < 0) { 728 - dev_err(&client->dev, "Failed to setup device!\n"); 729 - return ret; 730 - } 620 + if (ret < 0) 621 + return dev_err_probe(&client->dev, ret, "Failed to setup device!\n"); 622 + 731 623 /* Register regulator */ 732 624 config.dev = di->dev; 733 625 config.init_data = di->regulator; ··· 734 632 735 633 ret = fan53555_regulator_register(di, &config); 736 634 if (ret < 0) 737 - dev_err(&client->dev, "Failed to register regulator!\n"); 738 - return ret; 635 + dev_err_probe(&client->dev, ret, "Failed to register regulator!\n"); 739 636 637 + return ret; 740 638 } 741 639 742 640 static const struct i2c_device_id fan53555_id[] = { ··· 746 644 }, { 747 645 .name = "fan53555", 748 646 .driver_data = FAN53555_VENDOR_FAIRCHILD 647 + }, { 648 + .name = "rk8600", 649 + .driver_data = FAN53555_VENDOR_ROCKCHIP 650 + }, { 651 + .name = "rk8602", 652 + .driver_data = RK8602_VENDOR_ROCKCHIP 749 653 }, { 750 654 .name = "syr827", 751 655 .driver_data = FAN53555_VENDOR_SILERGY ··· 772 664 static struct i2c_driver fan53555_regulator_driver = { 773 665 .driver = { 774 666 .name = "fan53555-regulator", 667 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 775 668 .of_match_table = of_match_ptr(fan53555_dt_ids), 776 669 }, 777 670 .probe_new = fan53555_regulator_probe,
+1
drivers/regulator/fan53880.c
··· 172 172 static struct i2c_driver fan53880_regulator_driver = { 173 173 .driver = { 174 174 .name = "fan53880", 175 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 175 176 .of_match_table = fan53880_dt_ids, 176 177 }, 177 178 .probe_new = fan53880_i2c_probe,
+2 -1
drivers/regulator/fixed.c
··· 151 151 of_property_read_u32(np, "startup-delay-us", &config->startup_delay); 152 152 of_property_read_u32(np, "off-on-delay-us", &config->off_on_delay); 153 153 154 - if (of_find_property(np, "vin-supply", NULL)) 154 + if (of_property_present(np, "vin-supply")) 155 155 config->input_supply = "vin"; 156 156 157 157 return config; ··· 334 334 .probe = reg_fixed_voltage_probe, 335 335 .driver = { 336 336 .name = "reg-fixed-voltage", 337 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 337 338 .of_match_table = of_match_ptr(fixed_of_match), 338 339 }, 339 340 };
+2 -1
drivers/regulator/gpio-regulator.c
··· 220 220 regtype); 221 221 } 222 222 223 - if (of_find_property(np, "vin-supply", NULL)) 223 + if (of_property_present(np, "vin-supply")) 224 224 config->input_supply = "vin"; 225 225 226 226 return config; ··· 368 368 .probe = gpio_regulator_probe, 369 369 .driver = { 370 370 .name = "gpio-regulator", 371 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 371 372 .of_match_table = of_match_ptr(regulator_gpio_of_match), 372 373 }, 373 374 };
+1
drivers/regulator/hi6421-regulator.c
··· 579 579 .id_table = hi6421_regulator_table, 580 580 .driver = { 581 581 .name = "hi6421-regulator", 582 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 582 583 }, 583 584 .probe = hi6421_regulator_probe, 584 585 };
+1
drivers/regulator/hi6421v530-regulator.c
··· 200 200 .id_table = hi6421v530_regulator_table, 201 201 .driver = { 202 202 .name = "hi6421v530-regulator", 203 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 203 204 }, 204 205 .probe = hi6421v530_regulator_probe, 205 206 };
+1
drivers/regulator/hi6421v600-regulator.c
··· 284 284 .id_table = hi6421_spmi_regulator_table, 285 285 .driver = { 286 286 .name = "hi6421v600-regulator", 287 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 287 288 }, 288 289 .probe = hi6421_spmi_regulator_probe, 289 290 };
+1
drivers/regulator/hi655x-regulator.c
··· 206 206 .id_table = hi655x_regulator_table, 207 207 .driver = { 208 208 .name = "hi655x-regulator", 209 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 209 210 }, 210 211 .probe = hi655x_regulator_probe, 211 212 };
+1
drivers/regulator/isl6271a-regulator.c
··· 147 147 static struct i2c_driver isl6271a_i2c_driver = { 148 148 .driver = { 149 149 .name = "isl6271a", 150 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 150 151 }, 151 152 .probe_new = isl6271a_probe, 152 153 .id_table = isl6271a_id,
+1
drivers/regulator/isl9305.c
··· 195 195 static struct i2c_driver isl9305_regulator_driver = { 196 196 .driver = { 197 197 .name = "isl9305", 198 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 198 199 .of_match_table = of_match_ptr(isl9305_dt_ids), 199 200 }, 200 201 .probe_new = isl9305_i2c_probe,
+1
drivers/regulator/lm363x-regulator.c
··· 355 355 .probe = lm363x_regulator_probe, 356 356 .driver = { 357 357 .name = "lm363x-regulator", 358 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 358 359 }, 359 360 }; 360 361
+1
drivers/regulator/lochnagar-regulator.c
··· 272 272 static struct platform_driver lochnagar_regulator_driver = { 273 273 .driver = { 274 274 .name = "lochnagar-regulator", 275 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 275 276 .of_match_table = of_match_ptr(lochnagar_of_match), 276 277 }, 277 278
+1
drivers/regulator/lp3971.c
··· 447 447 static struct i2c_driver lp3971_i2c_driver = { 448 448 .driver = { 449 449 .name = "LP3971", 450 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 450 451 }, 451 452 .probe_new = lp3971_i2c_probe, 452 453 .id_table = lp3971_i2c_id,
+1
drivers/regulator/lp3972.c
··· 545 545 static struct i2c_driver lp3972_i2c_driver = { 546 546 .driver = { 547 547 .name = "lp3972", 548 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 548 549 }, 549 550 .probe_new = lp3972_i2c_probe, 550 551 .id_table = lp3972_i2c_id,
+3 -3
drivers/regulator/lp872x.c
··· 832 832 return ERR_PTR(-ENOMEM); 833 833 834 834 of_property_read_u8(np, "ti,general-config", &pdata->general_config); 835 - if (of_find_property(np, "ti,update-config", NULL)) 836 - pdata->update_config = true; 835 + pdata->update_config = of_property_read_bool(np, "ti,update-config"); 837 836 838 837 pdata->dvs = devm_kzalloc(dev, sizeof(struct lp872x_dvs), GFP_KERNEL); 839 838 if (!pdata->dvs) ··· 927 928 return lp872x_regulator_register(lp); 928 929 } 929 930 930 - static const struct of_device_id lp872x_dt_ids[] = { 931 + static const struct of_device_id lp872x_dt_ids[] __maybe_unused = { 931 932 { .compatible = "ti,lp8720", }, 932 933 { .compatible = "ti,lp8725", }, 933 934 { } ··· 944 945 static struct i2c_driver lp872x_driver = { 945 946 .driver = { 946 947 .name = "lp872x", 948 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 947 949 .of_match_table = of_match_ptr(lp872x_dt_ids), 948 950 }, 949 951 .probe_new = lp872x_probe,
+1
drivers/regulator/lp873x-regulator.c
··· 187 187 static struct platform_driver lp873x_regulator_driver = { 188 188 .driver = { 189 189 .name = "lp873x-pmic", 190 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 190 191 }, 191 192 .probe = lp873x_regulator_probe, 192 193 .id_table = lp873x_regulator_id_table,
+1
drivers/regulator/lp8755.c
··· 440 440 static struct i2c_driver lp8755_i2c_driver = { 441 441 .driver = { 442 442 .name = LP8755_NAME, 443 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 443 444 }, 444 445 .probe_new = lp8755_probe, 445 446 .remove = lp8755_remove,
+1
drivers/regulator/lp87565-regulator.c
··· 237 237 static struct platform_driver lp87565_regulator_driver = { 238 238 .driver = { 239 239 .name = "lp87565-pmic", 240 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 240 241 }, 241 242 .probe = lp87565_regulator_probe, 242 243 .id_table = lp87565_regulator_id_table,
+1
drivers/regulator/lp8788-buck.c
··· 531 531 .probe = lp8788_buck_probe, 532 532 .driver = { 533 533 .name = LP8788_DEV_BUCK, 534 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 534 535 }, 535 536 }; 536 537
+2
drivers/regulator/lp8788-ldo.c
··· 564 564 .probe = lp8788_dldo_probe, 565 565 .driver = { 566 566 .name = LP8788_DEV_DLDO, 567 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 567 568 }, 568 569 }; 569 570 ··· 612 611 .probe = lp8788_aldo_probe, 613 612 .driver = { 614 613 .name = LP8788_DEV_ALDO, 614 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 615 615 }, 616 616 }; 617 617
+1
drivers/regulator/ltc3589.c
··· 474 474 static struct i2c_driver ltc3589_driver = { 475 475 .driver = { 476 476 .name = DRIVER_NAME, 477 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 477 478 .of_match_table = of_match_ptr(ltc3589_of_match), 478 479 }, 479 480 .probe_new = ltc3589_probe,
+1
drivers/regulator/ltc3676.c
··· 371 371 static struct i2c_driver ltc3676_driver = { 372 372 .driver = { 373 373 .name = DRIVER_NAME, 374 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 374 375 .of_match_table = of_match_ptr(ltc3676_of_match), 375 376 }, 376 377 .probe_new = ltc3676_regulator_probe,
+1
drivers/regulator/max14577-regulator.c
··· 241 241 static struct platform_driver max14577_regulator_driver = { 242 242 .driver = { 243 243 .name = "max14577-regulator", 244 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 244 245 }, 245 246 .probe = max14577_regulator_probe, 246 247 .id_table = max14577_regulator_id,
+1
drivers/regulator/max1586.c
··· 292 292 .probe_new = max1586_pmic_probe, 293 293 .driver = { 294 294 .name = "max1586", 295 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 295 296 .of_match_table = of_match_ptr(max1586_of_match), 296 297 }, 297 298 .id_table = max1586_id,
+2 -1
drivers/regulator/max20086-regulator.c
··· 286 286 287 287 MODULE_DEVICE_TABLE(i2c, max20086_i2c_id); 288 288 289 - static const struct of_device_id max20086_dt_ids[] = { 289 + static const struct of_device_id max20086_dt_ids[] __maybe_unused = { 290 290 { 291 291 .compatible = "maxim,max20086", 292 292 .data = &(const struct max20086_chip_info) { ··· 320 320 static struct i2c_driver max20086_regulator_driver = { 321 321 .driver = { 322 322 .name = "max20086", 323 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 323 324 .of_match_table = of_match_ptr(max20086_dt_ids), 324 325 }, 325 326 .probe_new = max20086_i2c_probe,
+1
drivers/regulator/max20411-regulator.c
··· 153 153 static struct i2c_driver max20411_i2c_driver = { 154 154 .driver = { 155 155 .name = "max20411", 156 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 156 157 .of_match_table = of_max20411_match_tbl, 157 158 }, 158 159 .probe_new = max20411_probe,
+1
drivers/regulator/max597x-regulator.c
··· 501 501 static struct platform_driver max597x_regulator_driver = { 502 502 .driver = { 503 503 .name = "max597x-regulator", 504 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 504 505 }, 505 506 .probe = max597x_regulator_probe, 506 507 };
+1
drivers/regulator/max77620-regulator.c
··· 916 916 .id_table = max77620_regulator_devtype, 917 917 .driver = { 918 918 .name = "max77620-pmic", 919 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 919 920 .pm = &max77620_regulator_pm_ops, 920 921 }, 921 922 };
+1
drivers/regulator/max77650-regulator.c
··· 395 395 static struct platform_driver max77650_regulator_driver = { 396 396 .driver = { 397 397 .name = "max77650-regulator", 398 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 398 399 .of_match_table = max77650_regulator_of_match, 399 400 }, 400 401 .probe = max77650_regulator_probe,
+1
drivers/regulator/max77686-regulator.c
··· 525 525 static struct platform_driver max77686_pmic_driver = { 526 526 .driver = { 527 527 .name = "max77686-pmic", 528 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 528 529 }, 529 530 .probe = max77686_pmic_probe, 530 531 .id_table = max77686_pmic_id,
+1
drivers/regulator/max77693-regulator.c
··· 281 281 static struct platform_driver max77693_pmic_driver = { 282 282 .driver = { 283 283 .name = "max77693-pmic", 284 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 284 285 }, 285 286 .probe = max77693_pmic_probe, 286 287 .id_table = max77693_pmic_id,
+1
drivers/regulator/max77802-regulator.c
··· 554 554 static struct platform_driver max77802_pmic_driver = { 555 555 .driver = { 556 556 .name = "max77802-pmic", 557 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 557 558 }, 558 559 .probe = max77802_pmic_probe, 559 560 .id_table = max77802_pmic_id,
+1
drivers/regulator/max77826-regulator.c
··· 289 289 static struct i2c_driver max77826_regulator_driver = { 290 290 .driver = { 291 291 .name = "max77826", 292 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 292 293 .of_match_table = of_match_ptr(max77826_of_match), 293 294 }, 294 295 .probe_new = max77826_i2c_probe,
+1
drivers/regulator/max8649.c
··· 249 249 .probe_new = max8649_regulator_probe, 250 250 .driver = { 251 251 .name = "max8649", 252 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 252 253 }, 253 254 .id_table = max8649_id, 254 255 };
+1
drivers/regulator/max8660.c
··· 506 506 .probe_new = max8660_probe, 507 507 .driver = { 508 508 .name = "max8660", 509 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 509 510 }, 510 511 .id_table = max8660_id, 511 512 };
+1
drivers/regulator/max8893.c
··· 171 171 .probe_new = max8893_probe_new, 172 172 .driver = { 173 173 .name = "max8893", 174 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 174 175 .of_match_table = of_match_ptr(max8893_dt_match), 175 176 }, 176 177 .id_table = max8893_ids,
+1
drivers/regulator/max8907-regulator.c
··· 372 372 static struct platform_driver max8907_regulator_driver = { 373 373 .driver = { 374 374 .name = "max8907-regulator", 375 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 375 376 }, 376 377 .probe = max8907_regulator_probe, 377 378 };
+1
drivers/regulator/max8925-regulator.c
··· 263 263 static struct platform_driver max8925_regulator_driver = { 264 264 .driver = { 265 265 .name = "max8925-regulator", 266 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 266 267 }, 267 268 .probe = max8925_regulator_probe, 268 269 };
+1
drivers/regulator/max8952.c
··· 316 316 .probe_new = max8952_pmic_probe, 317 317 .driver = { 318 318 .name = "max8952", 319 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 319 320 .of_match_table = of_match_ptr(max8952_dt_match), 320 321 }, 321 322 .id_table = max8952_ids,
+1
drivers/regulator/max8973-regulator.c
··· 804 804 static struct i2c_driver max8973_i2c_driver = { 805 805 .driver = { 806 806 .name = "max8973", 807 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 807 808 .of_match_table = of_max8973_match_tbl, 808 809 }, 809 810 .probe_new = max8973_probe,
+4 -8
drivers/regulator/max8997-regulator.c
··· 943 943 } 944 944 of_node_put(regulators_np); 945 945 946 - if (of_get_property(pmic_np, "max8997,pmic-buck1-uses-gpio-dvs", NULL)) 947 - pdata->buck1_gpiodvs = true; 948 - 949 - if (of_get_property(pmic_np, "max8997,pmic-buck2-uses-gpio-dvs", NULL)) 950 - pdata->buck2_gpiodvs = true; 951 - 952 - if (of_get_property(pmic_np, "max8997,pmic-buck5-uses-gpio-dvs", NULL)) 953 - pdata->buck5_gpiodvs = true; 946 + pdata->buck1_gpiodvs = of_property_read_bool(pmic_np, "max8997,pmic-buck1-uses-gpio-dvs"); 947 + pdata->buck2_gpiodvs = of_property_read_bool(pmic_np, "max8997,pmic-buck2-uses-gpio-dvs"); 948 + pdata->buck5_gpiodvs = of_property_read_bool(pmic_np, "max8997,pmic-buck5-uses-gpio-dvs"); 954 949 955 950 if (pdata->buck1_gpiodvs || pdata->buck2_gpiodvs || 956 951 pdata->buck5_gpiodvs) { ··· 1197 1202 static struct platform_driver max8997_pmic_driver = { 1198 1203 .driver = { 1199 1204 .name = "max8997-pmic", 1205 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1200 1206 }, 1201 1207 .probe = max8997_pmic_probe, 1202 1208 .id_table = max8997_pmic_id,
+2 -2
drivers/regulator/max8998.c
··· 618 618 if (ret) 619 619 return -EINVAL; 620 620 621 - if (of_find_property(pmic_np, "max8998,pmic-buck-voltage-lock", NULL)) 622 - pdata->buck_voltage_lock = true; 621 + pdata->buck_voltage_lock = of_property_read_bool(pmic_np, "max8998,pmic-buck-voltage-lock"); 623 622 624 623 ret = of_property_read_u32(pmic_np, 625 624 "max8998,pmic-buck1-default-dvs-idx", ··· 803 804 static struct platform_driver max8998_pmic_driver = { 804 805 .driver = { 805 806 .name = "max8998-pmic", 807 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 806 808 }, 807 809 .probe = max8998_pmic_probe, 808 810 .id_table = max8998_pmic_id,
+1
drivers/regulator/mc13783-regulator.c
··· 455 455 static struct platform_driver mc13783_regulator_driver = { 456 456 .driver = { 457 457 .name = "mc13783-regulator", 458 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 458 459 }, 459 460 .probe = mc13783_regulator_probe, 460 461 };
+1
drivers/regulator/mc13892-regulator.c
··· 629 629 static struct platform_driver mc13892_regulator_driver = { 630 630 .driver = { 631 631 .name = "mc13892-regulator", 632 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 632 633 }, 633 634 .probe = mc13892_regulator_probe, 634 635 };
+1
drivers/regulator/mcp16502.c
··· 587 587 .probe_new = mcp16502_probe, 588 588 .driver = { 589 589 .name = "mcp16502-regulator", 590 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 590 591 .of_match_table = of_match_ptr(mcp16502_ids), 591 592 #ifdef CONFIG_PM 592 593 .pm = &mcp16502_pm_ops,
+1
drivers/regulator/mp5416.c
··· 237 237 static struct i2c_driver mp5416_regulator_driver = { 238 238 .driver = { 239 239 .name = "mp5416", 240 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 240 241 .of_match_table = of_match_ptr(mp5416_of_match), 241 242 }, 242 243 .probe_new = mp5416_i2c_probe,
+2 -1
drivers/regulator/mp8859.c
··· 129 129 return 0; 130 130 } 131 131 132 - static const struct of_device_id mp8859_dt_id[] = { 132 + static const struct of_device_id mp8859_dt_id[] __maybe_unused = { 133 133 {.compatible = "mps,mp8859"}, 134 134 {}, 135 135 }; ··· 144 144 static struct i2c_driver mp8859_regulator_driver = { 145 145 .driver = { 146 146 .name = "mp8859", 147 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 147 148 .of_match_table = of_match_ptr(mp8859_dt_id), 148 149 }, 149 150 .probe_new = mp8859_i2c_probe,
+1
drivers/regulator/mp886x.c
··· 362 362 static struct i2c_driver mp886x_regulator_driver = { 363 363 .driver = { 364 364 .name = "mp886x-regulator", 365 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 365 366 .of_match_table = mp886x_dt_ids, 366 367 }, 367 368 .probe_new = mp886x_i2c_probe,
+1
drivers/regulator/mpq7920.c
··· 318 318 static struct i2c_driver mpq7920_regulator_driver = { 319 319 .driver = { 320 320 .name = "mpq7920", 321 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 321 322 .of_match_table = of_match_ptr(mpq7920_of_match), 322 323 }, 323 324 .probe_new = mpq7920_i2c_probe,
+1
drivers/regulator/mt6311-regulator.c
··· 151 151 static struct i2c_driver mt6311_regulator_driver = { 152 152 .driver = { 153 153 .name = "mt6311", 154 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 154 155 .of_match_table = of_match_ptr(mt6311_dt_ids), 155 156 }, 156 157 .probe_new = mt6311_i2c_probe,
+1
drivers/regulator/mt6315-regulator.c
··· 287 287 static struct spmi_driver mt6315_regulator_driver = { 288 288 .driver = { 289 289 .name = "mt6315-regulator", 290 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 290 291 .of_match_table = mt6315_of_match, 291 292 }, 292 293 .probe = mt6315_regulator_probe,
+1
drivers/regulator/mt6323-regulator.c
··· 409 409 static struct platform_driver mt6323_regulator_driver = { 410 410 .driver = { 411 411 .name = "mt6323-regulator", 412 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 412 413 }, 413 414 .probe = mt6323_regulator_probe, 414 415 .id_table = mt6323_platform_ids,
+1
drivers/regulator/mt6331-regulator.c
··· 495 495 static struct platform_driver mt6331_regulator_driver = { 496 496 .driver = { 497 497 .name = "mt6331-regulator", 498 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 498 499 }, 499 500 .probe = mt6331_regulator_probe, 500 501 .id_table = mt6331_platform_ids,
+1
drivers/regulator/mt6332-regulator.c
··· 410 410 static struct platform_driver mt6332_regulator_driver = { 411 411 .driver = { 412 412 .name = "mt6332-regulator", 413 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 413 414 }, 414 415 .probe = mt6332_regulator_probe, 415 416 .id_table = mt6332_platform_ids,
+1
drivers/regulator/mt6357-regulator.c
··· 439 439 static struct platform_driver mt6357_regulator_driver = { 440 440 .driver = { 441 441 .name = "mt6357-regulator", 442 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 442 443 }, 443 444 .probe = mt6357_regulator_probe, 444 445 .id_table = mt6357_platform_ids,
+1
drivers/regulator/mt6358-regulator.c
··· 733 733 static struct platform_driver mt6358_regulator_driver = { 734 734 .driver = { 735 735 .name = "mt6358-regulator", 736 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 736 737 }, 737 738 .probe = mt6358_regulator_probe, 738 739 .id_table = mt6358_platform_ids,
+1
drivers/regulator/mt6359-regulator.c
··· 982 982 static struct platform_driver mt6359_regulator_driver = { 983 983 .driver = { 984 984 .name = "mt6359-regulator", 985 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 985 986 }, 986 987 .probe = mt6359_regulator_probe, 987 988 .id_table = mt6359_platform_ids,
+1
drivers/regulator/mt6360-regulator.c
··· 446 446 static struct platform_driver mt6360_regulator_driver = { 447 447 .driver = { 448 448 .name = "mt6360-regulator", 449 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 449 450 }, 450 451 .probe = mt6360_regulator_probe, 451 452 .id_table = mt6360_regulator_id_table,
+1
drivers/regulator/mt6370-regulator.c
··· 379 379 static struct platform_driver mt6370_regulator_driver = { 380 380 .driver = { 381 381 .name = "mt6370-regulator", 382 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 382 383 }, 383 384 .id_table = mt6370_devid_table, 384 385 .probe = mt6370_regulator_probe,
+1
drivers/regulator/mt6380-regulator.c
··· 328 328 static struct platform_driver mt6380_regulator_driver = { 329 329 .driver = { 330 330 .name = "mt6380-regulator", 331 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 331 332 .of_match_table = of_match_ptr(mt6380_of_match), 332 333 }, 333 334 .probe = mt6380_regulator_probe,
+2 -1
drivers/regulator/mt6397-regulator.c
··· 397 397 }; 398 398 MODULE_DEVICE_TABLE(platform, mt6397_platform_ids); 399 399 400 - static const struct of_device_id mt6397_of_match[] = { 400 + static const struct of_device_id mt6397_of_match[] __maybe_unused = { 401 401 { .compatible = "mediatek,mt6397-regulator", }, 402 402 { /* sentinel */ }, 403 403 }; ··· 406 406 static struct platform_driver mt6397_regulator_driver = { 407 407 .driver = { 408 408 .name = "mt6397-regulator", 409 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 409 410 .of_match_table = of_match_ptr(mt6397_of_match), 410 411 }, 411 412 .probe = mt6397_regulator_probe,
+1
drivers/regulator/mtk-dvfsrc-regulator.c
··· 194 194 static struct platform_driver mtk_dvfsrc_regulator_driver = { 195 195 .driver = { 196 196 .name = "mtk-dvfsrc-regulator", 197 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 197 198 }, 198 199 .probe = dvfsrc_vcore_regulator_probe, 199 200 };
+1
drivers/regulator/palmas-regulator.c
··· 1666 1666 static struct platform_driver palmas_driver = { 1667 1667 .driver = { 1668 1668 .name = "palmas-pmic", 1669 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1669 1670 .of_match_table = of_palmas_match_tbl, 1670 1671 }, 1671 1672 .probe = palmas_regulators_probe,
+1
drivers/regulator/pbias-regulator.c
··· 231 231 .probe = pbias_regulator_probe, 232 232 .driver = { 233 233 .name = "pbias-regulator", 234 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 234 235 .of_match_table = of_match_ptr(pbias_of_match), 235 236 }, 236 237 };
+1
drivers/regulator/pca9450-regulator.c
··· 872 872 static struct i2c_driver pca9450_i2c_driver = { 873 873 .driver = { 874 874 .name = "nxp-pca9450", 875 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 875 876 .of_match_table = pca9450_of_match, 876 877 }, 877 878 .probe_new = pca9450_i2c_probe,
+1
drivers/regulator/pcap-regulator.c
··· 251 251 static struct platform_driver pcap_regulator_driver = { 252 252 .driver = { 253 253 .name = "pcap-regulator", 254 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 254 255 }, 255 256 .probe = pcap_regulator_probe, 256 257 };
+1
drivers/regulator/pcf50633-regulator.c
··· 101 101 static struct platform_driver pcf50633_regulator_driver = { 102 102 .driver = { 103 103 .name = "pcf50633-regulator", 104 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 104 105 }, 105 106 .probe = pcf50633_regulator_probe, 106 107 };
+1
drivers/regulator/pf8x00-regulator.c
··· 607 607 .id_table = pf8x00_i2c_id, 608 608 .driver = { 609 609 .name = "pf8x00", 610 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 610 611 .of_match_table = pf8x00_dt_ids, 611 612 }, 612 613 .probe_new = pf8x00_i2c_probe,
+1
drivers/regulator/pfuze100-regulator.c
··· 845 845 static struct i2c_driver pfuze_driver = { 846 846 .driver = { 847 847 .name = "pfuze100-regulator", 848 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 848 849 .of_match_table = pfuze_dt_ids, 849 850 }, 850 851 .probe_new = pfuze100_regulator_probe,
+1
drivers/regulator/pv88060-regulator.c
··· 376 376 static struct i2c_driver pv88060_regulator_driver = { 377 377 .driver = { 378 378 .name = "pv88060", 379 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 379 380 .of_match_table = of_match_ptr(pv88060_dt_ids), 380 381 }, 381 382 .probe_new = pv88060_i2c_probe,
+1
drivers/regulator/pv88080-regulator.c
··· 557 557 static struct i2c_driver pv88080_regulator_driver = { 558 558 .driver = { 559 559 .name = "pv88080", 560 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 560 561 .of_match_table = of_match_ptr(pv88080_dt_ids), 561 562 }, 562 563 .probe_new = pv88080_i2c_probe,
+1
drivers/regulator/pv88090-regulator.c
··· 397 397 static struct i2c_driver pv88090_regulator_driver = { 398 398 .driver = { 399 399 .name = "pv88090", 400 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 400 401 .of_match_table = of_match_ptr(pv88090_dt_ids), 401 402 }, 402 403 .probe_new = pv88090_i2c_probe,
+2 -1
drivers/regulator/pwm-regulator.c
··· 334 334 335 335 memcpy(&drvdata->desc, &pwm_regulator_desc, sizeof(drvdata->desc)); 336 336 337 - if (of_find_property(np, "voltage-table", NULL)) 337 + if (of_property_present(np, "voltage-table")) 338 338 ret = pwm_regulator_init_table(pdev, drvdata); 339 339 else 340 340 ret = pwm_regulator_init_continuous(pdev, drvdata); ··· 393 393 static struct platform_driver pwm_regulator_driver = { 394 394 .driver = { 395 395 .name = "pwm-regulator", 396 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 396 397 .of_match_table = of_match_ptr(pwm_of_match), 397 398 }, 398 399 .probe = pwm_regulator_probe,
+1
drivers/regulator/qcom-labibb-regulator.c
··· 894 894 static struct platform_driver qcom_labibb_regulator_driver = { 895 895 .driver = { 896 896 .name = "qcom-lab-ibb-regulator", 897 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 897 898 .of_match_table = qcom_labibb_match, 898 899 }, 899 900 .probe = qcom_labibb_regulator_probe,
+56
drivers/regulator/qcom-rpmh-regulator.c
··· 694 694 .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, 695 695 }; 696 696 697 + static const struct rpmh_vreg_hw_data pmic5_pldo515_mv = { 698 + .regulator_type = VRM, 699 + .ops = &rpmh_regulator_vrm_drms_ops, 700 + .voltage_range = REGULATOR_LINEAR_RANGE(1800000, 0, 187, 8000), 701 + .n_voltages = 188, 702 + .hpm_min_load_uA = 10000, 703 + .pmic_mode_map = pmic_mode_map_pmic5_ldo, 704 + .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, 705 + }; 706 + 697 707 static const struct rpmh_vreg_hw_data pmic5_nldo = { 698 708 .regulator_type = VRM, 699 709 .ops = &rpmh_regulator_vrm_drms_ops, 700 710 .voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 123, 8000), 701 711 .n_voltages = 124, 712 + .hpm_min_load_uA = 30000, 713 + .pmic_mode_map = pmic_mode_map_pmic5_ldo, 714 + .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, 715 + }; 716 + 717 + static const struct rpmh_vreg_hw_data pmic5_nldo515 = { 718 + .regulator_type = VRM, 719 + .ops = &rpmh_regulator_vrm_drms_ops, 720 + .voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 210, 8000), 721 + .n_voltages = 211, 702 722 .hpm_min_load_uA = 30000, 703 723 .pmic_mode_map = pmic_mode_map_pmic5_ldo, 704 724 .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, ··· 765 745 .ops = &rpmh_regulator_vrm_ops, 766 746 .voltage_range = REGULATOR_LINEAR_RANGE(600000, 0, 267, 8000), 767 747 .n_voltages = 268, 748 + .pmic_mode_map = pmic_mode_map_pmic5_smps, 749 + .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, 750 + }; 751 + 752 + static const struct rpmh_vreg_hw_data pmic5_ftsmps527 = { 753 + .regulator_type = VRM, 754 + .ops = &rpmh_regulator_vrm_ops, 755 + .voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 215, 8000), 756 + .n_voltages = 215, 768 757 .pmic_mode_map = pmic_mode_map_pmic5_smps, 769 758 .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, 770 759 }; ··· 963 934 RPMH_VREG("ldo16", "ldo%s16", &pmic5_pldo, "vdd-l13-l16-l17"), 964 935 RPMH_VREG("ldo17", "ldo%s17", &pmic5_pldo, "vdd-l13-l16-l17"), 965 936 RPMH_VREG("ldo18", "ldo%s18", &pmic5_nldo, "vdd-l3-l4-l5-l18"), 937 + {} 938 + }; 939 + 940 + static const struct rpmh_vreg_init_data pmm8654au_vreg_data[] = { 941 + RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps527, "vdd-s1"), 942 + RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps527, "vdd-s2"), 943 + RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps527, "vdd-s3"), 944 + RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps527, "vdd-s4"), 945 + RPMH_VREG("smps5", "smp%s5", &pmic5_ftsmps527, "vdd-s5"), 946 + RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps527, "vdd-s6"), 947 + RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps527, "vdd-s7"), 948 + RPMH_VREG("smps8", "smp%s8", &pmic5_ftsmps527, "vdd-s8"), 949 + RPMH_VREG("smps9", "smp%s9", &pmic5_ftsmps527, "vdd-s9"), 950 + RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo515, "vdd-s9"), 951 + RPMH_VREG("ldo2", "ldo%s2", &pmic5_nldo515, "vdd-l2-l3"), 952 + RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo515, "vdd-l2-l3"), 953 + RPMH_VREG("ldo4", "ldo%s4", &pmic5_nldo515, "vdd-s9"), 954 + RPMH_VREG("ldo5", "ldo%s5", &pmic5_nldo515, "vdd-s9"), 955 + RPMH_VREG("ldo6", "ldo%s6", &pmic5_nldo515, "vdd-l6-l7"), 956 + RPMH_VREG("ldo7", "ldo%s7", &pmic5_nldo515, "vdd-l6-l7"), 957 + RPMH_VREG("ldo8", "ldo%s8", &pmic5_pldo515_mv, "vdd-l8-l9"), 958 + RPMH_VREG("ldo9", "ldo%s9", &pmic5_pldo, "vdd-l8-l9"), 966 959 {} 967 960 }; 968 961 ··· 1483 1432 .data = pmm8155au_vreg_data, 1484 1433 }, 1485 1434 { 1435 + .compatible = "qcom,pmm8654au-rpmh-regulators", 1436 + .data = pmm8654au_vreg_data, 1437 + }, 1438 + { 1486 1439 .compatible = "qcom,pmx55-rpmh-regulators", 1487 1440 .data = pmx55_vreg_data, 1488 1441 }, ··· 1517 1462 static struct platform_driver rpmh_regulator_driver = { 1518 1463 .driver = { 1519 1464 .name = "qcom-rpmh-regulator", 1465 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1520 1466 .of_match_table = of_match_ptr(rpmh_regulator_match_table), 1521 1467 }, 1522 1468 .probe = rpmh_regulator_probe,
+1
drivers/regulator/qcom_rpm-regulator.c
··· 991 991 .probe = rpm_reg_probe, 992 992 .driver = { 993 993 .name = "qcom_rpm_reg", 994 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 994 995 .of_match_table = of_match_ptr(rpm_of_match), 995 996 }, 996 997 };
+4 -2
drivers/regulator/qcom_smd-regulator.c
··· 749 749 .ops = &rpm_smps_ldo_ops, 750 750 }; 751 751 752 - static const struct regulator_desc mp5496_smpa2 = { 752 + static const struct regulator_desc mp5496_smps = { 753 753 .linear_ranges = (struct linear_range[]) { 754 754 REGULATOR_LINEAR_RANGE(600000, 0, 127, 12500), 755 755 }, ··· 794 794 }; 795 795 796 796 static const struct rpm_regulator_data rpm_mp5496_regulators[] = { 797 - { "s2", QCOM_SMD_RPM_SMPA, 2, &mp5496_smpa2, "s2" }, 797 + { "s1", QCOM_SMD_RPM_SMPA, 1, &mp5496_smps, "s1" }, 798 + { "s2", QCOM_SMD_RPM_SMPA, 2, &mp5496_smps, "s2" }, 798 799 { "l2", QCOM_SMD_RPM_LDOA, 2, &mp5496_ldoa2, "l2" }, 799 800 {} 800 801 }; ··· 1441 1440 .probe = rpm_reg_probe, 1442 1441 .driver = { 1443 1442 .name = "qcom_rpm_smd_regulator", 1443 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1444 1444 .of_match_table = rpm_of_match, 1445 1445 }, 1446 1446 };
+1
drivers/regulator/qcom_spmi-regulator.c
··· 2484 2484 static struct platform_driver qcom_spmi_regulator_driver = { 2485 2485 .driver = { 2486 2486 .name = "qcom-spmi-regulator", 2487 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 2487 2488 .of_match_table = qcom_spmi_regulator_match, 2488 2489 }, 2489 2490 .probe = qcom_spmi_regulator_probe,
+1
drivers/regulator/qcom_usb_vbus-regulator.c
··· 100 100 static struct platform_driver qcom_usb_vbus_regulator_driver = { 101 101 .driver = { 102 102 .name = "qcom-usb-vbus-regulator", 103 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 103 104 .of_match_table = qcom_usb_vbus_regulator_match, 104 105 }, 105 106 .probe = qcom_usb_vbus_regulator_probe,
+1
drivers/regulator/rc5t583-regulator.c
··· 149 149 static struct platform_driver rc5t583_regulator_driver = { 150 150 .driver = { 151 151 .name = "rc5t583-regulator", 152 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 152 153 }, 153 154 .probe = rc5t583_regulator_probe, 154 155 };
+2 -1
drivers/regulator/rk808-regulator.c
··· 1354 1354 static struct platform_driver rk808_regulator_driver = { 1355 1355 .probe = rk808_regulator_probe, 1356 1356 .driver = { 1357 - .name = "rk808-regulator" 1357 + .name = "rk808-regulator", 1358 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1358 1359 }, 1359 1360 }; 1360 1361
+1
drivers/regulator/rn5t618-regulator.c
··· 143 143 .probe = rn5t618_regulator_probe, 144 144 .driver = { 145 145 .name = "rn5t618-regulator", 146 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 146 147 }, 147 148 }; 148 149
+1
drivers/regulator/rpi-panel-attiny-regulator.c
··· 396 396 static struct i2c_driver attiny_regulator_driver = { 397 397 .driver = { 398 398 .name = "rpi_touchscreen_attiny", 399 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 399 400 .of_match_table = of_match_ptr(attiny_dt_ids), 400 401 }, 401 402 .probe_new = attiny_i2c_probe,
+1
drivers/regulator/rt4801-regulator.c
··· 239 239 static struct i2c_driver rt4801_driver = { 240 240 .driver = { 241 241 .name = "rt4801", 242 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 242 243 .of_match_table = of_match_ptr(rt4801_of_id), 243 244 }, 244 245 .probe_new = rt4801_probe,
+216
drivers/regulator/rt4803.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (C) 2023 Richtek Technology Corp. 4 + * 5 + * Author: ChiYuan Huang <cy_huang@richtek.com> 6 + */ 7 + 8 + #include <linux/i2c.h> 9 + #include <linux/kernel.h> 10 + #include <linux/mod_devicetable.h> 11 + #include <linux/module.h> 12 + #include <linux/property.h> 13 + #include <linux/regmap.h> 14 + #include <linux/regulator/driver.h> 15 + #include <linux/regulator/of_regulator.h> 16 + 17 + #define RT4803_AUTO_MODE 1 18 + #define RT4803_FPWM_MODE 2 19 + 20 + #define RT4803_REG_CONFIG 0x01 21 + #define RT4803_REG_VSELL 0x02 22 + #define RT4803_REG_VSELH 0x03 23 + #define RT4803_REG_ILIM 0x04 24 + #define RT4803_REG_STAT 0x05 25 + 26 + #define RT4803_MODE_MASK GENMASK(1, 0) 27 + #define RT4803_VSEL_MASK GENMASK(4, 0) 28 + #define RT4803_ILIM_MASK GENMASK(3, 0) 29 + #define RT4803_TSD_MASK BIT(7) 30 + #define RT4803_HOTDIE_MASK BIT(6) 31 + #define RT4803_FAULT_MASK BIT(1) 32 + #define RT4803_PGOOD_MASK BIT(0) 33 + 34 + #define RT4803_VOUT_MINUV 2850000 35 + #define RT4803_VOUT_STEPUV 50000 36 + #define RT4803_VOUT_NUM 32 37 + 38 + static int rt4803_set_mode(struct regulator_dev *rdev, unsigned int mode) 39 + { 40 + struct regmap *regmap = rdev_get_regmap(rdev); 41 + unsigned int modeval; 42 + 43 + switch (mode) { 44 + case REGULATOR_MODE_NORMAL: 45 + modeval = RT4803_AUTO_MODE; 46 + break; 47 + case REGULATOR_MODE_FAST: 48 + modeval = RT4803_FPWM_MODE; 49 + break; 50 + default: 51 + return -EINVAL; 52 + } 53 + 54 + modeval <<= ffs(RT4803_MODE_MASK) - 1; 55 + 56 + return regmap_update_bits(regmap, RT4803_REG_CONFIG, RT4803_MODE_MASK, modeval); 57 + } 58 + 59 + static unsigned int rt4803_get_mode(struct regulator_dev *rdev) 60 + { 61 + struct regmap *regmap = rdev_get_regmap(rdev); 62 + unsigned int modeval; 63 + int ret; 64 + 65 + ret = regmap_read(regmap, RT4803_REG_CONFIG, &modeval); 66 + if (ret) 67 + return REGULATOR_MODE_INVALID; 68 + 69 + modeval >>= ffs(RT4803_MODE_MASK) - 1; 70 + 71 + switch (modeval) { 72 + case RT4803_AUTO_MODE: 73 + return REGULATOR_MODE_NORMAL; 74 + case RT4803_FPWM_MODE: 75 + return REGULATOR_MODE_FAST; 76 + default: 77 + return REGULATOR_MODE_INVALID; 78 + } 79 + } 80 + 81 + static int rt4803_get_error_flags(struct regulator_dev *rdev, unsigned int *flags) 82 + { 83 + struct regmap *regmap = rdev_get_regmap(rdev); 84 + unsigned int state, events = 0; 85 + int ret; 86 + 87 + ret = regmap_read(regmap, RT4803_REG_STAT, &state); 88 + if (ret) 89 + return ret; 90 + 91 + if (state & RT4803_PGOOD_MASK) 92 + goto out_error_flag; 93 + 94 + if (state & RT4803_FAULT_MASK) 95 + events |= REGULATOR_ERROR_FAIL; 96 + 97 + if (state & RT4803_HOTDIE_MASK) 98 + events |= REGULATOR_ERROR_OVER_TEMP_WARN; 99 + 100 + if (state & RT4803_TSD_MASK) 101 + events |= REGULATOR_ERROR_OVER_TEMP; 102 + 103 + out_error_flag: 104 + *flags = events; 105 + return 0; 106 + } 107 + 108 + static int rt4803_set_suspend_voltage(struct regulator_dev *rdev, int uV) 109 + { 110 + struct regmap *regmap = rdev_get_regmap(rdev); 111 + unsigned int reg, vsel; 112 + 113 + if (rdev->desc->vsel_reg == RT4803_REG_VSELL) 114 + reg = RT4803_REG_VSELH; 115 + else 116 + reg = RT4803_REG_VSELL; 117 + 118 + vsel = (uV - rdev->desc->min_uV) / rdev->desc->uV_step; 119 + vsel <<= ffs(RT4803_VSEL_MASK) - 1; 120 + 121 + return regmap_update_bits(regmap, reg, RT4803_VSEL_MASK, vsel); 122 + } 123 + 124 + static const struct regulator_ops rt4803_regulator_ops = { 125 + .list_voltage = regulator_list_voltage_linear, 126 + .set_voltage_sel = regulator_set_voltage_sel_regmap, 127 + .get_voltage_sel = regulator_get_voltage_sel_regmap, 128 + .set_mode = rt4803_set_mode, 129 + .get_mode = rt4803_get_mode, 130 + .get_error_flags = rt4803_get_error_flags, 131 + .set_suspend_voltage = rt4803_set_suspend_voltage, 132 + }; 133 + 134 + static unsigned int rt4803_of_map_mode(unsigned int mode) 135 + { 136 + switch (mode) { 137 + case RT4803_AUTO_MODE: 138 + return REGULATOR_MODE_NORMAL; 139 + case RT4803_FPWM_MODE: 140 + return REGULATOR_MODE_FAST; 141 + default: 142 + return REGULATOR_MODE_INVALID; 143 + } 144 + } 145 + 146 + static const struct regmap_config rt4803_regmap_config = { 147 + .reg_bits = 8, 148 + .val_bits = 8, 149 + .max_register = RT4803_REG_STAT, 150 + }; 151 + 152 + static int rt4803_probe(struct i2c_client *i2c) 153 + { 154 + struct device *dev = &i2c->dev; 155 + struct regmap *regmap; 156 + struct regulator_desc *desc; 157 + struct regulator_config cfg = {}; 158 + struct regulator_dev *rdev; 159 + bool vsel_act_high; 160 + int ret; 161 + 162 + desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); 163 + if (!desc) 164 + return -ENOMEM; 165 + 166 + regmap = devm_regmap_init_i2c(i2c, &rt4803_regmap_config); 167 + if (IS_ERR(regmap)) 168 + return dev_err_probe(dev, PTR_ERR(regmap), "Failed to init regmap\n"); 169 + 170 + /* Always configure the input current limit to max 5A at initial */ 171 + ret = regmap_update_bits(regmap, RT4803_REG_ILIM, RT4803_ILIM_MASK, 0xff); 172 + if (ret) 173 + return dev_err_probe(dev, ret, "Failed to config ILIM to max\n"); 174 + 175 + vsel_act_high = device_property_read_bool(dev, "richtek,vsel-active-high"); 176 + 177 + desc->name = "rt4803-regulator"; 178 + desc->type = REGULATOR_VOLTAGE; 179 + desc->owner = THIS_MODULE; 180 + desc->ops = &rt4803_regulator_ops; 181 + desc->min_uV = RT4803_VOUT_MINUV; 182 + desc->uV_step = RT4803_VOUT_STEPUV; 183 + desc->n_voltages = RT4803_VOUT_NUM; 184 + desc->vsel_mask = RT4803_VSEL_MASK; 185 + desc->of_map_mode = rt4803_of_map_mode; 186 + if (vsel_act_high) 187 + desc->vsel_reg = RT4803_REG_VSELH; 188 + else 189 + desc->vsel_reg = RT4803_REG_VSELL; 190 + 191 + cfg.dev = dev; 192 + cfg.of_node = dev_of_node(dev); 193 + cfg.init_data = of_get_regulator_init_data(dev, dev_of_node(dev), desc); 194 + 195 + rdev = devm_regulator_register(dev, desc, &cfg); 196 + return PTR_ERR_OR_ZERO(rdev); 197 + } 198 + 199 + static const struct of_device_id rt4803_device_match_table[] = { 200 + { .compatible = "richtek,rt4803" }, 201 + {} 202 + }; 203 + MODULE_DEVICE_TABLE(of, rt4803_device_match_table); 204 + 205 + static struct i2c_driver rt4803_driver = { 206 + .driver = { 207 + .name = "rt4803", 208 + .of_match_table = rt4803_device_match_table, 209 + }, 210 + .probe = rt4803_probe, 211 + }; 212 + module_i2c_driver(rt4803_driver); 213 + 214 + MODULE_DESCRIPTION("Richtek RT4803 voltage regulator driver"); 215 + MODULE_AUTHOR("ChiYuan Huang <cy_huang@richtek.com>"); 216 + MODULE_LICENSE("GPL");
+1
drivers/regulator/rt4831-regulator.c
··· 194 194 static struct platform_driver rt4831_regulator_driver = { 195 195 .driver = { 196 196 .name = "rt4831-regulator", 197 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 197 198 }, 198 199 .id_table = rt4831_regulator_match, 199 200 .probe = rt4831_regulator_probe,
+1
drivers/regulator/rt5033-regulator.c
··· 124 124 static struct platform_driver rt5033_regulator_driver = { 125 125 .driver = { 126 126 .name = "rt5033-regulator", 127 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 127 128 }, 128 129 .probe = rt5033_regulator_probe, 129 130 .id_table = rt5033_regulator_id,
+1
drivers/regulator/rt5120-regulator.c
··· 409 409 static struct platform_driver rt5120_regulator_driver = { 410 410 .driver = { 411 411 .name = "rt5120-regulator", 412 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 412 413 }, 413 414 .id_table = rt5120_regulator_dev_table, 414 415 .probe = rt5120_regulator_probe,
+1
drivers/regulator/rt5190a-regulator.c
··· 505 505 static struct i2c_driver rt5190a_driver = { 506 506 .driver = { 507 507 .name = "rt5190a", 508 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 508 509 .of_match_table = rt5190a_device_table, 509 510 }, 510 511 .probe_new = rt5190a_probe,
+291
drivers/regulator/rt5739.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Device driver for RT5739 regulator 4 + * 5 + * Copyright (C) 2023 Richtek Technology Corp. 6 + * 7 + * Author: ChiYuan Huang <cy_huang@richtek.com> 8 + */ 9 + 10 + #include <linux/bits.h> 11 + #include <linux/gpio/consumer.h> 12 + #include <linux/i2c.h> 13 + #include <linux/kernel.h> 14 + #include <linux/mod_devicetable.h> 15 + #include <linux/property.h> 16 + #include <linux/regmap.h> 17 + #include <linux/regulator/driver.h> 18 + #include <linux/regulator/of_regulator.h> 19 + 20 + #define RT5739_AUTO_MODE 0 21 + #define RT5739_FPWM_MODE 1 22 + 23 + #define RT5739_REG_NSEL0 0x00 24 + #define RT5739_REG_NSEL1 0x01 25 + #define RT5739_REG_CNTL1 0x02 26 + #define RT5739_REG_ID1 0x03 27 + #define RT5739_REG_CNTL2 0x06 28 + #define RT5739_REG_CNTL4 0x08 29 + 30 + #define RT5739_VSEL_MASK GENMASK(7, 0) 31 + #define RT5739_MODEVSEL1_MASK BIT(1) 32 + #define RT5739_MODEVSEL0_MASK BIT(0) 33 + #define RT5739_VID_MASK GENMASK(7, 5) 34 + #define RT5739_ACTD_MASK BIT(7) 35 + #define RT5739_ENVSEL1_MASK BIT(1) 36 + #define RT5739_ENVSEL0_MASK BIT(0) 37 + 38 + #define RT5739_VOLT_MINUV 300000 39 + #define RT5739_VOLT_MAXUV 1300000 40 + #define RT5739_VOLT_STPUV 5000 41 + #define RT5739_N_VOLTS 201 42 + #define RT5739_I2CRDY_TIMEUS 1000 43 + 44 + static int rt5739_set_mode(struct regulator_dev *rdev, unsigned int mode) 45 + { 46 + const struct regulator_desc *desc = rdev->desc; 47 + struct regmap *regmap = rdev_get_regmap(rdev); 48 + unsigned int mask, val; 49 + 50 + if (desc->vsel_reg == RT5739_REG_NSEL0) 51 + mask = RT5739_MODEVSEL0_MASK; 52 + else 53 + mask = RT5739_MODEVSEL1_MASK; 54 + 55 + switch (mode) { 56 + case REGULATOR_MODE_FAST: 57 + val = mask; 58 + break; 59 + case REGULATOR_MODE_NORMAL: 60 + val = 0; 61 + break; 62 + default: 63 + return -EINVAL; 64 + } 65 + 66 + return regmap_update_bits(regmap, RT5739_REG_CNTL1, mask, val); 67 + } 68 + 69 + static unsigned int rt5739_get_mode(struct regulator_dev *rdev) 70 + { 71 + const struct regulator_desc *desc = rdev->desc; 72 + struct regmap *regmap = rdev_get_regmap(rdev); 73 + unsigned int mask, val; 74 + int ret; 75 + 76 + if (desc->vsel_reg == RT5739_REG_NSEL0) 77 + mask = RT5739_MODEVSEL0_MASK; 78 + else 79 + mask = RT5739_MODEVSEL1_MASK; 80 + 81 + ret = regmap_read(regmap, RT5739_REG_CNTL1, &val); 82 + if (ret) 83 + return REGULATOR_MODE_INVALID; 84 + 85 + if (val & mask) 86 + return REGULATOR_MODE_FAST; 87 + 88 + return REGULATOR_MODE_NORMAL; 89 + } 90 + 91 + static int rt5739_set_suspend_voltage(struct regulator_dev *rdev, int uV) 92 + { 93 + const struct regulator_desc *desc = rdev->desc; 94 + struct regmap *regmap = rdev_get_regmap(rdev); 95 + unsigned int reg, vsel; 96 + 97 + if (uV < RT5739_VOLT_MINUV || uV > RT5739_VOLT_MAXUV) 98 + return -EINVAL; 99 + 100 + if (desc->vsel_reg == RT5739_REG_NSEL0) 101 + reg = RT5739_REG_NSEL1; 102 + else 103 + reg = RT5739_REG_NSEL0; 104 + 105 + vsel = (uV - RT5739_VOLT_MINUV) / RT5739_VOLT_STPUV; 106 + return regmap_write(regmap, reg, vsel); 107 + } 108 + 109 + static int rt5739_set_suspend_enable(struct regulator_dev *rdev) 110 + { 111 + const struct regulator_desc *desc = rdev->desc; 112 + struct regmap *regmap = rdev_get_regmap(rdev); 113 + unsigned int mask; 114 + 115 + if (desc->vsel_reg == RT5739_REG_NSEL0) 116 + mask = RT5739_ENVSEL1_MASK; 117 + else 118 + mask = RT5739_ENVSEL0_MASK; 119 + 120 + return regmap_update_bits(regmap, desc->enable_reg, mask, mask); 121 + } 122 + 123 + static int rt5739_set_suspend_disable(struct regulator_dev *rdev) 124 + { 125 + const struct regulator_desc *desc = rdev->desc; 126 + struct regmap *regmap = rdev_get_regmap(rdev); 127 + unsigned int mask; 128 + 129 + if (desc->vsel_reg == RT5739_REG_NSEL0) 130 + mask = RT5739_ENVSEL1_MASK; 131 + else 132 + mask = RT5739_ENVSEL0_MASK; 133 + 134 + return regmap_update_bits(regmap, desc->enable_reg, mask, 0); 135 + } 136 + 137 + static int rt5739_set_suspend_mode(struct regulator_dev *rdev, 138 + unsigned int mode) 139 + { 140 + const struct regulator_desc *desc = rdev->desc; 141 + struct regmap *regmap = rdev_get_regmap(rdev); 142 + unsigned int mask, val; 143 + 144 + if (desc->vsel_reg == RT5739_REG_NSEL0) 145 + mask = RT5739_MODEVSEL1_MASK; 146 + else 147 + mask = RT5739_MODEVSEL0_MASK; 148 + 149 + switch (mode) { 150 + case REGULATOR_MODE_FAST: 151 + val = mask; 152 + break; 153 + case REGULATOR_MODE_NORMAL: 154 + val = 0; 155 + break; 156 + default: 157 + return -EINVAL; 158 + } 159 + 160 + return regmap_update_bits(regmap, RT5739_REG_CNTL1, mask, val); 161 + } 162 + 163 + static const struct regulator_ops rt5739_regulator_ops = { 164 + .list_voltage = regulator_list_voltage_linear, 165 + .get_voltage_sel = regulator_get_voltage_sel_regmap, 166 + .set_voltage_sel = regulator_set_voltage_sel_regmap, 167 + .enable = regulator_enable_regmap, 168 + .disable = regulator_disable_regmap, 169 + .is_enabled = regulator_is_enabled_regmap, 170 + .set_active_discharge = regulator_set_active_discharge_regmap, 171 + .set_mode = rt5739_set_mode, 172 + .get_mode = rt5739_get_mode, 173 + .set_suspend_voltage = rt5739_set_suspend_voltage, 174 + .set_suspend_enable = rt5739_set_suspend_enable, 175 + .set_suspend_disable = rt5739_set_suspend_disable, 176 + .set_suspend_mode = rt5739_set_suspend_mode, 177 + }; 178 + 179 + static unsigned int rt5739_of_map_mode(unsigned int mode) 180 + { 181 + switch (mode) { 182 + case RT5739_AUTO_MODE: 183 + return REGULATOR_MODE_NORMAL; 184 + case RT5739_FPWM_MODE: 185 + return REGULATOR_MODE_FAST; 186 + default: 187 + return REGULATOR_MODE_INVALID; 188 + } 189 + } 190 + 191 + static void rt5739_init_regulator_desc(struct regulator_desc *desc, 192 + bool vsel_active_high) 193 + { 194 + /* Fixed */ 195 + desc->name = "rt5739-regulator"; 196 + desc->owner = THIS_MODULE; 197 + desc->ops = &rt5739_regulator_ops; 198 + desc->n_voltages = RT5739_N_VOLTS; 199 + desc->min_uV = RT5739_VOLT_MINUV; 200 + desc->uV_step = RT5739_VOLT_STPUV; 201 + desc->vsel_mask = RT5739_VSEL_MASK; 202 + desc->enable_reg = RT5739_REG_CNTL2; 203 + desc->active_discharge_reg = RT5739_REG_CNTL1; 204 + desc->active_discharge_mask = RT5739_ACTD_MASK; 205 + desc->active_discharge_on = RT5739_ACTD_MASK; 206 + desc->of_map_mode = rt5739_of_map_mode; 207 + 208 + /* Assigned by vsel level */ 209 + if (vsel_active_high) { 210 + desc->vsel_reg = RT5739_REG_NSEL1; 211 + desc->enable_mask = RT5739_ENVSEL1_MASK; 212 + } else { 213 + desc->vsel_reg = RT5739_REG_NSEL0; 214 + desc->enable_mask = RT5739_ENVSEL0_MASK; 215 + } 216 + } 217 + 218 + static const struct regmap_config rt5739_regmap_config = { 219 + .name = "rt5739", 220 + .reg_bits = 8, 221 + .val_bits = 8, 222 + .max_register = RT5739_REG_CNTL4, 223 + }; 224 + 225 + static int rt5739_probe(struct i2c_client *i2c) 226 + { 227 + struct device *dev = &i2c->dev; 228 + struct regulator_desc *desc; 229 + struct regmap *regmap; 230 + struct gpio_desc *enable_gpio; 231 + struct regulator_config cfg = {}; 232 + struct regulator_dev *rdev; 233 + bool vsel_acth; 234 + unsigned int vid; 235 + int ret; 236 + 237 + desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); 238 + if (!desc) 239 + return -ENOMEM; 240 + 241 + enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_HIGH); 242 + if (IS_ERR(enable_gpio)) 243 + return dev_err_probe(dev, PTR_ERR(enable_gpio), "Failed to get 'enable' gpio\n"); 244 + else if (enable_gpio) 245 + usleep_range(RT5739_I2CRDY_TIMEUS, RT5739_I2CRDY_TIMEUS + 1000); 246 + 247 + regmap = devm_regmap_init_i2c(i2c, &rt5739_regmap_config); 248 + if (IS_ERR(regmap)) 249 + return dev_err_probe(dev, PTR_ERR(regmap), "Failed to init regmap\n"); 250 + 251 + ret = regmap_read(regmap, RT5739_REG_ID1, &vid); 252 + if (ret) 253 + return dev_err_probe(dev, ret, "Failed to read VID\n"); 254 + 255 + /* RT5739: (VID & MASK) must be 0 */ 256 + if (vid & RT5739_VID_MASK) 257 + return dev_err_probe(dev, -ENODEV, "Incorrect VID (0x%02x)\n", vid); 258 + 259 + vsel_acth = device_property_read_bool(dev, "richtek,vsel-active-high"); 260 + 261 + rt5739_init_regulator_desc(desc, vsel_acth); 262 + 263 + cfg.dev = dev; 264 + cfg.of_node = dev_of_node(dev); 265 + cfg.init_data = of_get_regulator_init_data(dev, dev_of_node(dev), desc); 266 + rdev = devm_regulator_register(dev, desc, &cfg); 267 + if (IS_ERR(rdev)) 268 + return dev_err_probe(dev, PTR_ERR(rdev), "Failed to register regulator\n"); 269 + 270 + return 0; 271 + } 272 + 273 + static const struct of_device_id rt5739_device_table[] = { 274 + { .compatible = "richtek,rt5739" }, 275 + { /* sentinel */ } 276 + }; 277 + MODULE_DEVICE_TABLE(of, rt5739_device_table); 278 + 279 + static struct i2c_driver rt5739_driver = { 280 + .driver = { 281 + .name = "rt5739", 282 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 283 + .of_match_table = rt5739_device_table, 284 + }, 285 + .probe_new = rt5739_probe, 286 + }; 287 + module_i2c_driver(rt5739_driver); 288 + 289 + MODULE_AUTHOR("ChiYuan Huang <cy_huang@richtek.com>"); 290 + MODULE_DESCRIPTION("Richtek RT5739 regulator driver"); 291 + MODULE_LICENSE("GPL");
+1
drivers/regulator/rt5759-regulator.c
··· 359 359 static struct i2c_driver rt5759_driver = { 360 360 .driver = { 361 361 .name = "rt5759", 362 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 362 363 .of_match_table = of_match_ptr(rt5759_device_table), 363 364 }, 364 365 .probe_new = rt5759_probe,
+1
drivers/regulator/rt6160-regulator.c
··· 308 308 static struct i2c_driver rt6160_driver = { 309 309 .driver = { 310 310 .name = "rt6160", 311 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 311 312 .of_match_table = rt6160_of_match_table, 312 313 }, 313 314 .probe_new = rt6160_probe,
+1
drivers/regulator/rt6190-regulator.c
··· 483 483 static struct i2c_driver rt6190_driver = { 484 484 .driver = { 485 485 .name = "rt6190", 486 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 486 487 .of_match_table = rt6190_of_dev_table, 487 488 .pm = pm_ptr(&rt6190_dev_pm), 488 489 },
+1
drivers/regulator/rt6245-regulator.c
··· 243 243 static struct i2c_driver rt6245_driver = { 244 244 .driver = { 245 245 .name = "rt6245", 246 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 246 247 .of_match_table = rt6245_of_match_table, 247 248 }, 248 249 .probe_new = rt6245_probe,
+1
drivers/regulator/rtmv20-regulator.c
··· 425 425 static struct i2c_driver rtmv20_driver = { 426 426 .driver = { 427 427 .name = "rtmv20", 428 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 428 429 .of_match_table = of_match_ptr(rtmv20_of_id), 429 430 .pm = &rtmv20_pm, 430 431 },
+1
drivers/regulator/rtq2134-regulator.c
··· 363 363 static struct i2c_driver rtq2134_driver = { 364 364 .driver = { 365 365 .name = "rtq2134", 366 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 366 367 .of_match_table = rtq2134_device_tables, 367 368 }, 368 369 .probe_new = rtq2134_probe,
+1
drivers/regulator/rtq6752-regulator.c
··· 278 278 static struct i2c_driver rtq6752_driver = { 279 279 .driver = { 280 280 .name = "rtq6752", 281 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 281 282 .of_match_table = rtq6752_device_table, 282 283 }, 283 284 .probe_new = rtq6752_probe,
+1
drivers/regulator/s2mpa01.c
··· 376 376 static struct platform_driver s2mpa01_pmic_driver = { 377 377 .driver = { 378 378 .name = "s2mpa01-pmic", 379 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 379 380 }, 380 381 .probe = s2mpa01_pmic_probe, 381 382 .id_table = s2mpa01_pmic_id,
+1
drivers/regulator/s2mps11.c
··· 1238 1238 static struct platform_driver s2mps11_pmic_driver = { 1239 1239 .driver = { 1240 1240 .name = "s2mps11-pmic", 1241 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1241 1242 }, 1242 1243 .probe = s2mps11_pmic_probe, 1243 1244 .id_table = s2mps11_pmic_id,
+7 -11
drivers/regulator/s5m8767.c
··· 605 605 606 606 of_node_put(regulators_np); 607 607 608 - if (of_get_property(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs", NULL)) { 608 + if (of_property_read_bool(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs")) { 609 609 pdata->buck2_gpiodvs = true; 610 610 611 611 if (of_property_read_u32_array(pmic_np, ··· 616 616 } 617 617 } 618 618 619 - if (of_get_property(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs", NULL)) { 619 + if (of_property_read_bool(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs")) { 620 620 pdata->buck3_gpiodvs = true; 621 621 622 622 if (of_property_read_u32_array(pmic_np, ··· 627 627 } 628 628 } 629 629 630 - if (of_get_property(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs", NULL)) { 630 + if (of_property_read_bool(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs")) { 631 631 pdata->buck4_gpiodvs = true; 632 632 633 633 if (of_property_read_u32_array(pmic_np, ··· 661 661 if (ret) 662 662 return -EINVAL; 663 663 664 - if (of_get_property(pmic_np, "s5m8767,pmic-buck2-ramp-enable", NULL)) 665 - pdata->buck2_ramp_enable = true; 666 - 667 - if (of_get_property(pmic_np, "s5m8767,pmic-buck3-ramp-enable", NULL)) 668 - pdata->buck3_ramp_enable = true; 669 - 670 - if (of_get_property(pmic_np, "s5m8767,pmic-buck4-ramp-enable", NULL)) 671 - pdata->buck4_ramp_enable = true; 664 + pdata->buck2_ramp_enable = of_property_read_bool(pmic_np, "s5m8767,pmic-buck2-ramp-enable"); 665 + pdata->buck3_ramp_enable = of_property_read_bool(pmic_np, "s5m8767,pmic-buck3-ramp-enable"); 666 + pdata->buck4_ramp_enable = of_property_read_bool(pmic_np, "s5m8767,pmic-buck4-ramp-enable"); 672 667 673 668 if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable 674 669 || pdata->buck4_ramp_enable) { ··· 999 1004 static struct platform_driver s5m8767_pmic_driver = { 1000 1005 .driver = { 1001 1006 .name = "s5m8767-pmic", 1007 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1002 1008 }, 1003 1009 .probe = s5m8767_pmic_probe, 1004 1010 .id_table = s5m8767_pmic_id,
+1
drivers/regulator/sc2731-regulator.c
··· 245 245 static struct platform_driver sc2731_regulator_driver = { 246 246 .driver = { 247 247 .name = "sc27xx-regulator", 248 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 248 249 }, 249 250 .probe = sc2731_regulator_probe, 250 251 };
+1
drivers/regulator/sky81452-regulator.c
··· 79 79 static struct platform_driver sky81452_reg_driver = { 80 80 .driver = { 81 81 .name = "sky81452-regulator", 82 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 82 83 }, 83 84 .probe = sky81452_reg_probe, 84 85 };
+1
drivers/regulator/slg51000-regulator.c
··· 505 505 static struct i2c_driver slg51000_regulator_driver = { 506 506 .driver = { 507 507 .name = "slg51000-regulator", 508 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 508 509 }, 509 510 .probe_new = slg51000_i2c_probe, 510 511 .id_table = slg51000_i2c_id,
+1
drivers/regulator/sm5703-regulator.c
··· 157 157 static struct platform_driver sm5703_regulator_driver = { 158 158 .driver = { 159 159 .name = "sm5703-regulator", 160 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 160 161 }, 161 162 .probe = sm5703_regulator_probe, 162 163 .id_table = sm5703_regulator_id,
+1
drivers/regulator/stm32-booster.c
··· 117 117 .probe = stm32_booster_probe, 118 118 .driver = { 119 119 .name = "stm32-booster", 120 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 120 121 .of_match_table = of_match_ptr(stm32_booster_of_match), 121 122 }, 122 123 };
+4 -4
drivers/regulator/stm32-pwr.c
··· 129 129 130 130 static int stm32_pwr_regulator_probe(struct platform_device *pdev) 131 131 { 132 - struct device_node *np = pdev->dev.of_node; 133 132 struct stm32_pwr_reg *priv; 134 133 void __iomem *base; 135 134 struct regulator_dev *rdev; 136 135 struct regulator_config config = { }; 137 136 int i, ret = 0; 138 137 139 - base = of_iomap(np, 0); 140 - if (!base) { 138 + base = devm_platform_ioremap_resource(pdev, 0); 139 + if (IS_ERR(base)) { 141 140 dev_err(&pdev->dev, "Unable to map IO memory\n"); 142 - return -ENOMEM; 141 + return PTR_ERR(base); 143 142 } 144 143 145 144 config.dev = &pdev->dev; ··· 175 176 .probe = stm32_pwr_regulator_probe, 176 177 .driver = { 177 178 .name = "stm32-pwr-regulator", 179 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 178 180 .of_match_table = of_match_ptr(stm32_pwr_of_match), 179 181 }, 180 182 };
+1
drivers/regulator/stm32-vrefbuf.c
··· 285 285 .remove = stm32_vrefbuf_remove, 286 286 .driver = { 287 287 .name = "stm32-vrefbuf", 288 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 288 289 .of_match_table = of_match_ptr(stm32_vrefbuf_of_match), 289 290 .pm = &stm32_vrefbuf_pm_ops, 290 291 },
+2 -1
drivers/regulator/stpmic1_regulator.c
··· 576 576 } 577 577 578 578 /* set mask reset */ 579 - if (of_get_property(config.of_node, "st,mask-reset", NULL) && 579 + if (of_property_read_bool(config.of_node, "st,mask-reset") && 580 580 cfg->mask_reset_reg != 0) { 581 581 ret = regmap_update_bits(pmic_dev->regmap, 582 582 cfg->mask_reset_reg, ··· 638 638 static struct platform_driver stpmic1_regulator_driver = { 639 639 .driver = { 640 640 .name = "stpmic1-regulator", 641 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 641 642 .of_match_table = of_match_ptr(of_pmic_regulator_match), 642 643 }, 643 644 .probe = stpmic1_regulator_probe,
+1
drivers/regulator/stw481x-vmmc.c
··· 95 95 static struct platform_driver stw481x_vmmc_regulator_driver = { 96 96 .driver = { 97 97 .name = "stw481x-vmmc-regulator", 98 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 98 99 .of_match_table = stw481x_vmmc_match, 99 100 }, 100 101 .probe = stw481x_vmmc_regulator_probe,
+1
drivers/regulator/sy7636a-regulator.c
··· 127 127 static struct platform_driver sy7636a_regulator_driver = { 128 128 .driver = { 129 129 .name = "sy7636a-regulator", 130 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 130 131 }, 131 132 .probe = sy7636a_regulator_probe, 132 133 .id_table = sy7636a_regulator_id_table,
+1
drivers/regulator/sy8106a-regulator.c
··· 138 138 static struct i2c_driver sy8106a_regulator_driver = { 139 139 .driver = { 140 140 .name = "sy8106a", 141 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 141 142 .of_match_table = sy8106a_i2c_of_match, 142 143 }, 143 144 .probe_new = sy8106a_i2c_probe,
+1
drivers/regulator/sy8824x.c
··· 233 233 static struct i2c_driver sy8824_regulator_driver = { 234 234 .driver = { 235 235 .name = "sy8824-regulator", 236 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 236 237 .of_match_table = sy8824_dt_ids, 237 238 }, 238 239 .probe_new = sy8824_i2c_probe,
+1
drivers/regulator/sy8827n.c
··· 187 187 static struct i2c_driver sy8827n_regulator_driver = { 188 188 .driver = { 189 189 .name = "sy8827n-regulator", 190 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 190 191 .of_match_table = sy8827n_dt_ids, 191 192 }, 192 193 .probe_new = sy8827n_i2c_probe,
+1
drivers/regulator/ti-abb-regulator.c
··· 865 865 .probe = ti_abb_probe, 866 866 .driver = { 867 867 .name = "ti_abb", 868 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 868 869 .of_match_table = of_match_ptr(ti_abb_of_match), 869 870 }, 870 871 };
+1
drivers/regulator/tps51632-regulator.c
··· 351 351 static struct i2c_driver tps51632_i2c_driver = { 352 352 .driver = { 353 353 .name = "tps51632", 354 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 354 355 .of_match_table = of_match_ptr(tps51632_of_match), 355 356 }, 356 357 .probe_new = tps51632_probe,
+1
drivers/regulator/tps6105x-regulator.c
··· 93 93 static struct platform_driver tps6105x_regulator_driver = { 94 94 .driver = { 95 95 .name = "tps6105x-regulator", 96 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 96 97 }, 97 98 .probe = tps6105x_regulator_probe, 98 99 };
+5 -11
drivers/regulator/tps62360-regulator.c
··· 296 296 return NULL; 297 297 } 298 298 299 - if (of_find_property(np, "ti,vsel0-state-high", NULL)) 300 - pdata->vsel0_def_state = 1; 301 - 302 - if (of_find_property(np, "ti,vsel1-state-high", NULL)) 303 - pdata->vsel1_def_state = 1; 304 - 305 - if (of_find_property(np, "ti,enable-pull-down", NULL)) 306 - pdata->en_internal_pulldn = true; 307 - 308 - if (of_find_property(np, "ti,enable-vout-discharge", NULL)) 309 - pdata->en_discharge = true; 299 + pdata->vsel0_def_state = of_property_read_bool(np, "ti,vsel0-state-high"); 300 + pdata->vsel1_def_state = of_property_read_bool(np, "ti,vsel1-state-high"); 301 + pdata->en_internal_pulldn = of_property_read_bool(np, "ti,enable-pull-down"); 302 + pdata->en_discharge = of_property_read_bool(np, "ti,enable-vout-discharge"); 310 303 311 304 return pdata; 312 305 } ··· 488 495 static struct i2c_driver tps62360_i2c_driver = { 489 496 .driver = { 490 497 .name = "tps62360", 498 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 491 499 .of_match_table = of_match_ptr(tps62360_of_match), 492 500 }, 493 501 .probe_new = tps62360_probe,
+1
drivers/regulator/tps6286x-regulator.c
··· 147 147 static struct i2c_driver tps6286x_regulator_driver = { 148 148 .driver = { 149 149 .name = "tps6286x", 150 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 150 151 .of_match_table = of_match_ptr(tps6286x_dt_ids), 151 152 }, 152 153 .probe_new = tps6286x_i2c_probe,
+1
drivers/regulator/tps65023-regulator.c
··· 334 334 static struct i2c_driver tps_65023_i2c_driver = { 335 335 .driver = { 336 336 .name = "tps65023", 337 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 337 338 .of_match_table = of_match_ptr(tps65023_of_match), 338 339 }, 339 340 .probe_new = tps_65023_probe,
+1
drivers/regulator/tps6507x-regulator.c
··· 438 438 static struct platform_driver tps6507x_pmic_driver = { 439 439 .driver = { 440 440 .name = "tps6507x-pmic", 441 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 441 442 }, 442 443 .probe = tps6507x_pmic_probe, 443 444 };
+1
drivers/regulator/tps65086-regulator.c
··· 235 235 static struct platform_driver tps65086_regulator_driver = { 236 236 .driver = { 237 237 .name = "tps65086-regulator", 238 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 238 239 }, 239 240 .probe = tps65086_regulator_probe, 240 241 .id_table = tps65086_regulator_id_table,
+1
drivers/regulator/tps65090-regulator.c
··· 511 511 static struct platform_driver tps65090_regulator_driver = { 512 512 .driver = { 513 513 .name = "tps65090-pmic", 514 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 514 515 }, 515 516 .probe = tps65090_regulator_probe, 516 517 };
+1
drivers/regulator/tps65132-regulator.c
··· 270 270 static struct i2c_driver tps65132_i2c_driver = { 271 271 .driver = { 272 272 .name = "tps65132", 273 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 273 274 }, 274 275 .probe_new = tps65132_probe, 275 276 .id_table = tps65132_id,
+1
drivers/regulator/tps65217-regulator.c
··· 258 258 static struct platform_driver tps65217_regulator_driver = { 259 259 .driver = { 260 260 .name = "tps65217-pmic", 261 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 261 262 }, 262 263 .probe = tps65217_regulator_probe, 263 264 };
+1
drivers/regulator/tps65218-regulator.c
··· 349 349 static struct platform_driver tps65218_regulator_driver = { 350 350 .driver = { 351 351 .name = "tps65218-pmic", 352 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 352 353 }, 353 354 .probe = tps65218_regulator_probe, 354 355 .id_table = tps65218_regulator_id_table,
+1
drivers/regulator/tps65219-regulator.c
··· 380 380 static struct platform_driver tps65219_regulator_driver = { 381 381 .driver = { 382 382 .name = "tps65219-pmic", 383 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 383 384 }, 384 385 .probe = tps65219_regulator_probe, 385 386 .id_table = tps65219_regulator_id_table,
+1
drivers/regulator/tps6524x-regulator.c
··· 628 628 .probe = pmic_probe, 629 629 .driver = { 630 630 .name = "tps6524x", 631 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 631 632 }, 632 633 }; 633 634
+1
drivers/regulator/tps6586x-regulator.c
··· 520 520 static struct platform_driver tps6586x_regulator_driver = { 521 521 .driver = { 522 522 .name = "tps6586x-regulator", 523 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 523 524 }, 524 525 .probe = tps6586x_regulator_probe, 525 526 };
+1
drivers/regulator/tps65910-regulator.c
··· 1255 1255 static struct platform_driver tps65910_driver = { 1256 1256 .driver = { 1257 1257 .name = "tps65910-pmic", 1258 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1258 1259 }, 1259 1260 .probe = tps65910_probe, 1260 1261 .shutdown = tps65910_shutdown,
+1
drivers/regulator/tps65912-regulator.c
··· 150 150 static struct platform_driver tps65912_regulator_driver = { 151 151 .driver = { 152 152 .name = "tps65912-regulator", 153 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 153 154 }, 154 155 .probe = tps65912_regulator_probe, 155 156 .id_table = tps65912_regulator_id_table,
+1
drivers/regulator/tps68470-regulator.c
··· 175 175 static struct platform_driver tps68470_regulator_driver = { 176 176 .driver = { 177 177 .name = "tps68470-regulator", 178 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 178 179 }, 179 180 .probe = tps68470_regulator_probe, 180 181 };
+1
drivers/regulator/twl-regulator.c
··· 656 656 */ 657 657 .driver = { 658 658 .name = "twl4030_reg", 659 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 659 660 .of_match_table = of_match_ptr(twl_of_match), 660 661 }, 661 662 };
+2 -1
drivers/regulator/twl6030-regulator.c
··· 729 729 break; 730 730 } 731 731 732 - if (of_get_property(np, "ti,retain-on-reset", NULL)) 732 + if (of_property_read_bool(np, "ti,retain-on-reset")) 733 733 info->flags |= TWL_6030_WARM_RESET; 734 734 735 735 config.dev = &pdev->dev; ··· 765 765 */ 766 766 .driver = { 767 767 .name = "twl6030_reg", 768 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 768 769 .of_match_table = of_match_ptr(twl_of_match), 769 770 }, 770 771 };
+1
drivers/regulator/uniphier-regulator.c
··· 212 212 .remove = uniphier_regulator_remove, 213 213 .driver = { 214 214 .name = "uniphier-regulator", 215 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 215 216 .of_match_table = uniphier_regulator_match, 216 217 }, 217 218 };
+1
drivers/regulator/userspace-consumer.c
··· 216 216 .remove = regulator_userspace_consumer_remove, 217 217 .driver = { 218 218 .name = "reg-userspace-consumer", 219 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 219 220 .of_match_table = regulator_userspace_consumer_of_match, 220 221 }, 221 222 };
+1
drivers/regulator/vctrl-regulator.c
··· 543 543 .probe = vctrl_probe, 544 544 .driver = { 545 545 .name = "vctrl-regulator", 546 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 546 547 .of_match_table = of_match_ptr(vctrl_of_match), 547 548 }, 548 549 };
+1
drivers/regulator/vexpress-regulator.c
··· 88 88 .probe = vexpress_regulator_probe, 89 89 .driver = { 90 90 .name = DRVNAME, 91 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 91 92 .of_match_table = vexpress_regulator_of_match, 92 93 }, 93 94 };
+1
drivers/regulator/virtual.c
··· 362 362 .remove = regulator_virtual_remove, 363 363 .driver = { 364 364 .name = "reg-virt-consumer", 365 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 365 366 .of_match_table = of_match_ptr(regulator_virtual_consumer_of_match), 366 367 }, 367 368 };
+1
drivers/regulator/vqmmc-ipq4019-regulator.c
··· 89 89 .probe = ipq4019_regulator_probe, 90 90 .driver = { 91 91 .name = "vqmmc-ipq4019-regulator", 92 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 92 93 .of_match_table = of_match_ptr(regulator_ipq4019_of_match), 93 94 }, 94 95 };
+4
drivers/regulator/wm831x-dcdc.c
··· 505 505 .probe = wm831x_buckv_probe, 506 506 .driver = { 507 507 .name = "wm831x-buckv", 508 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 508 509 }, 509 510 }; 510 511 ··· 633 632 .probe = wm831x_buckp_probe, 634 633 .driver = { 635 634 .name = "wm831x-buckp", 635 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 636 636 }, 637 637 }; 638 638 ··· 749 747 .probe = wm831x_boostp_probe, 750 748 .driver = { 751 749 .name = "wm831x-boostp", 750 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 752 751 }, 753 752 }; 754 753 ··· 825 822 .probe = wm831x_epe_probe, 826 823 .driver = { 827 824 .name = "wm831x-epe", 825 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 828 826 }, 829 827 }; 830 828
+1
drivers/regulator/wm831x-isink.c
··· 189 189 .probe = wm831x_isink_probe, 190 190 .driver = { 191 191 .name = "wm831x-isink", 192 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 192 193 }, 193 194 }; 194 195
+3
drivers/regulator/wm831x-ldo.c
··· 303 303 .probe = wm831x_gp_ldo_probe, 304 304 .driver = { 305 305 .name = "wm831x-ldo", 306 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 306 307 }, 307 308 }; 308 309 ··· 513 512 .probe = wm831x_aldo_probe, 514 513 .driver = { 515 514 .name = "wm831x-aldo", 515 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 516 516 }, 517 517 }; 518 518 ··· 647 645 .probe = wm831x_alive_ldo_probe, 648 646 .driver = { 649 647 .name = "wm831x-alive-ldo", 648 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 650 649 }, 651 650 }; 652 651
+1
drivers/regulator/wm8350-regulator.c
··· 1309 1309 .remove = wm8350_regulator_remove, 1310 1310 .driver = { 1311 1311 .name = "wm8350-regulator", 1312 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1312 1313 }, 1313 1314 }; 1314 1315
+1
drivers/regulator/wm8400-regulator.c
··· 223 223 static struct platform_driver wm8400_regulator_driver = { 224 224 .driver = { 225 225 .name = "wm8400-regulator", 226 + .probe_type = PROBE_PREFER_ASYNCHRONOUS, 226 227 }, 227 228 .probe = wm8400_regulator_probe, 228 229 };
+1
drivers/regulator/wm8994-regulator.c
··· 227 227 .probe = wm8994_ldo_probe, 228 228 .driver = { 229 229 .name = "wm8994-ldo", 230 + .probe_type = PROBE_FORCE_SYNCHRONOUS, 230 231 }, 231 232 }; 232 233
+23
include/linux/mfd/da9063/registers.h
··· 1040 1040 /* DA9063_REG_CONFIG_J (addr=0x10F) */ 1041 1041 #define DA9063_TWOWIRE_TO 0x40 1042 1042 1043 + /* DA9063_REG_MON_REG_2 (addr=0x115) */ 1044 + #define DA9063_LDO1_MON_EN 0x01 1045 + #define DA9063_LDO2_MON_EN 0x02 1046 + #define DA9063_LDO3_MON_EN 0x04 1047 + #define DA9063_LDO4_MON_EN 0x08 1048 + #define DA9063_LDO5_MON_EN 0x10 1049 + #define DA9063_LDO6_MON_EN 0x20 1050 + #define DA9063_LDO7_MON_EN 0x40 1051 + #define DA9063_LDO8_MON_EN 0x80 1052 + 1053 + /* DA9063_REG_MON_REG_3 (addr=0x116) */ 1054 + #define DA9063_LDO9_MON_EN 0x01 1055 + #define DA9063_LDO10_MON_EN 0x02 1056 + #define DA9063_LDO11_MON_EN 0x04 1057 + 1058 + /* DA9063_REG_MON_REG_4 (addr=0x117) */ 1059 + #define DA9063_BCORE1_MON_EN 0x04 1060 + #define DA9063_BCORE2_MON_EN 0x08 1061 + #define DA9063_BPRO_MON_EN 0x10 1062 + #define DA9063_BIO_MON_EN 0x20 1063 + #define DA9063_BMEM_MON_EN 0x40 1064 + #define DA9063_BPERI_MON_EN 0x80 1065 + 1043 1066 /* DA9063_REG_MON_REG_5 (addr=0x116) */ 1044 1067 #define DA9063_MON_A8_IDX_MASK 0x07 1045 1068 #define DA9063_MON_A8_IDX_NONE 0x00