Skip to content

Commit

Permalink
Merge tag 'mfd-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Drivers:
   - Add support for TI TPS6594/TPS6593/LP8764 PMICs
   - Add support for Samsung RT5033 Battery Charger
   - Add support for Analog Devices MAX77540 and MAX77541 PMICs

  New Device Support:
   - Add support for SPI to Rockchip RK808 (and friends)
   - Add support for AXP192 PMIC to X-Powers AXP20X
   - Add support for AXP313a PMIC to X-Powers AXP20X
   - Add support for RK806 to Rockchip RK8XX

  Removed Device Support:
   - Removed MFD support for Richtek RT5033 Battery

  Fix-ups:
   - Remove superfluous code
   - Switch I2C drivers from .probe_new() to .probe()
   - Convert over to managed resources (devm_*(), etc)
   - Use dev_err_probe() for returning errors from .probe()
   - Add lots of Device Tree bindings / support
   - Improve cache efficiency by switching to Maple
   - Use own exported namespaces (NS)
   - Include missing and remove superfluous headers
   - Start using / convert to the new shutdown sys-off API
   - Trivial: variable / define renaming
   - Make use of of_property_read_reg() when requesting DT 'reg's

  Bug Fixes:
   - Fix chip revision readout due to incorrect data masking
   - Amend incorrect register and mask values used for charger state
   - Hide unused functionality at compile time
   - Fix resource leaks following error handling routines
   - Return correct error values and fix error handling in general
   - Repair incorrect device names - used for device matching
   - Remedy broken module auto-loading"

* tag 'mfd-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (51 commits)
  dt-bindings: mfd: max77541: Add ADI MAX77541/MAX77540
  iio: adc: max77541: Add ADI MAX77541 ADC Support
  regulator: max77541: Add ADI MAX77541/MAX77540 Regulator Support
  dt-bindings: regulator: max77541: Add ADI MAX77541/MAX77540 Regulator
  mfd: Switch two more drivers back to use struct i2c_driver::probe
  dt-bindings: mfd: samsung,s5m8767: Simplify excluding properties
  mfd: stmpe: Only disable the regulators if they are enabled
  mfd: max77541: Add ADI MAX77541/MAX77540 PMIC Support
  dt-bindings: mfd: gateworks-gsc: Remove unnecessary fan-controller nodes
  mfd: core: Use of_property_read_reg() to parse "reg"
  mfd: stmfx: Nullify stmfx->vdd in case of error
  mfd: stmfx: Fix error path in stmfx_chip_init
  mfd: intel-lpss: Add missing check for platform_get_resource
  mfd: stpmic1: Add PMIC poweroff via sys-off handler
  mfd: stpmic1: Fixup main control register and bits naming
  dt-bindings: mfd: qcom,tcsr: Add the compatible for IPQ8074
  mfd: tps65219: Add support for soft shutdown via sys-off API
  mfd: pm8008: Drop bogus i2c module alias
  mfd: pm8008: Fix module autoloading
  mfd: tps65219: Add GPIO cell instance
  ...
  • Loading branch information
torvalds committed Jul 3, 2023
2 parents 99bdeae + b05740d commit b8ec70a
Show file tree
Hide file tree
Showing 146 changed files with 2,374 additions and 300 deletions.
4 changes: 4 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ Krzysztof Kozlowski <[email protected]> <[email protected]>
Krzysztof Kozlowski <[email protected]> <[email protected]>
Kuninori Morimoto <[email protected]>
Kuogee Hsieh <[email protected]> <[email protected]>
Lee Jones <[email protected]> <[email protected]>
Lee Jones <[email protected]> <[email protected]>
Lee Jones <[email protected]> <[email protected]>
Lee Jones <[email protected]> <[email protected]>
Leonard Crestez <[email protected]> Leonard Crestez <[email protected]>
Leonardo Bras <[email protected]> <[email protected]>
Leonard Göhrs <[email protected]>
Expand Down
68 changes: 68 additions & 0 deletions Documentation/devicetree/bindings/mfd/adi,max77541.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/adi,max77541.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MAX77540/MAX77541 PMIC from ADI

maintainers:
- Okan Sahin <[email protected]>

description: |
MAX77540 is a Power Management IC with 2 buck regulators.
MAX77541 is a Power Management IC with 2 buck regulators and 1 ADC.
properties:
compatible:
enum:
- adi,max77540
- adi,max77541

reg:
maxItems: 1

interrupts:
maxItems: 1

regulators:
$ref: /schemas/regulator/adi,max77541-regulator.yaml#

required:
- compatible
- reg
- interrupts

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
pmic@69 {
compatible = "adi,max77541";
reg = <0x69>;
interrupt-parent = <&gpio>;
interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
regulators {
buck1 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <5200000>;
regulator-boot-on;
regulator-always-on;
};
buck2 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <5200000>;
regulator-boot-on;
regulator-always-on;
};
};
};
};
10 changes: 0 additions & 10 deletions Documentation/devicetree/bindings/mfd/gateworks-gsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,13 @@ patternProperties:
compatible:
const: gw,gsc-fan

"#address-cells":
const: 1

"#size-cells":
const: 0

reg:
description: The fan controller base address
maxItems: 1

required:
- compatible
- reg
- "#address-cells"
- "#size-cells"

