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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mfd-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull mfd updates from Lee Jones:
"New Device Support:
- Add support for Qualcomm PM8937 PMIC to QCOM SPMI PMIC

Fix-ups:
- Use/convert to new/better APIs/helpers/MACROs instead of
hand-rolling implementations
- Device Tree binding adaptions/conversions/creation
- Improve error handling; return proper error values, simplify,
avoid duplicates, etc
- Continue work to remove superfluous platform .remove() call-backs
- Move some exported symbols into private namespaces
- Clean-up and staticify PM related operations
- Trivial; spelling, whitespace, clean-ups, etc
- Fix include lists; alphabetise, remove unused, explicitly add used

Bug Fixes:
- Use PLATFORM_DEVID_AUTO to ensure multiple duplicate devices can
co-exist
- Ensure debugfs register view is correctly presented
- Fix ordering and value issues in current use of
clk_register_fractional_divider()
- Repair Kconfig based dependency lists"

* tag 'mfd-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (50 commits)
mfd: ti_am335x_tscadc: Fix TI SoC dependencies
dt-bindings: mfd: sprd: Add support for UMS9620
mfd: ab8500-sysctrl: Drop ancient charger
mfd: intel-lpss: Fix the fractional clock divider flags
mfd: tps6594: Add null pointer check to tps6594_device_init()
dt-bindings: mfd: pm8008: Clean up example node names
dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Clean up example
dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Fix regulator binding
dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Fix up binding reference
mfd: da9062: Simplify obtaining I2C match data
mfd: syscon: Fix null pointer dereference in of_syscon_register()
mfd: intel-lpss: Don't fail probe on success of pci_alloc_irq_vectors()
mfd: twl6030-irq: Revert to use of_match_device()
mfd: cs42l43: Correct order of include files to be alphabetical
mfd: cs42l43: Correct SoundWire port list
mfd: Fix a few spelling mistakes in PMIC header file comments
mfd: intel-lpss: Provide Intel LPSS PM ops structure
mfd: intel-lpss: Move exported symbols to INTEL_LPSS namespace
mfd: intel-lpss: Adjust header inclusions
mfd: intel-lpss: Use device_get_match_data()
...