required:
- compatible
Expand Down Expand Up @@ -194,8 +186,6 @@ examples:
};
fan-controller@2c {
#address-cells = <1>;
#size-cells = <0>;
compatible = "gw,gsc-fan";
reg = <0x2c>;
};
Expand Down
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ patternProperties:
type: object
$ref: /schemas/nvmem/qcom,spmi-sdam.yaml#

"phy@[0-9a-f]+$":
type: object
$ref: /schemas/phy/qcom,snps-eusb2-repeater.yaml#

"pon@[0-9a-f]+$":
type: object
$ref: /schemas/power/reset/qcom,pon.yaml#
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ properties:
- qcom,tcsr-ipq5332
- qcom,tcsr-ipq6018
- qcom,tcsr-ipq8064
- qcom,tcsr-ipq8074
- qcom,tcsr-ipq9574
- qcom,tcsr-mdm9615
- qcom,tcsr-msm8226
Expand Down
138 changes: 138 additions & 0 deletions Documentation/devicetree/bindings/mfd/richtek,rt5033.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/richtek,rt5033.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RT5033 Power Management Integrated Circuit

maintainers:
- Jakob Hauser <[email protected]>

description:
RT5033 is a multifunction device which includes battery charger, fuel gauge,
flash LED current source, LDO and synchronous Buck converter for portable
applications. It is interfaced to host controller using I2C interface. The
battery fuel gauge uses a separate I2C bus.

properties:
compatible:
const: richtek,rt5033

reg:
maxItems: 1

interrupts:
maxItems: 1

regulators:
description:
The regulators of RT5033 have to be instantiated under a sub-node named
"regulators". For SAFE_LDO voltage there is only one value of 4.9 V. LDO
voltage ranges from 1.2 V to 3.0 V in 0.1 V steps. BUCK voltage ranges
from 1.0 V to 3.0 V in 0.1 V steps.
type: object
patternProperties:
"^(SAFE_LDO|LDO|BUCK)$":
type: object
$ref: /schemas/regulator/regulator.yaml#
unevaluatedProperties: false
additionalProperties: false

charger:
type: object
$ref: /schemas/power/supply/richtek,rt5033-charger.yaml#

required:
- compatible
- reg
- interrupts

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
battery: battery {
compatible = "simple-battery";
precharge-current-microamp = <450000>;
constant-charge-current-max-microamp = <1000000>;
charge-term-current-microamp = <150000>;
precharge-upper-limit-microvolt = <3500000>;
constant-charge-voltage-max-microvolt = <4350000>;
};
extcon {
usb_con: connector {
compatible = "usb-b-connector";
label = "micro-USB";
type = "micro";
};
};
i2c {
#address-cells = <1>;
#size-cells = <0>;
i2c@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
fuel-gauge@35 {
compatible = "richtek,rt5033-battery";
reg = <0x35>;
interrupt-parent = <&msmgpio>;
interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
pinctrl-names = "default";
pinctrl-0 = <&fg_alert_default>;
power-supplies = <&rt5033_charger>;
};
};
i2c@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
pmic@34 {
compatible = "richtek,rt5033";
reg = <0x34>;
interrupt-parent = <&msmgpio>;
interrupts = <62 IRQ_TYPE_EDGE_FALLING>;
pinctrl-names = "default";
pinctrl-0 = <&pmic_int_default>;
regulators {
safe_ldo_reg: SAFE_LDO {
regulator-name = "SAFE_LDO";
regulator-min-microvolt = <4900000>;
regulator-max-microvolt = <4900000>;
regulator-always-on;
};
ldo_reg: LDO {
regulator-name = "LDO";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};
buck_reg: BUCK {
regulator-name = "BUCK";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
};
};
rt5033_charger: charger {
compatible = "richtek,rt5033-charger";
monitored-battery = <&battery>;
richtek,usb-connector = <&usb_con>;
};
};
};
};
25 changes: 7 additions & 18 deletions Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,29 +153,18 @@ dependencies:
additionalProperties: false

allOf:
- if:
- not:
required:
- s5m8767,pmic-buck2-uses-gpio-dvs
then:
properties:
s5m8767,pmic-buck3-uses-gpio-dvs: false
s5m8767,pmic-buck4-uses-gpio-dvs: false

- if:
required:
- s5m8767,pmic-buck3-uses-gpio-dvs
then:
properties:
s5m8767,pmic-buck2-uses-gpio-dvs: false
s5m8767,pmic-buck4-uses-gpio-dvs: false

- if:
- not:
required:
- s5m8767,pmic-buck2-uses-gpio-dvs
- s5m8767,pmic-buck4-uses-gpio-dvs
- not:
required:
- s5m8767,pmic-buck3-uses-gpio-dvs
- s5m8767,pmic-buck4-uses-gpio-dvs
then:
properties:
s5m8767,pmic-buck2-uses-gpio-dvs: false
s5m8767,pmic-buck3-uses-gpio-dvs: false

examples:
- |
Expand Down
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/mfd/st,stpmic1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ properties:
additionalProperties: false

patternProperties:
"^(buck[1-4]|ldo[1-6]|boost|pwr_sw[1-2])-supply$":
"^(buck[1-4]|ldo[1-6]|vref_ddr|boost|pwr_sw[1-2])-supply$":
description: STPMIC1 voltage regulators supplies

"^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$":
Expand Down
Loading

0 comments on commit b8ec70a

Please sign in to comment.