+473 -371
+223
Documentation/devicetree/bindings/mfd/ams,as3711.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/ams,as3711.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Austria MicroSystems AS3711 Quad Buck High Current PMIC with Charger 8 + 9 + maintainers: 10 + - Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> 11 + 12 + description: 13 + AS3711 is an I2C PMIC from Austria MicroSystems with multiple DC/DC and LDO 14 + power supplies, a battery charger and an RTC. So far only bindings for the 15 + two step-up DC/DC converters are defined. 16 + 17 + properties: 18 + compatible: 19 + const: ams,as3711 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + backlight: 25 + description: 26 + Step-up converter configuration, to be used as a backlight source 27 + type: object 28 + additionalProperties: false 29 + properties: 30 + compatible: 31 + const: ams,as3711-bl 32 + 33 + su1-dev: 34 + description: Framebuffer phandle for the first step-up converter 35 + $ref: /schemas/types.yaml#/definitions/phandle 36 + 37 + su1-max-uA: 38 + description: Maximum current for the first step-up converter 39 + $ref: /schemas/types.yaml#/definitions/uint32 40 + 41 + su2-dev: 42 + description: Framebuffer phandle for the second step-up converter 43 + $ref: /schemas/types.yaml#/definitions/phandle 44 + 45 + su2-max-uA: 46 + description: Maximum current for the second step-up converter 47 + $ref: /schemas/types.yaml#/definitions/uint32 48 + 49 + su2-feedback-voltage: 50 + description: Second step-up converter uses voltage feedback 51 + type: boolean 52 + 53 + su2-feedback-curr1: 54 + description: 55 + Second step-up converter uses CURR1 input for current feedback 56 + type: boolean 57 + 58 + su2-feedback-curr2: 59 + description: 60 + Second step-up converter uses CURR2 input for current feedback 61 + type: boolean 62 + 63 + su2-feedback-curr3: 64 + description: 65 + Second step-up converter uses CURR3 input for current feedback 66 + type: boolean 67 + 68 + su2-feedback-curr-auto: 69 + description: 70 + Second step-up converter uses automatic current feedback selection 71 + type: boolean 72 + 73 + su2-fbprot-lx-sd4: 74 + description: 75 + Second step-up converter uses LX_SD4 for over-voltage protection 76 + type: boolean 77 + 78 + su2-fbprot-gpio2: 79 + description: 80 + Second step-up converter uses GPIO2 for over-voltage protection 81 + type: boolean 82 + 83 + su2-fbprot-gpio3: 84 + description: 85 + Second step-up converter uses GPIO3 for over-voltage protection 86 + type: boolean 87 + 88 + su2-fbprot-gpio4: 89 + description: 90 + Second step-up converter uses GPIO4 for over-voltage protection 91 + type: boolean 92 + 93 + su2-auto-curr1: 94 + description: 95 + Second step-up converter uses CURR1 input for automatic current 96 + feedback 97 + type: boolean 98 + 99 + su2-auto-curr2: 100 + description: 101 + Second step-up converter uses CURR2 input for automatic current 102 + feedback 103 + type: boolean 104 + 105 + su2-auto-curr3: 106 + description: 107 + Second step-up converter uses CURR3 input for automatic current 108 + feedback 109 + type: boolean 110 + 111 + required: 112 + - compatible 113 + 114 + dependentRequired: 115 + # To use the SU1 converter as a backlight source the following two 116 + # properties must be provided: 117 + su1-dev: [ su1-max-uA ] 118 + su1-max-uA: [ su1-dev ] 119 + 120 + # To use the SU2 converter as a backlight source the following two 121 + # properties must be provided: 122 + su2-dev: [ su2-max-uA ] 123 + su2-max-uA: [ su2-dev ] 124 + 125 + su2-feedback-voltage: [ su2-dev ] 126 + su2-feedback-curr1: [ su2-dev ] 127 + su2-feedback-curr2: [ su2-dev ] 128 + su2-feedback-curr3: [ su2-dev ] 129 + su2-feedback-curr-auto: [ su2-dev ] 130 + su2-fbprot-lx-sd4: [ su2-dev ] 131 + su2-fbprot-gpio2: [ su2-dev ] 132 + su2-fbprot-gpio3: [ su2-dev ] 133 + su2-fbprot-gpio4: [ su2-dev ] 134 + su2-auto-curr1: [ su2-feedback-curr-auto ] 135 + su2-auto-curr2: [ su2-feedback-curr-auto ] 136 + su2-auto-curr3: [ su2-feedback-curr-auto ] 137 + 138 + dependentSchemas: 139 + su2-dev: 140 + allOf: 141 + - oneOf: 142 + - required: 143 + - su2-feedback-voltage 144 + - required: 145 + - su2-feedback-curr1 146 + - required: 147 + - su2-feedback-curr2 148 + - required: 149 + - su2-feedback-curr3 150 + - required: 151 + - su2-feedback-curr-auto 152 + - oneOf: 153 + - required: 154 + - su2-fbprot-lx-sd4 155 + - required: 156 + - su2-fbprot-gpio2 157 + - required: 158 + - su2-fbprot-gpio3 159 + - required: 160 + - su2-fbprot-gpio4 161 + 162 + su2-feedback-curr-auto: 163 + anyOf: 164 + - required: 165 + - su2-auto-curr1 166 + - required: 167 + - su2-auto-curr2 168 + - required: 169 + - su2-auto-curr3 170 + 171 + regulators: 172 + description: Other DC/DC and LDO supplies 173 + type: object 174 + unevaluatedProperties: false 175 + patternProperties: 176 + "^(sd[1-4]|ldo[1-8])$": 177 + type: object 178 + $ref: /schemas/regulator/regulator.yaml# 179 + unevaluatedProperties: false 180 + 181 + required: 182 + - compatible 183 + - reg 184 + 185 + additionalProperties: false 186 + 187 + examples: 188 + - | 189 + i2c { 190 + #address-cells = <1>; 191 + #size-cells = <0>; 192 + 193 + pmic@40 { 194 + compatible = "ams,as3711"; 195 + reg = <0x40>; 196 + 197 + regulators { 198 + sd4 { 199 + regulator-name = "1.215V"; 200 + regulator-min-microvolt = <1215000>; 201 + regulator-max-microvolt = <1235000>; 202 + }; 203 + ldo2 { 204 + regulator-name = "2.8V CPU"; 205 + regulator-min-microvolt = <2800000>; 206 + regulator-max-microvolt = <2800000>; 207 + regulator-always-on; 208 + regulator-boot-on; 209 + }; 210 + }; 211 + 212 + backlight { 213 + compatible = "ams,as3711-bl"; 214 + su2-dev = <&lcdc>; 215 + su2-max-uA = <36000>; 216 + su2-feedback-curr-auto; 217 + su2-fbprot-gpio4; 218 + su2-auto-curr1; 219 + su2-auto-curr2; 220 + su2-auto-curr3; 221 + }; 222 + }; 223 + };
-73
Documentation/devicetree/bindings/mfd/as3711.txt
··· 1 - AS3711 is an I2C PMIC from Austria MicroSystems with multiple DCDC and LDO power 2 - supplies, a battery charger and an RTC. So far only bindings for the two stepup 3 - DCDC converters are defined. Other DCDC and LDO supplies are configured, using 4 - standard regulator properties, they must belong to a sub-node, called 5 - "regulators" and be called "sd1" to "sd4" and "ldo1" to "ldo8." Stepup converter 6 - configuration should be placed in a subnode, called "backlight." 7 - 8 - Compulsory properties: 9 - - compatible : must be "ams,as3711" 10 - - reg : specifies the I2C address 11 - 12 - To use the SU1 converter as a backlight source the following two properties must 13 - be provided: 14 - - su1-dev : framebuffer phandle 15 - - su1-max-uA : maximum current 16 - 17 - To use the SU2 converter as a backlight source the following two properties must 18 - be provided: 19 - - su2-dev : framebuffer phandle 20 - - su1-max-uA : maximum current 21 - 22 - Additionally one of these properties must be provided to select the type of 23 - feedback used: 24 - - su2-feedback-voltage : voltage feedback is used 25 - - su2-feedback-curr1 : CURR1 input used for current feedback 26 - - su2-feedback-curr2 : CURR2 input used for current feedback 27 - - su2-feedback-curr3 : CURR3 input used for current feedback 28 - - su2-feedback-curr-auto: automatic current feedback selection 29 - 30 - and one of these to select the over-voltage protection pin 31 - - su2-fbprot-lx-sd4 : LX_SD4 is used for over-voltage protection 32 - - su2-fbprot-gpio2 : GPIO2 is used for over-voltage protection 33 - - su2-fbprot-gpio3 : GPIO3 is used for over-voltage protection 34 - - su2-fbprot-gpio4 : GPIO4 is used for over-voltage protection 35 - 36 - If "su2-feedback-curr-auto" is selected, one or more of the following properties 37 - have to be specified: 38 - - su2-auto-curr1 : use CURR1 input for current feedback 39 - - su2-auto-curr2 : use CURR2 input for current feedback 40 - - su2-auto-curr3 : use CURR3 input for current feedback 41 - 42 - Example: 43 - 44 - as3711@40 { 45 - compatible = "ams,as3711"; 46 - reg = <0x40>; 47 - 48 - regulators { 49 - sd4 { 50 - regulator-name = "1.215V"; 51 - regulator-min-microvolt = <1215000>; 52 - regulator-max-microvolt = <1235000>; 53 - }; 54 - ldo2 { 55 - regulator-name = "2.8V CPU"; 56 - regulator-min-microvolt = <2800000>; 57 - regulator-max-microvolt = <2800000>; 58 - regulator-always-on; 59 - regulator-boot-on; 60 - }; 61 - }; 62 - 63 - backlight { 64 - compatible = "ams,as3711-bl"; 65 - su2-dev = <&lcdc>; 66 - su2-max-uA = <36000>; 67 - su2-feedback-curr-auto; 68 - su2-fbprot-gpio4; 69 - su2-auto-curr1; 70 - su2-auto-curr2; 71 - su2-auto-curr3; 72 - }; 73 - };
+61 -65
Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
··· 17 17 node. 18 18 19 19 The SPMI controller part is provided by 20 - Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml 20 + Documentation/devicetree/bindings/spmi/hisilicon,hisi-spmi-controller.yaml 21 21 22 22 properties: 23 23 $nodename: ··· 42 42 43 43 additionalProperties: false 44 44 45 - properties: 46 - '#address-cells': 47 - const: 1 48 - 49 - '#size-cells': 50 - const: 0 51 - 52 45 patternProperties: 53 46 '^ldo[0-9]+$': 54 47 type: object ··· 59 66 60 67 examples: 61 68 - | 69 + #include <dt-bindings/spmi/spmi.h> 62 70 63 - pmic: pmic@0 { 64 - compatible = "hisilicon,hi6421v600-spmi"; 65 - reg = <0 0>; 66 - 67 - #interrupt-cells = <2>; 68 - interrupt-controller; 69 - interrupt-parent = <&gpio28>; 70 - interrupts = <0 0>; 71 - 72 - regulators { 73 - #address-cells = <1>; 71 + spmi { 72 + #address-cells = <2>; 74 73 #size-cells = <0>; 75 74 76 - ldo3: ldo3 { 77 - regulator-name = "ldo3"; 78 - regulator-min-microvolt = <1500000>; 79 - regulator-max-microvolt = <2000000>; 80 - regulator-boot-on; 81 - }; 75 + pmic@0 { 76 + compatible = "hisilicon,hi6421v600-spmi"; 77 + reg = <0 SPMI_USID>; 82 78 83 - ldo4: ldo4 { 84 - regulator-name = "ldo4"; 85 - regulator-min-microvolt = <1725000>; 86 - regulator-max-microvolt = <1900000>; 87 - regulator-boot-on; 88 - }; 79 + #interrupt-cells = <2>; 80 + interrupt-controller; 81 + interrupt-parent = <&gpio28>; 82 + interrupts = <0 0>; 89 83 90 - ldo9: ldo9 { 91 - regulator-name = "ldo9"; 92 - regulator-min-microvolt = <1750000>; 93 - regulator-max-microvolt = <3300000>; 94 - regulator-boot-on; 95 - }; 84 + regulators { 85 + ldo3 { 86 + regulator-name = "ldo3"; 87 + regulator-min-microvolt = <1500000>; 88 + regulator-max-microvolt = <2000000>; 89 + regulator-boot-on; 90 + }; 96 91 97 - ldo15: ldo15 { 98 - regulator-name = "ldo15"; 99 - regulator-min-microvolt = <1800000>; 100 - regulator-max-microvolt = <3000000>; 101 - regulator-always-on; 102 - }; 92 + ldo4 { 93 + regulator-name = "ldo4"; 94 + regulator-min-microvolt = <1725000>; 95 + regulator-max-microvolt = <1900000>; 96 + regulator-boot-on; 97 + }; 103 98 104 - ldo16: ldo16 { 105 - regulator-name = "ldo16"; 106 - regulator-min-microvolt = <1800000>; 107 - regulator-max-microvolt = <3000000>; 108 - regulator-boot-on; 109 - }; 99 + ldo9 { 100 + regulator-name = "ldo9"; 101 + regulator-min-microvolt = <1750000>; 102 + regulator-max-microvolt = <3300000>; 103 + regulator-boot-on; 104 + }; 110 105 111 - ldo17: ldo17 { 112 - regulator-name = "ldo17"; 113 - regulator-min-microvolt = <2500000>; 114 - regulator-max-microvolt = <3300000>; 115 - }; 106 + ldo15 { 107 + regulator-name = "ldo15"; 108 + regulator-min-microvolt = <1800000>; 109 + regulator-max-microvolt = <3000000>; 110 + regulator-always-on; 111 + }; 116 112 117 - ldo33: ldo33 { 118 - regulator-name = "ldo33"; 119 - regulator-min-microvolt = <2500000>; 120 - regulator-max-microvolt = <3300000>; 121 - regulator-boot-on; 122 - }; 113 + ldo16 { 114 + regulator-name = "ldo16"; 115 + regulator-min-microvolt = <1800000>; 116 + regulator-max-microvolt = <3000000>; 117 + regulator-boot-on; 118 + }; 123 119 124 - ldo34: ldo34 { 125 - regulator-name = "ldo34"; 126 - regulator-min-microvolt = <2600000>; 127 - regulator-max-microvolt = <3300000>; 120 + ldo17 { 121 + regulator-name = "ldo17"; 122 + regulator-min-microvolt = <2500000>; 123 + regulator-max-microvolt = <3300000>; 124 + }; 125 + 126 + ldo33 { 127 + regulator-name = "ldo33"; 128 + regulator-min-microvolt = <2500000>; 129 + regulator-max-microvolt = <3300000>; 130 + regulator-boot-on; 131 + }; 132 + 133 + ldo34 { 134 + regulator-name = "ldo34"; 135 + regulator-min-microvolt = <2600000>; 136 + regulator-max-microvolt = <3300000>; 137 + }; 138 + }; 128 139 }; 129 - }; 130 140 };
+4 -2
Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
··· 99 99 - | 100 100 #include <dt-bindings/mfd/qcom-pm8008.h> 101 101 #include <dt-bindings/interrupt-controller/irq.h> 102 - qupv3_se13_i2c { 102 + 103 + i2c { 103 104 #address-cells = <1>; 104 105 #size-cells = <0>; 105 - pm8008i@8 { 106 + 107 + pmic@8 { 106 108 compatible = "qcom,pm8008"; 107 109 reg = <0x8>; 108 110 #address-cells = <1>;
+7
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
··· 66 66 - qcom,pm8841 67 67 - qcom,pm8909 68 68 - qcom,pm8916 69 + - qcom,pm8937 69 70 - qcom,pm8941 70 71 - qcom,pm8950 71 72 - qcom,pm8953 ··· 135 134 type: object 136 135 $ref: /schemas/sound/qcom,pm8916-wcd-analog-codec.yaml# 137 136 137 + "^battery@[0-9a-f]+$": 138 + type: object 139 + oneOf: 140 + - $ref: /schemas/power/supply/qcom,pm8916-bms-vm.yaml# 141 + 138 142 "^charger@[0-9a-f]+$": 139 143 type: object 140 144 oneOf: 145 + - $ref: /schemas/power/supply/qcom,pm8916-lbc.yaml# 141 146 - $ref: /schemas/power/supply/qcom,pm8941-charger.yaml# 142 147 - $ref: /schemas/power/supply/qcom,pm8941-coincell.yaml# 143 148 - $ref: /schemas/power/supply/qcom,pmi8998-charger.yaml#
+2
Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
··· 29 29 - qcom,sdx65-tcsr 30 30 - qcom,sm4450-tcsr 31 31 - qcom,sm8150-tcsr 32 + - qcom,sm8250-tcsr 33 + - qcom,sm8350-tcsr 32 34 - qcom,sm8450-tcsr 33 35 - qcom,tcsr-apq8064 34 36 - qcom,tcsr-apq8084
+3 -1
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
··· 19 19 properties: 20 20 compatible: 21 21 items: 22 - - const: sprd,ums512-glbregs 22 + - enum: 23 + - sprd,ums512-glbregs 24 + - sprd,ums9620-glbregs 23 25 - const: syscon 24 26 - const: simple-mfd 25 27
-2
Documentation/devicetree/bindings/mfd/ti,am3359-tscadc.yaml
··· 61 61 - interrupts 62 62 - clocks 63 63 - clock-names 64 - - dmas 65 - - dma-names 66 64 67 65 additionalProperties: false 68 66
+1
drivers/mfd/Kconfig
··· 1483 1483 1484 1484 config MFD_TI_AM335X_TSCADC 1485 1485 tristate "TI ADC / Touch Screen chip support" 1486 + depends on ARCH_OMAP2PLUS || ARCH_K3 || COMPILE_TEST 1486 1487 select MFD_CORE 1487 1488 select REGMAP 1488 1489 select REGMAP_MMIO
+3 -5
drivers/mfd/ab8500-sysctrl.c
··· 30 30 { 31 31 sigset_t old; 32 32 sigset_t all; 33 - static const char * const pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"}; 33 + static const char * const pss[] = {"ab8500_ac", "ab8500_usb"}; 34 34 int i; 35 35 bool charger_present = false; 36 36 union power_supply_propval val; ··· 140 140 return 0; 141 141 } 142 142 143 - static int ab8500_sysctrl_remove(struct platform_device *pdev) 143 + static void ab8500_sysctrl_remove(struct platform_device *pdev) 144 144 { 145 145 sysctrl_dev = NULL; 146 146 147 147 if (pm_power_off == ab8500_power_off) 148 148 pm_power_off = NULL; 149 - 150 - return 0; 151 149 } 152 150 153 151 static const struct of_device_id ab8500_sysctrl_match[] = { ··· 159 161 .of_match_table = ab8500_sysctrl_match, 160 162 }, 161 163 .probe = ab8500_sysctrl_probe, 162 - .remove = ab8500_sysctrl_remove, 164 + .remove_new = ab8500_sysctrl_remove, 163 165 }; 164 166 165 167 static int __init ab8500_sysctrl_init(void)
+2 -3
drivers/mfd/cros_ec_dev.c
··· 288 288 return retval; 289 289 } 290 290 291 - static int ec_device_remove(struct platform_device *pdev) 291 + static void ec_device_remove(struct platform_device *pdev) 292 292 { 293 293 struct cros_ec_dev *ec = dev_get_drvdata(&pdev->dev); 294 294 295 295 mfd_remove_devices(ec->dev); 296 296 device_unregister(&ec->class_dev); 297 - return 0; 298 297 } 299 298 300 299 static const struct platform_device_id cros_ec_id[] = { ··· 308 309 }, 309 310 .id_table = cros_ec_id, 310 311 .probe = ec_device_probe, 311 - .remove = ec_device_remove, 312 + .remove_new = ec_device_remove, 312 313 }; 313 314 314 315 static int __init cros_ec_dev_init(void)
+29 -47
drivers/mfd/cs42l43-sdw.c
··· 6 6 * Cirrus Logic International Semiconductor Ltd. 7 7 */ 8 8 9 + #include <linux/device.h> 9 10 #include <linux/err.h> 10 11 #include <linux/errno.h> 11 12 #include <linux/mfd/cs42l43-regs.h> 12 13 #include <linux/module.h> 13 - #include <linux/device.h> 14 14 #include <linux/soundwire/sdw.h> 15 15 #include <linux/soundwire/sdw_registers.h> 16 16 #include <linux/soundwire/sdw_type.h> 17 17 18 18 #include "cs42l43.h" 19 19 20 - enum cs42l43_sdw_ports { 21 - CS42L43_DMIC_DEC_ASP_PORT = 1, 22 - CS42L43_SPK_TX_PORT, 23 - CS42L43_SPDIF_HP_PORT, 24 - CS42L43_SPK_RX_PORT, 25 - CS42L43_ASP_PORT, 26 - }; 20 + #define CS42L43_SDW_PORT(port, chans) { \ 21 + .num = port, \ 22 + .max_ch = chans, \ 23 + .type = SDW_DPN_FULL, \ 24 + .max_word = 24, \ 25 + } 27 26 28 27 static const struct regmap_config cs42l43_sdw_regmap = { 29 28 .reg_bits = 32, ··· 41 42 .num_reg_defaults = ARRAY_SIZE(cs42l43_reg_default), 42 43 }; 43 44 45 + static const struct sdw_dpn_prop cs42l43_src_port_props[] = { 46 + CS42L43_SDW_PORT(1, 4), 47 + CS42L43_SDW_PORT(2, 2), 48 + CS42L43_SDW_PORT(3, 2), 49 + CS42L43_SDW_PORT(4, 2), 50 + }; 51 + 52 + static const struct sdw_dpn_prop cs42l43_sink_port_props[] = { 53 + CS42L43_SDW_PORT(5, 2), 54 + CS42L43_SDW_PORT(6, 2), 55 + CS42L43_SDW_PORT(7, 2), 56 + }; 57 + 44 58 static int cs42l43_read_prop(struct sdw_slave *sdw) 45 59 { 46 60 struct sdw_slave_prop *prop = &sdw->prop; 47 61 struct device *dev = &sdw->dev; 48 - struct sdw_dpn_prop *dpn; 49 - unsigned long addr; 50 - int nval; 51 62 int i; 52 - u32 bit; 53 63 54 64 prop->use_domain_irq = true; 55 65 prop->paging_support = true; 56 66 prop->wake_capable = true; 57 - prop->source_ports = BIT(CS42L43_DMIC_DEC_ASP_PORT) | BIT(CS42L43_SPK_TX_PORT); 58 - prop->sink_ports = BIT(CS42L43_SPDIF_HP_PORT) | 59 - BIT(CS42L43_SPK_RX_PORT) | BIT(CS42L43_ASP_PORT); 60 67 prop->quirks = SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY; 61 68 prop->scp_int1_mask = SDW_SCP_INT1_BUS_CLASH | SDW_SCP_INT1_PARITY | 62 69 SDW_SCP_INT1_IMPL_DEF; 63 70 64 - nval = hweight32(prop->source_ports); 65 - prop->src_dpn_prop = devm_kcalloc(dev, nval, sizeof(*prop->src_dpn_prop), 66 - GFP_KERNEL); 71 + for (i = 0; i < ARRAY_SIZE(cs42l43_src_port_props); i++) 72 + prop->source_ports |= BIT(cs42l43_src_port_props[i].num); 73 + 74 + prop->src_dpn_prop = devm_kmemdup(dev, cs42l43_src_port_props, 75 + sizeof(cs42l43_src_port_props), GFP_KERNEL); 67 76 if (!prop->src_dpn_prop) 68 77 return -ENOMEM; 69 78 70 - i = 0; 71 - dpn = prop->src_dpn_prop; 72 - addr = prop->source_ports; 73 - for_each_set_bit(bit, &addr, 32) { 74 - dpn[i].num = bit; 75 - dpn[i].max_ch = 2; 76 - dpn[i].type = SDW_DPN_FULL; 77 - dpn[i].max_word = 24; 78 - i++; 79 - } 80 - /* 81 - * All ports are 2 channels max, except the first one, 82 - * CS42L43_DMIC_DEC_ASP_PORT. 83 - */ 84 - dpn[CS42L43_DMIC_DEC_ASP_PORT].max_ch = 4; 79 + for (i = 0; i < ARRAY_SIZE(cs42l43_sink_port_props); i++) 80 + prop->sink_ports |= BIT(cs42l43_sink_port_props[i].num); 85 81 86 - nval = hweight32(prop->sink_ports); 87 - prop->sink_dpn_prop = devm_kcalloc(dev, nval, sizeof(*prop->sink_dpn_prop), 88 - GFP_KERNEL); 82 + prop->sink_dpn_prop = devm_kmemdup(dev, cs42l43_sink_port_props, 83 + sizeof(cs42l43_sink_port_props), GFP_KERNEL); 89 84 if (!prop->sink_dpn_prop) 90 85 return -ENOMEM; 91 - 92 - i = 0; 93 - dpn = prop->sink_dpn_prop; 94 - addr = prop->sink_ports; 95 - for_each_set_bit(bit, &addr, 32) { 96 - dpn[i].num = bit; 97 - dpn[i].max_ch = 2; 98 - dpn[i].type = SDW_DPN_FULL; 99 - dpn[i].max_word = 24; 100 - i++; 101 - } 102 86 103 87 return 0; 104 88 }
+9 -13
drivers/mfd/da9062-core.c
··· 588 588 .volatile_table = &da9062_aa_volatile_table, 589 589 }; 590 590 591 - static const struct of_device_id da9062_dt_ids[] = { 592 - { .compatible = "dlg,da9061", .data = (void *)COMPAT_TYPE_DA9061, }, 593 - { .compatible = "dlg,da9062", .data = (void *)COMPAT_TYPE_DA9062, }, 594 - { } 595 - }; 596 - MODULE_DEVICE_TABLE(of, da9062_dt_ids); 597 - 598 591 static int da9062_i2c_probe(struct i2c_client *i2c) 599 592 { 600 - const struct i2c_device_id *id = i2c_client_get_device_id(i2c); 601 593 struct da9062 *chip; 602 594 unsigned int irq_base = 0; 603 595 const struct mfd_cell *cell; ··· 603 611 if (!chip) 604 612 return -ENOMEM; 605 613 606 - if (i2c->dev.of_node) 607 - chip->chip_type = (uintptr_t)of_device_get_match_data(&i2c->dev); 608 - else 609 - chip->chip_type = id->driver_data; 614 + chip->chip_type = (uintptr_t)i2c_get_match_data(i2c); 610 615 611 616 i2c_set_clientdata(i2c, chip); 612 617 chip->dev = &i2c->dev; ··· 703 714 regmap_del_irq_chip(i2c->irq, chip->regmap_irq); 704 715 } 705 716 717 + static const struct of_device_id da9062_dt_ids[] = { 718 + { .compatible = "dlg,da9061", .data = (void *)COMPAT_TYPE_DA9061 }, 719 + { .compatible = "dlg,da9062", .data = (void *)COMPAT_TYPE_DA9062 }, 720 + { } 721 + }; 722 + MODULE_DEVICE_TABLE(of, da9062_dt_ids); 723 + 706 724 static const struct i2c_device_id da9062_i2c_id[] = { 707 725 { "da9061", COMPAT_TYPE_DA9061 }, 708 726 { "da9062", COMPAT_TYPE_DA9062 }, 709 - { }, 727 + { } 710 728 }; 711 729 MODULE_DEVICE_TABLE(i2c, da9062_i2c_id); 712 730
+2 -4
drivers/mfd/exynos-lpass.c
··· 137 137 return devm_of_platform_populate(dev); 138 138 } 139 139 140 - static int exynos_lpass_remove(struct platform_device *pdev) 140 + static void exynos_lpass_remove(struct platform_device *pdev) 141 141 { 142 142 struct exynos_lpass *lpass = platform_get_drvdata(pdev); 143 143 ··· 146 146 if (!pm_runtime_status_suspended(&pdev->dev)) 147 147 exynos_lpass_disable(lpass); 148 148 regmap_exit(lpass->top); 149 - 150 - return 0; 151 149 } 152 150 153 151 static int __maybe_unused exynos_lpass_suspend(struct device *dev) ··· 185 187 .of_match_table = exynos_lpass_of_match, 186 188 }, 187 189 .probe = exynos_lpass_probe, 188 - .remove = exynos_lpass_remove, 190 + .remove_new = exynos_lpass_remove, 189 191 }; 190 192 module_platform_driver(exynos_lpass_driver); 191 193
+2 -4
drivers/mfd/fsl-imx25-tsadc.c
··· 194 194 return ret; 195 195 } 196 196 197 - static int mx25_tsadc_remove(struct platform_device *pdev) 197 + static void mx25_tsadc_remove(struct platform_device *pdev) 198 198 { 199 199 mx25_tsadc_unset_irq(pdev); 200 - 201 - return 0; 202 200 } 203 201 204 202 static const struct of_device_id mx25_tsadc_ids[] = { ··· 211 213 .of_match_table = mx25_tsadc_ids, 212 214 }, 213 215 .probe = mx25_tsadc_probe, 214 - .remove = mx25_tsadc_remove, 216 + .remove_new = mx25_tsadc_remove, 215 217 }; 216 218 module_platform_driver(mx25_tsadc_driver); 217 219
+2 -3
drivers/mfd/hi655x-pmic.c
··· 144 144 return 0; 145 145 } 146 146 147 - static int hi655x_pmic_remove(struct platform_device *pdev) 147 + static void hi655x_pmic_remove(struct platform_device *pdev) 148 148 { 149 149 struct hi655x_pmic *pmic = platform_get_drvdata(pdev); 150 150 151 151 regmap_del_irq_chip(gpiod_to_irq(pmic->gpio), pmic->irq_data); 152 152 mfd_remove_devices(&pdev->dev); 153 - return 0; 154 153 } 155 154 156 155 static const struct of_device_id hi655x_pmic_match[] = { ··· 164 165 .of_match_table = hi655x_pmic_match, 165 166 }, 166 167 .probe = hi655x_pmic_probe, 167 - .remove = hi655x_pmic_remove, 168 + .remove_new = hi655x_pmic_remove, 168 169 }; 169 170 module_platform_driver(hi655x_pmic_driver); 170 171
+16 -17
drivers/mfd/intel-lpss-acpi.c
··· 8 8 * Mika Westerberg <mika.westerberg@linux.intel.com> 9 9 */ 10 10 11 - #include <linux/acpi.h> 11 + #include <linux/device.h> 12 + #include <linux/gfp_types.h> 12 13 #include <linux/ioport.h> 13 - #include <linux/kernel.h> 14 + #include <linux/mod_devicetable.h> 14 15 #include <linux/module.h> 16 + #include <linux/pm.h> 15 17 #include <linux/pm_runtime.h> 16 18 #include <linux/platform_device.h> 17 19 #include <linux/property.h> 20 + 18 21 #include <linux/pxa2xx_ssp.h> 22 + 23 + #include <asm/errno.h> 19 24 20 25 #include "intel-lpss.h" 21 26 ··· 174 169 175 170 static int intel_lpss_acpi_probe(struct platform_device *pdev) 176 171 { 172 + const struct intel_lpss_platform_info *data; 177 173 struct intel_lpss_platform_info *info; 178 - const struct acpi_device_id *id; 179 174 int ret; 180 175 181 - id = acpi_match_device(intel_lpss_acpi_ids, &pdev->dev); 182 - if (!id) 176 + data = device_get_match_data(&pdev->dev); 177 + if (!data) 183 178 return -ENODEV; 184 179 185 - info = devm_kmemdup(&pdev->dev, (void *)id->driver_data, sizeof(*info), 186 - GFP_KERNEL); 180 + info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL); 187 181 if (!info) 188 182 return -ENOMEM; 189 183 184 + /* No need to check mem and irq here as intel_lpss_probe() does it for us */ 190 185 info->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 191 - if (!info->mem) 192 - return -ENODEV; 193 - 194 186 info->irq = platform_get_irq(pdev, 0); 195 187 196 188 ret = intel_lpss_probe(&pdev->dev, info); ··· 200 198 return 0; 201 199 } 202 200 203 - static int intel_lpss_acpi_remove(struct platform_device *pdev) 201 + static void intel_lpss_acpi_remove(struct platform_device *pdev) 204 202 { 205 203 intel_lpss_remove(&pdev->dev); 206 204 pm_runtime_disable(&pdev->dev); 207 - 208 - return 0; 209 205 } 210 - 211 - static INTEL_LPSS_PM_OPS(intel_lpss_acpi_pm_ops); 212 206 213 207 static struct platform_driver intel_lpss_acpi_driver = { 214 208 .probe = intel_lpss_acpi_probe, 215 - .remove = intel_lpss_acpi_remove, 209 + .remove_new = intel_lpss_acpi_remove, 216 210 .driver = { 217 211 .name = "intel-lpss", 218 212 .acpi_match_table = intel_lpss_acpi_ids, 219 - .pm = &intel_lpss_acpi_pm_ops, 213 + .pm = pm_ptr(&intel_lpss_pm_ops), 220 214 }, 221 215 }; 222 216 ··· 222 224 MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>"); 223 225 MODULE_DESCRIPTION("Intel LPSS ACPI driver"); 224 226 MODULE_LICENSE("GPL v2"); 227 + MODULE_IMPORT_NS(INTEL_LPSS);
+18 -9
drivers/mfd/intel-lpss-pci.c
··· 8 8 * Mika Westerberg <mika.westerberg@linux.intel.com> 9 9 */ 10 10 11 - #include <linux/ioport.h> 12 - #include <linux/kernel.h> 11 + #include <linux/device.h> 12 + #include <linux/gfp_types.h> 13 + #include <linux/mod_devicetable.h> 13 14 #include <linux/module.h> 14 15 #include <linux/pci.h> 16 + #include <linux/pm.h> 15 17 #include <linux/pm_runtime.h> 16 18 #include <linux/property.h> 19 + 17 20 #include <linux/pxa2xx_ssp.h> 21 + 22 + #include <asm/errno.h> 18 23 19 24 #include "intel-lpss.h" 20 25 ··· 35 30 static int intel_lpss_pci_probe(struct pci_dev *pdev, 36 31 const struct pci_device_id *id) 37 32 { 33 + const struct intel_lpss_platform_info *data = (void *)id->driver_data; 38 34 struct intel_lpss_platform_info *info; 39 35 int ret; 40 36 ··· 43 37 if (ret) 44 38 return ret; 45 39 46 - info = devm_kmemdup(&pdev->dev, (void *)id->driver_data, sizeof(*info), 47 - GFP_KERNEL); 40 + ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY); 41 + if (ret < 0) 42 + return ret; 43 + 44 + info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL); 48 45 if (!info) 49 46 return -ENOMEM; 50 47 51 - info->mem = &pdev->resource[0]; 52 - info->irq = pdev->irq; 48 + /* No need to check mem and irq here as intel_lpss_probe() does it for us */ 49 + info->mem = pci_resource_n(pdev, 0); 50 + info->irq = pci_irq_vector(pdev, 0); 53 51 54 52 if (pci_match_id(ignore_resource_conflicts_ids, pdev)) 55 53 info->ignore_resource_conflicts = true; ··· 81 71 82 72 intel_lpss_remove(&pdev->dev); 83 73 } 84 - 85 - static INTEL_LPSS_PM_OPS(intel_lpss_pci_pm_ops); 86 74 87 75 static const struct property_entry spt_spi_properties[] = { 88 76 PROPERTY_ENTRY_U32("intel,spi-pxa2xx-type", LPSS_SPT_SSP), ··· 592 584 .probe = intel_lpss_pci_probe, 593 585 .remove = intel_lpss_pci_remove, 594 586 .driver = { 595 - .pm = &intel_lpss_pci_pm_ops, 587 + .pm = pm_ptr(&intel_lpss_pm_ops), 596 588 }, 597 589 }; 598 590 ··· 602 594 MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>"); 603 595 MODULE_DESCRIPTION("Intel LPSS PCI driver"); 604 596 MODULE_LICENSE("GPL v2"); 597 + MODULE_IMPORT_NS(INTEL_LPSS);
+32 -20
drivers/mfd/intel-lpss.c
··· 10 10 * Jarkko Nikula <jarkko.nikula@linux.intel.com> 11 11 */ 12 12 13 - #include <linux/clk.h> 13 + #include <linux/array_size.h> 14 + #include <linux/bits.h> 14 15 #include <linux/clkdev.h> 16 + #include <linux/clk.h> 15 17 #include <linux/clk-provider.h> 16 18 #include <linux/debugfs.h> 19 + #include <linux/device.h> 20 + #include <linux/err.h> 21 + #include <linux/gfp_types.h> 17 22 #include <linux/idr.h> 18 23 #include <linux/io.h> 19 24 #include <linux/ioport.h> 20 - #include <linux/kernel.h> 21 - #include <linux/module.h> 22 25 #include <linux/mfd/core.h> 26 + #include <linux/module.h> 27 + #include <linux/pm.h> 23 28 #include <linux/pm_qos.h> 24 29 #include <linux/pm_runtime.h> 25 - #include <linux/property.h> 26 - #include <linux/seq_file.h> 30 + #include <linux/sprintf.h> 31 + #include <linux/types.h> 32 + 27 33 #include <linux/io-64-nonatomic-lo-hi.h> 28 34 29 35 #include <linux/dma/idma64.h> 30 36 31 37 #include "intel-lpss.h" 38 + 39 + struct dentry; 32 40 33 41 #define LPSS_DEV_OFFSET 0x000 34 42 #define LPSS_DEV_SIZE 0x200 ··· 309 301 310 302 snprintf(name, sizeof(name), "%s-div", devname); 311 303 tmp = clk_register_fractional_divider(NULL, name, __clk_get_name(tmp), 304 + 0, lpss->priv, 1, 15, 16, 15, 312 305 CLK_FRAC_DIVIDER_POWER_OF_TWO_PS, 313 - lpss->priv, 1, 15, 16, 15, 0, 314 306 NULL); 315 307 if (IS_ERR(tmp)) 316 308 return PTR_ERR(tmp); ··· 386 378 struct intel_lpss *lpss; 387 379 int ret; 388 380 389 - if (!info || !info->mem || info->irq <= 0) 381 + if (!info || !info->mem) 390 382 return -EINVAL; 383 + 384 + if (info->irq < 0) 385 + return info->irq; 391 386 392 387 lpss = devm_kzalloc(dev, sizeof(*lpss), GFP_KERNEL); 393 388 if (!lpss) ··· 416 405 417 406 intel_lpss_init_dev(lpss); 418 407 419 - lpss->devid = ida_simple_get(&intel_lpss_devid_ida, 0, 0, GFP_KERNEL); 408 + lpss->devid = ida_alloc(&intel_lpss_devid_ida, GFP_KERNEL); 420 409 if (lpss->devid < 0) 421 410 return lpss->devid; 422 411 ··· 453 442 intel_lpss_unregister_clock(lpss); 454 443 455 444 err_clk_register: 456 - ida_simple_remove(&intel_lpss_devid_ida, lpss->devid); 445 + ida_free(&intel_lpss_devid_ida, lpss->devid); 457 446 458 447 return ret; 459 448 } 460 - EXPORT_SYMBOL_GPL(intel_lpss_probe); 449 + EXPORT_SYMBOL_NS_GPL(intel_lpss_probe, INTEL_LPSS); 461 450 462 451 void intel_lpss_remove(struct device *dev) 463 452 { ··· 467 456 intel_lpss_debugfs_remove(lpss); 468 457 intel_lpss_ltr_hide(lpss); 469 458 intel_lpss_unregister_clock(lpss); 470 - ida_simple_remove(&intel_lpss_devid_ida, lpss->devid); 459 + ida_free(&intel_lpss_devid_ida, lpss->devid); 471 460 } 472 - EXPORT_SYMBOL_GPL(intel_lpss_remove); 461 + EXPORT_SYMBOL_NS_GPL(intel_lpss_remove, INTEL_LPSS); 473 462 474 - #ifdef CONFIG_PM 475 463 static int resume_lpss_device(struct device *dev, void *data) 476 464 { 477 465 if (!dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND)) ··· 479 469 return 0; 480 470 } 481 471 482 - int intel_lpss_prepare(struct device *dev) 472 + static int intel_lpss_prepare(struct device *dev) 483 473 { 484 474 /* 485 475 * Resume both child devices before entering system sleep. This ··· 488 478 device_for_each_child_reverse(dev, NULL, resume_lpss_device); 489 479 return 0; 490 480 } 491 - EXPORT_SYMBOL_GPL(intel_lpss_prepare); 492 481 493 - int intel_lpss_suspend(struct device *dev) 482 + static int intel_lpss_suspend(struct device *dev) 494 483 { 495 484 struct intel_lpss *lpss = dev_get_drvdata(dev); 496 485 unsigned int i; ··· 508 499 509 500 return 0; 510 501 } 511 - EXPORT_SYMBOL_GPL(intel_lpss_suspend); 512 502 513 - int intel_lpss_resume(struct device *dev) 503 + static int intel_lpss_resume(struct device *dev) 514 504 { 515 505 struct intel_lpss *lpss = dev_get_drvdata(dev); 516 506 unsigned int i; ··· 522 514 523 515 return 0; 524 516 } 525 - EXPORT_SYMBOL_GPL(intel_lpss_resume); 526 - #endif 517 + 518 + EXPORT_NS_GPL_DEV_PM_OPS(intel_lpss_pm_ops, INTEL_LPSS) = { 519 + .prepare = pm_sleep_ptr(&intel_lpss_prepare), 520 + LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume) 521 + RUNTIME_PM_OPS(intel_lpss_suspend, intel_lpss_resume, NULL) 522 + }; 527 523 528 524 static int __init intel_lpss_init(void) 529 525 {
+1 -27
drivers/mfd/intel-lpss.h
··· 30 30 const struct intel_lpss_platform_info *info); 31 31 void intel_lpss_remove(struct device *dev); 32 32 33 - #ifdef CONFIG_PM 34 - int intel_lpss_prepare(struct device *dev); 35 - int intel_lpss_suspend(struct device *dev); 36 - int intel_lpss_resume(struct device *dev); 37 - 38 - #ifdef CONFIG_PM_SLEEP 39 - #define INTEL_LPSS_SLEEP_PM_OPS \ 40 - .prepare = intel_lpss_prepare, \ 41 - SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume) 42 - #else 43 - #define INTEL_LPSS_SLEEP_PM_OPS 44 - #endif 45 - 46 - #define INTEL_LPSS_RUNTIME_PM_OPS \ 47 - .runtime_suspend = intel_lpss_suspend, \ 48 - .runtime_resume = intel_lpss_resume, 49 - 50 - #else /* !CONFIG_PM */ 51 - #define INTEL_LPSS_SLEEP_PM_OPS 52 - #define INTEL_LPSS_RUNTIME_PM_OPS 53 - #endif /* CONFIG_PM */ 54 - 55 - #define INTEL_LPSS_PM_OPS(name) \ 56 - const struct dev_pm_ops name = { \ 57 - INTEL_LPSS_SLEEP_PM_OPS \ 58 - INTEL_LPSS_RUNTIME_PM_OPS \ 59 - } 33 + extern const struct dev_pm_ops intel_lpss_pm_ops; 60 34 61 35 #endif /* __MFD_INTEL_LPSS_H */
+2 -4
drivers/mfd/kempld-core.c
··· 535 535 return kempld_detect_device(pld); 536 536 } 537 537 538 - static int kempld_remove(struct platform_device *pdev) 538 + static void kempld_remove(struct platform_device *pdev) 539 539 { 540 540 struct kempld_device_data *pld = platform_get_drvdata(pdev); 541 541 const struct kempld_platform_data *pdata = dev_get_platdata(pld->dev); ··· 544 544 545 545 mfd_remove_devices(&pdev->dev); 546 546 pdata->release_hardware_mutex(pld); 547 - 548 - return 0; 549 547 } 550 548 551 549 #ifdef CONFIG_ACPI ··· 561 563 .acpi_match_table = ACPI_PTR(kempld_acpi_table), 562 564 }, 563 565 .probe = kempld_probe, 564 - .remove = kempld_remove, 566 + .remove_new = kempld_remove, 565 567 }; 566 568 567 569 static const struct dmi_system_id kempld_dmi_table[] __initconst = {
+2 -4
drivers/mfd/mcp-sa11x0.c
··· 232 232 return ret; 233 233 } 234 234 235 - static int mcp_sa11x0_remove(struct platform_device *dev) 235 + static void mcp_sa11x0_remove(struct platform_device *dev) 236 236 { 237 237 struct mcp *mcp = platform_get_drvdata(dev); 238 238 struct mcp_sa11x0 *m = priv(mcp); ··· 251 251 mcp_host_free(mcp); 252 252 release_mem_region(mem1->start, resource_size(mem1)); 253 253 release_mem_region(mem0->start, resource_size(mem0)); 254 - 255 - return 0; 256 254 } 257 255 258 256 static int mcp_sa11x0_suspend(struct device *dev) ··· 286 288 287 289 static struct platform_driver mcp_sa11x0_driver = { 288 290 .probe = mcp_sa11x0_probe, 289 - .remove = mcp_sa11x0_remove, 291 + .remove_new = mcp_sa11x0_remove, 290 292 .driver = { 291 293 .name = DRIVER_NAME, 292 294 .pm = pm_sleep_ptr(&mcp_sa11x0_pm_ops),
+2 -4
drivers/mfd/mxs-lradc.c
··· 230 230 return ret; 231 231 } 232 232 233 - static int mxs_lradc_remove(struct platform_device *pdev) 233 + static void mxs_lradc_remove(struct platform_device *pdev) 234 234 { 235 235 struct mxs_lradc *lradc = platform_get_drvdata(pdev); 236 236 237 237 clk_disable_unprepare(lradc->clk); 238 - 239 - return 0; 240 238 } 241 239 242 240 static struct platform_driver mxs_lradc_driver = { ··· 243 245 .of_match_table = mxs_lradc_dt_ids, 244 246 }, 245 247 .probe = mxs_lradc_probe, 246 - .remove = mxs_lradc_remove, 248 + .remove_new = mxs_lradc_remove, 247 249 }; 248 250 module_platform_driver(mxs_lradc_driver); 249 251
+2 -3
drivers/mfd/omap-usb-host.c
··· 816 816 * 817 817 * Reverses the effect of usbhs_omap_probe(). 818 818 */ 819 - static int usbhs_omap_remove(struct platform_device *pdev) 819 + static void usbhs_omap_remove(struct platform_device *pdev) 820 820 { 821 821 pm_runtime_disable(&pdev->dev); 822 822 823 823 /* remove children */ 824 824 device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child); 825 - return 0; 826 825 } 827 826 828 827 static const struct dev_pm_ops usbhsomap_dev_pm_ops = { ··· 844 845 .of_match_table = usbhs_omap_dt_ids, 845 846 }, 846 847 .probe = usbhs_omap_probe, 847 - .remove = usbhs_omap_remove, 848 + .remove_new = usbhs_omap_remove, 848 849 }; 849 850 850 851 MODULE_AUTHOR("Keshava Munegowda <keshava_mgowda@ti.com>");
+2 -3
drivers/mfd/omap-usb-tll.c
··· 270 270 * 271 271 * Reverses the effect of usbtll_omap_probe(). 272 272 */ 273 - static int usbtll_omap_remove(struct platform_device *pdev) 273 + static void usbtll_omap_remove(struct platform_device *pdev) 274 274 { 275 275 struct usbtll_omap *tll = platform_get_drvdata(pdev); 276 276 int i; ··· 287 287 } 288 288 289 289 pm_runtime_disable(&pdev->dev); 290 - return 0; 291 290 } 292 291 293 292 static const struct of_device_id usbtll_omap_dt_ids[] = { ··· 302 303 .of_match_table = usbtll_omap_dt_ids, 303 304 }, 304 305 .probe = usbtll_omap_probe, 305 - .remove = usbtll_omap_remove, 306 + .remove_new = usbtll_omap_remove, 306 307 }; 307 308 308 309 int omap_tll_init(struct usbhs_omap_platform_data *pdata)
+2 -4
drivers/mfd/pcf50633-adc.c
··· 218 218 return 0; 219 219 } 220 220 221 - static int pcf50633_adc_remove(struct platform_device *pdev) 221 + static void pcf50633_adc_remove(struct platform_device *pdev) 222 222 { 223 223 struct pcf50633_adc *adc = platform_get_drvdata(pdev); 224 224 int i, head; ··· 236 236 kfree(adc->queue[i]); 237 237 238 238 mutex_unlock(&adc->queue_mutex); 239 - 240 - return 0; 241 239 } 242 240 243 241 static struct platform_driver pcf50633_adc_driver = { ··· 243 245 .name = "pcf50633-adc", 244 246 }, 245 247 .probe = pcf50633_adc_probe, 246 - .remove = pcf50633_adc_remove, 248 + .remove_new = pcf50633_adc_remove, 247 249 }; 248 250 249 251 module_platform_driver(pcf50633_adc_driver);
+2 -4
drivers/mfd/qcom-pm8xxx.c
··· 585 585 return 0; 586 586 } 587 587 588 - static int pm8xxx_remove(struct platform_device *pdev) 588 + static void pm8xxx_remove(struct platform_device *pdev) 589 589 { 590 590 struct pm_irq_chip *chip = platform_get_drvdata(pdev); 591 591 592 592 device_for_each_child(&pdev->dev, NULL, pm8xxx_remove_child); 593 593 irq_domain_remove(chip->irqdomain); 594 - 595 - return 0; 596 594 } 597 595 598 596 static struct platform_driver pm8xxx_driver = { 599 597 .probe = pm8xxx_probe, 600 - .remove = pm8xxx_remove, 598 + .remove_new = pm8xxx_remove, 601 599 .driver = { 602 600 .name = "pm8xxx-core", 603 601 .of_match_table = pm8xxx_id_table,
+1
drivers/mfd/qcom-spmi-pmic.c
··· 53 53 { .compatible = "qcom,pm8901", .data = N_USIDS(2) }, 54 54 { .compatible = "qcom,pm8909", .data = N_USIDS(2) }, 55 55 { .compatible = "qcom,pm8916", .data = N_USIDS(2) }, 56 + { .compatible = "qcom,pm8937", .data = N_USIDS(2) }, 56 57 { .compatible = "qcom,pm8941", .data = N_USIDS(2) }, 57 58 { .compatible = "qcom,pm8950", .data = N_USIDS(2) }, 58 59 { .compatible = "qcom,pm8994", .data = N_USIDS(2) },
+13 -21
drivers/mfd/rk8xx-core.c
··· 53 53 }; 54 54 55 55 static const struct mfd_cell rk805s[] = { 56 - { .name = "rk808-clkout", .id = PLATFORM_DEVID_NONE, }, 57 - { .name = "rk808-regulator", .id = PLATFORM_DEVID_NONE, }, 58 - { .name = "rk805-pinctrl", .id = PLATFORM_DEVID_NONE, }, 56 + { .name = "rk808-clkout", }, 57 + { .name = "rk808-regulator", }, 58 + { .name = "rk805-pinctrl", }, 59 59 { 60 60 .name = "rk808-rtc", 61 61 .num_resources = ARRAY_SIZE(rtc_resources), 62 62 .resources = &rtc_resources[0], 63 - .id = PLATFORM_DEVID_NONE, 64 63 }, 65 64 { .name = "rk805-pwrkey", 66 65 .num_resources = ARRAY_SIZE(rk805_key_resources), 67 66 .resources = &rk805_key_resources[0], 68 - .id = PLATFORM_DEVID_NONE, 69 67 }, 70 68 }; 71 69 72 70 static const struct mfd_cell rk806s[] = { 73 - { .name = "rk805-pinctrl", .id = PLATFORM_DEVID_AUTO, }, 74 - { .name = "rk808-regulator", .id = PLATFORM_DEVID_AUTO, }, 71 + { .name = "rk805-pinctrl", }, 72 + { .name = "rk808-regulator", }, 75 73 { 76 74 .name = "rk805-pwrkey", 77 75 .resources = rk806_pwrkey_resources, 78 76 .num_resources = ARRAY_SIZE(rk806_pwrkey_resources), 79 - .id = PLATFORM_DEVID_AUTO, 80 77 }, 81 78 }; 82 79 83 80 static const struct mfd_cell rk808s[] = { 84 - { .name = "rk808-clkout", .id = PLATFORM_DEVID_NONE, }, 85 - { .name = "rk808-regulator", .id = PLATFORM_DEVID_NONE, }, 81 + { .name = "rk808-clkout", }, 82 + { .name = "rk808-regulator", }, 86 83 { 87 84 .name = "rk808-rtc", 88 85 .num_resources = ARRAY_SIZE(rtc_resources), 89 86 .resources = rtc_resources, 90 - .id = PLATFORM_DEVID_NONE, 91 87 }, 92 88 }; 93 89 94 90 static const struct mfd_cell rk817s[] = { 95 - { .name = "rk808-clkout", .id = PLATFORM_DEVID_NONE, }, 96 - { .name = "rk808-regulator", .id = PLATFORM_DEVID_NONE, }, 91 + { .name = "rk808-clkout", }, 92 + { .name = "rk808-regulator", }, 97 93 { 98 94 .name = "rk805-pwrkey", 99 95 .num_resources = ARRAY_SIZE(rk817_pwrkey_resources), 100 96 .resources = &rk817_pwrkey_resources[0], 101 - .id = PLATFORM_DEVID_NONE, 102 97 }, 103 98 { 104 99 .name = "rk808-rtc", 105 100 .num_resources = ARRAY_SIZE(rk817_rtc_resources), 106 101 .resources = &rk817_rtc_resources[0], 107 - .id = PLATFORM_DEVID_NONE, 108 102 }, 109 - { .name = "rk817-codec", .id = PLATFORM_DEVID_NONE, }, 103 + { .name = "rk817-codec", }, 110 104 { 111 105 .name = "rk817-charger", 112 106 .num_resources = ARRAY_SIZE(rk817_charger_resources), 113 107 .resources = &rk817_charger_resources[0], 114 - .id = PLATFORM_DEVID_NONE, 115 108 }, 116 109 }; 117 110 118 111 static const struct mfd_cell rk818s[] = { 119 - { .name = "rk808-clkout", .id = PLATFORM_DEVID_NONE, }, 120 - { .name = "rk808-regulator", .id = PLATFORM_DEVID_NONE, }, 112 + { .name = "rk808-clkout", }, 113 + { .name = "rk808-regulator", }, 121 114 { 122 115 .name = "rk808-rtc", 123 116 .num_resources = ARRAY_SIZE(rtc_resources), 124 117 .resources = rtc_resources, 125 - .id = PLATFORM_DEVID_NONE, 126 118 }, 127 119 }; 128 120 ··· 676 684 pre_init_reg[i].addr); 677 685 } 678 686 679 - ret = devm_mfd_add_devices(dev, 0, cells, nr_cells, NULL, 0, 687 + ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_AUTO, cells, nr_cells, NULL, 0, 680 688 regmap_irq_get_domain(rk808->irq_data)); 681 689 if (ret) 682 690 return dev_err_probe(dev, ret, "failed to add MFD devices\n");
+2 -4
drivers/mfd/sm501.c
··· 1667 1667 pci_disable_device(dev); 1668 1668 } 1669 1669 1670 - static int sm501_plat_remove(struct platform_device *dev) 1670 + static void sm501_plat_remove(struct platform_device *dev) 1671 1671 { 1672 1672 struct sm501_devdata *sm = platform_get_drvdata(dev); 1673 1673 ··· 1675 1675 iounmap(sm->regs); 1676 1676 1677 1677 release_mem_region(sm->io_res->start, 0x100); 1678 - 1679 - return 0; 1680 1678 } 1681 1679 1682 1680 static const struct pci_device_id sm501_pci_tbl[] = { ··· 1705 1707 .of_match_table = of_sm501_match_tbl, 1706 1708 }, 1707 1709 .probe = sm501_plat_probe, 1708 - .remove = sm501_plat_remove, 1710 + .remove_new = sm501_plat_remove, 1709 1711 .suspend = pm_sleep_ptr(sm501_plat_suspend), 1710 1712 .resume = pm_sleep_ptr(sm501_plat_resume), 1711 1713 };
+2 -4
drivers/mfd/stm32-timers.c
··· 306 306 return ret; 307 307 } 308 308 309 - static int stm32_timers_remove(struct platform_device *pdev) 309 + static void stm32_timers_remove(struct platform_device *pdev) 310 310 { 311 311 struct stm32_timers *ddata = platform_get_drvdata(pdev); 312 312 ··· 316 316 */ 317 317 of_platform_depopulate(&pdev->dev); 318 318 stm32_timers_dma_remove(&pdev->dev, ddata); 319 - 320 - return 0; 321 319 } 322 320 323 321 static const struct of_device_id stm32_timers_of_match[] = { ··· 326 328 327 329 static struct platform_driver stm32_timers_driver = { 328 330 .probe = stm32_timers_probe, 329 - .remove = stm32_timers_remove, 331 + .remove_new = stm32_timers_remove, 330 332 .driver = { 331 333 .name = "stm32-timers", 332 334 .of_match_table = stm32_timers_of_match,
+4
drivers/mfd/syscon.c
··· 105 105 } 106 106 107 107 syscon_config.name = kasprintf(GFP_KERNEL, "%pOFn@%pa", np, &res.start); 108 + if (!syscon_config.name) { 109 + ret = -ENOMEM; 110 + goto err_regmap; 111 + } 108 112 syscon_config.reg_stride = reg_io_width; 109 113 syscon_config.val_bits = reg_io_width * 8; 110 114 syscon_config.max_register = resource_size(&res) - reg_io_width;
+2 -4
drivers/mfd/ti_am335x_tscadc.c
··· 298 298 return err; 299 299 } 300 300 301 - static int ti_tscadc_remove(struct platform_device *pdev) 301 + static void ti_tscadc_remove(struct platform_device *pdev) 302 302 { 303 303 struct ti_tscadc_dev *tscadc = platform_get_drvdata(pdev); 304 304 ··· 308 308 pm_runtime_disable(&pdev->dev); 309 309 310 310 mfd_remove_devices(tscadc->dev); 311 - 312 - return 0; 313 311 } 314 312 315 313 static int __maybe_unused ti_tscadc_can_wakeup(struct device *dev, void *data) ··· 379 381 .of_match_table = ti_tscadc_dt_ids, 380 382 }, 381 383 .probe = ti_tscadc_probe, 382 - .remove = ti_tscadc_remove, 384 + .remove_new = ti_tscadc_remove, 383 385 384 386 }; 385 387
+1
drivers/mfd/tps65086.c
··· 36 36 .val_bits = 8, 37 37 .cache_type = REGCACHE_MAPLE, 38 38 .volatile_table = &tps65086_volatile_table, 39 + .max_register = TPS65086_OC_STATUS, 39 40 }; 40 41 41 42 static const struct regmap_irq tps65086_irqs[] = {
+2 -4
drivers/mfd/tps65911-comparator.c
··· 140 140 return ret; 141 141 } 142 142 143 - static int tps65911_comparator_remove(struct platform_device *pdev) 143 + static void tps65911_comparator_remove(struct platform_device *pdev) 144 144 { 145 145 struct tps65910 *tps65910; 146 146 147 147 tps65910 = dev_get_drvdata(pdev->dev.parent); 148 148 device_remove_file(&pdev->dev, &dev_attr_comp2_threshold); 149 149 device_remove_file(&pdev->dev, &dev_attr_comp1_threshold); 150 - 151 - return 0; 152 150 } 153 151 154 152 static struct platform_driver tps65911_comparator_driver = { ··· 154 156 .name = "tps65911-comparator", 155 157 }, 156 158 .probe = tps65911_comparator_probe, 157 - .remove = tps65911_comparator_remove, 159 + .remove_new = tps65911_comparator_remove, 158 160 }; 159 161 160 162 static int __init tps65911_comparator_init(void)
+3
drivers/mfd/tps6594-core.c
··· 433 433 tps6594_irq_chip.name = devm_kasprintf(dev, GFP_KERNEL, "%s-%ld-0x%02x", 434 434 dev->driver->name, tps->chip_id, tps->reg); 435 435 436 + if (!tps6594_irq_chip.name) 437 + return -ENOMEM; 438 + 436 439 ret = devm_regmap_add_irq_chip(dev, tps->regmap, tps->irq, IRQF_SHARED | IRQF_ONESHOT, 437 440 0, &tps6594_irq_chip, &tps->irq_data); 438 441 if (ret)
+2 -4
drivers/mfd/twl4030-audio.c
··· 258 258 return ret; 259 259 } 260 260 261 - static int twl4030_audio_remove(struct platform_device *pdev) 261 + static void twl4030_audio_remove(struct platform_device *pdev) 262 262 { 263 263 mfd_remove_devices(&pdev->dev); 264 264 twl4030_audio_dev = NULL; 265 - 266 - return 0; 267 265 } 268 266 269 267 static const struct of_device_id twl4030_audio_of_match[] = { ··· 276 278 .of_match_table = twl4030_audio_of_match, 277 279 }, 278 280 .probe = twl4030_audio_probe, 279 - .remove = twl4030_audio_remove, 281 + .remove_new = twl4030_audio_remove, 280 282 }; 281 283 282 284 module_platform_driver(twl4030_audio_driver);
+5 -5
drivers/mfd/twl6030-irq.c
··· 24 24 #include <linux/kthread.h> 25 25 #include <linux/mfd/twl.h> 26 26 #include <linux/platform_device.h> 27 - #include <linux/property.h> 28 27 #include <linux/suspend.h> 29 28 #include <linux/of.h> 30 29 #include <linux/irqdomain.h> 30 + #include <linux/of_device.h> 31 31 32 32 #include "twl-core.h" 33 33 ··· 368 368 int nr_irqs; 369 369 int status; 370 370 u8 mask[3]; 371 - const int *irq_tbl; 371 + const struct of_device_id *of_id; 372 372 373 - irq_tbl = device_get_match_data(dev); 374 - if (!irq_tbl) { 373 + of_id = of_match_device(twl6030_of_match, dev); 374 + if (!of_id || !of_id->data) { 375 375 dev_err(dev, "Unknown TWL device model\n"); 376 376 return -EINVAL; 377 377 } ··· 409 409 410 410 twl6030_irq->pm_nb.notifier_call = twl6030_irq_pm_notifier; 411 411 atomic_set(&twl6030_irq->wakeirqs, 0); 412 - twl6030_irq->irq_mapping_tbl = irq_tbl; 412 + twl6030_irq->irq_mapping_tbl = of_id->data; 413 413 414 414 twl6030_irq->irq_domain = 415 415 irq_domain_add_linear(node, nr_irqs,
+1 -1
include/linux/mfd/max77693-private.h
··· 405 405 MAX77693_HAPTIC_REG_END, 406 406 }; 407 407 408 - /* max77693-pmic LSCNFG configuraton register */ 408 + /* max77693-pmic LSCNFG configuration register */ 409 409 #define MAX77693_PMIC_LOW_SYS_MASK 0x80 410 410 #define MAX77693_PMIC_LOW_SYS_SHIFT 7 411 411
+1 -1
include/linux/mfd/max77843-private.h
··· 198 198 #define MAX77843_MCONFIG_MEN_MASK BIT(MCONFIG_MEN_SHIFT) 199 199 #define MAX77843_MCONFIG_PDIV_MASK (0x3 << MCONFIG_PDIV_SHIFT) 200 200 201 - /* Max77843 charger insterrupts */ 201 + /* Max77843 charger interrupts */ 202 202 #define MAX77843_CHG_BYP_I BIT(0) 203 203 #define MAX77843_CHG_BATP_I BIT(2) 204 204 #define MAX77843_CHG_BAT_I BIT(3)
+1 -1
include/linux/mfd/si476x-platform.h
··· 10 10 #ifndef __SI476X_PLATFORM_H__ 11 11 #define __SI476X_PLATFORM_H__ 12 12 13 - /* It is possible to select one of the four adresses using pins A0 13 + /* It is possible to select one of the four addresses using pins A0 14 14 * and A1 on SI476x */ 15 15 #define SI476X_I2C_ADDR_1 0x60 16 16 #define SI476X_I2C_ADDR_2 0x61
+1 -1
include/linux/mfd/tps65910.h
··· 749 749 #define VDDCTRL_ST_SHIFT 0 750 750 751 751 752 - /*Register VDDCTRL_OP (0x28) bit definitios */ 752 + /*Register VDDCTRL_OP (0x28) bit definitions */ 753 753 #define VDDCTRL_OP_CMD_MASK 0x80 754 754 #define VDDCTRL_OP_CMD_SHIFT 7 755 755 #define VDDCTRL_OP_SEL_MASK 0x7F
+1
include/soc/qcom/qcom-spmi-pmic.h
··· 31 31 #define PM8998_SUBTYPE 0x14 32 32 #define PMI8998_SUBTYPE 0x15 33 33 #define PM8005_SUBTYPE 0x18 34 + #define PM8937_SUBTYPE 0x19 34 35 #define PM660L_SUBTYPE 0x1a 35 36 #define PM660_SUBTYPE 0x1b 36 37 #define PM8150_SUBTYPE 0x1e