summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-04-20 11:31:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-04-20 11:31:01 -0700
commit25c456dab5e7bf3ed39155ccbc8465928137c0be (patch)
tree9472328c8f26a5271e00e48359bc57499d984717
parent4b0b946019e7376752456380b67e54eea2f10a7c (diff)
parentcaa5a5d44d8ae4fd13b744857d66c9313b712d1f (diff)
Merge tag 'mfd-next-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull MFD updates from Lee Jones: "Core: - Add a resource-managed version of alloc_workqueue() (`devm_alloc_workqueue()`) - Preserve the Open Firmware (OF) node when an ACPI handle is present Apple SMC: - Wire up the Apple SMC power driver by adding a new MFD cell Atmel HLCDC: - Fetch the LVDS PLL clock as a fallback if the generic sys_clk is unavailable Broadcom BCM2835 PM: - Add support for the BCM2712 power management device - Introduce a hardware type identifier to distinguish SoC variants Congatec CGBC, KEMPLD, RSMU, Si476x: - Fix various kernel-doc warnings and correct struct member names DLN2: - Drop redundant USB device references and switch to managed resource allocations - Update bare 'unsigned' types to 'unsigned int' ENE KB3930: - Use the of_device_is_system_power_controller() wrapper EZX PCAP: - Avoid rescheduling after destroying the workqueue by switching to a device-managed workqueue - Drop redundant memory allocation error messages - Return directly instead of using empty goto statements Freescale i.MX25 TSADC: - Convert devicetree bindings from TXT to YAML format Freescale MC13xxx: - Fix a memory leak in subdevice platform data allocation by using devm_kmemdup() Intel LPC ICH: - Expose a software node for the GPIO controller cell to fix GPIO lookups Intel LPSS: - Add PCI IDs for the Intel Nova Lake-H platform Maxim MAX77620: - Convert devicetree bindings from TXT to YAML format - Document an optional I2C address for the MAX77663 RTC device Maxim MAX77705: - Make the max77705_pm_ops variable static to resolve a sparse warning MediaTek MT6397: - Correct the hardware CIDs for the MT6328, MT6331, and MT6332 PMICs to allow proper driver binding ROHM BD71828: - Enable system wakeup via the power button ROHM BD72720: - Add a new compatible string for the ROHM BD73900 PMIC SpacemiT P1: - Drop the deprecated "vin-supply" property from the devicetree bindings - Add individual regulator supply properties to match actual hardware topology STMicroelectronics STPMIC1: - Attempt system shutdown a second time to handle transient I2C communication failures Viperboard: - Drop redundant USB device references" * tag 'mfd-next-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (28 commits) mfd: core: Preserve OF node when ACPI handle is present mfd: ene-kb3930: Use of_device_is_system_power_controller() wrapper mfd: intel-lpss: Add Intel Nova Lake-H PCI IDs dt-bindings: mfd: max77620: Document optional RTC address for MAX77663 dt-bindings: mfd: max77620: Convert to DT schema mfd: ezx-pcap: Avoid rescheduling after destroying workqueue mfd: ezx-pcap: Return directly instead of empty gotos mfd: ezx-pcap: Drop memory allocation error message mfd: bcm2835-pm: Add BCM2712 PM device support mfd: bcm2835-pm: Introduce SoC-specific type identifier dt-bindings: mfd: bd72720: Add ROHM BD73900 mfd: si476x: Fix kernel-doc warnings mfd: rsmu: Remove a empty kernel-doc line mfd: kempld: Fix kernel-doc struct member names mfd: congatec: Fix kernel-doc struct member names dt-bindings: mfd: Convert fsl-imx25-tsadc.txt to yaml format mfd: viperboard: Drop redundant device reference mfd: dln2: Switch to managed resources and fix bare unsigned types mfd: macsmc: Wire up Apple SMC power driver mfd: mt6397: Properly fix CID of MT6328, MT6331 and MT6332 ...
-rw-r--r--Documentation/devicetree/bindings/gpio/trivial-gpio.yaml2
-rw-r--r--Documentation/devicetree/bindings/mfd/fsl,imx25-tsadc.yaml97
-rw-r--r--Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt47
-rw-r--r--Documentation/devicetree/bindings/mfd/max77620.txt162
-rw-r--r--Documentation/devicetree/bindings/mfd/maxim,max77620.yaml444
-rw-r--r--Documentation/devicetree/bindings/mfd/rohm,bd72720-pmic.yaml29
-rw-r--r--Documentation/devicetree/bindings/thermal/max77620_thermal.txt70
-rw-r--r--drivers/mfd/atmel-hlcdc.c13
-rw-r--r--drivers/mfd/bcm2835-pm.c9
-rw-r--r--drivers/mfd/dln2.c21
-rw-r--r--drivers/mfd/ene-kb3930.c2
-rw-r--r--drivers/mfd/ezx-pcap.c27
-rw-r--r--drivers/mfd/intel-lpss-pci.c13
-rw-r--r--drivers/mfd/lpc_ich.c7
-rw-r--r--drivers/mfd/macsmc.c1
-rw-r--r--drivers/mfd/max77705.c2
-rw-r--r--drivers/mfd/mc13xxx-core.c2
-rw-r--r--drivers/mfd/mfd-core.c12
-rw-r--r--drivers/mfd/mt6397-core.c4
-rw-r--r--drivers/mfd/rohm-bd71828.c1
-rw-r--r--drivers/mfd/stpmic1.c20
-rw-r--r--drivers/mfd/viperboard.c7
-rw-r--r--include/linux/mfd/atmel-hlcdc.h1
-rw-r--r--include/linux/mfd/bcm2835-pm.h7
-rw-r--r--include/linux/mfd/cgbc.h4
-rw-r--r--include/linux/mfd/kempld.h6
-rw-r--r--include/linux/mfd/lpc_ich.h2
-rw-r--r--include/linux/mfd/mt6397/core.h6
-rw-r--r--include/linux/mfd/rsmu.h1
-rw-r--r--include/linux/mfd/si476x-core.h17
30 files changed, 680 insertions, 356 deletions
diff --git a/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml b/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
index 3f4bbd57fc52..fe9b14a72d69 100644
--- a/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
@@ -27,7 +27,6 @@ properties:
- gateworks,pld-gpio
- ibm,ppc4xx-gpio
- loongson,ls1x-gpio
- - maxim,max77620
- nintendo,hollywood-gpio
- nxp,pca9570
- nxp,pca9571
@@ -86,7 +85,6 @@ allOf:
compatible:
contains:
enum:
- - maxim,max77620
- rockchip,rk3328-grf-gpio
- ti,lp3943-gpio
- ti,palmas-gpio
diff --git a/Documentation/devicetree/bindings/mfd/fsl,imx25-tsadc.yaml b/Documentation/devicetree/bindings/mfd/fsl,imx25-tsadc.yaml
new file mode 100644
index 000000000000..b5c6a2d47501
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/fsl,imx25-tsadc.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/fsl,imx25-tsadc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale MX25 ADC/TSC MultiFunction Device (MFD)
+
+maintainers:
+ - Frank Li <Frank.Li@nxp.com>
+
+description:
+ This device combines two general purpose conversion queues one used for general
+ ADC and the other used for touchscreens.
+
+properties:
+ compatible:
+ const: fsl,imx25-tsadc
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: ipg
+
+ interrupt-controller: true
+
+ '#interrupt-cells':
+ const: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 1
+
+ ranges: true
+
+patternProperties:
+ '^touchscreen@[0-9a-f]+$':
+ type: object
+ $ref: /schemas/input/touchscreen/fsl,imx25-tcq.yaml
+ unevaluatedProperties: false
+
+ '^adc@[0-9a-f]+$':
+ type: object
+ $ref: /schemas/iio/adc/fsl,imx25-gcq.yaml
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - '#interrupt-cells'
+ - '#address-cells'
+ - '#size-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ tscadc@50030000 {
+ compatible = "fsl,imx25-tsadc";
+ reg = <0x50030000 0xc>;
+ interrupts = <46>;
+ clocks = <&clks 119>;
+ clock-names = "ipg";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ touchscreen@50030400 {
+ compatible = "fsl,imx25-tcq";
+ reg = <0x50030400 0x60>;
+ interrupts = <0>;
+ fsl,wires = <4>;
+ };
+
+ adc@50030800 {
+ compatible = "fsl,imx25-gcq";
+ reg = <0x50030800 0x60>;
+ interrupts = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt b/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt
deleted file mode 100644
index b03505286997..000000000000
--- a/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-Freescale MX25 ADC/TSC MultiFunction Device (MFD)
-
-This device combines two general purpose conversion queues one used for general
-ADC and the other used for touchscreens.
-
-Required properties:
- - compatible: Should be "fsl,imx25-tsadc".
- - reg: Start address and size of the memory area of
- the device
- - interrupts: Interrupt for this device
- (See: ../interrupt-controller/interrupts.txt)
- - clocks: An 'ipg' clock (See: ../clock/clock-bindings.txt)
- - interrupt-controller: This device is an interrupt controller. It
- controls the interrupts of both
- conversion queues.
- - #interrupt-cells: Should be '<1>'.
- - #address-cells: Should be '<1>'.
- - #size-cells: Should be '<1>'.
-
-This device includes two conversion queues which can be added as subnodes.
-The first queue is for the touchscreen, the second for general purpose ADC.
-
-Example:
- tscadc: tscadc@50030000 {
- compatible = "fsl,imx25-tsadc";
- reg = <0x50030000 0xc>;
- interrupts = <46>;
- clocks = <&clks 119>;
- clock-names = "ipg";
- interrupt-controller;
- #interrupt-cells = <1>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
-
- tsc: tcq@50030400 {
- compatible = "fsl,imx25-tcq";
- reg = <0x50030400 0x60>;
- ...
- };
-
- adc: gcq@50030800 {
- compatible = "fsl,imx25-gcq";
- reg = <0x50030800 0x60>;
- ...
- };
- };
diff --git a/Documentation/devicetree/bindings/mfd/max77620.txt b/Documentation/devicetree/bindings/mfd/max77620.txt
deleted file mode 100644
index 5a642a51d58e..000000000000
--- a/Documentation/devicetree/bindings/mfd/max77620.txt
+++ /dev/null
@@ -1,162 +0,0 @@
-MAX77620 Power management IC from Maxim Semiconductor.
-
-Required properties:
--------------------
-- compatible: Must be one of
- "maxim,max77620"
- "maxim,max20024"
- "maxim,max77663"
-- reg: I2C device address.
-
-Optional properties:
--------------------
-- interrupts: The interrupt on the parent the controller is
- connected to.
-- interrupt-controller: Marks the device node as an interrupt controller.
-- #interrupt-cells: is <2> and their usage is compliant to the 2 cells
- variant of <../interrupt-controller/interrupts.txt>
- IRQ numbers for different interrupt source of MAX77620
- are defined at dt-bindings/mfd/max77620.h.
-
-- system-power-controller: Indicates that this PMIC is controlling the
- system power, see [1] for more details.
-
-[1] Documentation/devicetree/bindings/power/power-controller.txt
-
-Optional subnodes and their properties:
-=======================================
-
-Flexible power sequence configurations:
---------------------------------------
-The Flexible Power Sequencer (FPS) allows each regulator to power up under
-hardware or software control. Additionally, each regulator can power on
-independently or among a group of other regulators with an adjustable power-up
-and power-down delays (sequencing). GPIO1, GPIO2, and GPIO3 can be programmed
-to be part of a sequence allowing external regulators to be sequenced along
-with internal regulators. 32KHz clock can be programmed to be part of a
-sequence.
-
-The flexible sequencing structure consists of two hardware enable inputs
-(EN0, EN1), and 3 master sequencing timers called FPS0, FPS1 and FPS2.
-Each master sequencing timer is programmable through its configuration
-register to have a hardware enable source (EN1 or EN2) or a software enable
-source (SW). When enabled/disabled, the master sequencing timer generates
-eight sequencing events on different time periods called slots. The time
-period between each event is programmable within the configuration register.
-Each regulator, GPIO1, GPIO2, GPIO3, and 32KHz clock has a flexible power
-sequence slave register which allows its enable source to be specified as
-a flexible power sequencer timer or a software bit. When a FPS source of
-regulators, GPIOs and clocks specifies the enable source to be a flexible
-power sequencer, the power up and power down delays can be specified in
-the regulators, GPIOs and clocks flexible power sequencer configuration
-registers.
-
-When FPS event cleared (set to LOW), regulators, GPIOs and 32KHz
-clock are set into following state at the sequencing event that
-corresponds to its flexible sequencer configuration register.
- Sleep state: In this state, regulators, GPIOs
- and 32KHz clock get disabled at
- the sequencing event.
- Global Low Power Mode (GLPM): In this state, regulators are set in
- low power mode at the sequencing event.
-
-The configuration parameters of FPS is provided through sub-node "fps"
-and their child for FPS specific. The child node name for FPS are "fps0",
-"fps1", and "fps2" for FPS0, FPS1 and FPS2 respectively.
-
-The FPS configurations like FPS source, power up and power down slots for
-regulators, GPIOs and 32kHz clocks are provided in their respective
-configuration nodes which is explained in respective sub-system DT
-binding document.
-
-There is need for different FPS configuration parameters based on system
-state like when system state changed from active to suspend or active to
-power off (shutdown).
-
-Optional properties:
--------------------
--maxim,fps-event-source: u32, FPS event source like external
- hardware input to PMIC i.e. EN0, EN1 or
- software (SW).
- The macros are defined on
- dt-bindings/mfd/max77620.h
- for different control source.
- - MAX77620_FPS_EVENT_SRC_EN0
- for hardware input pin EN0.
- - MAX77620_FPS_EVENT_SRC_EN1
- for hardware input pin EN1.
- - MAX77620_FPS_EVENT_SRC_SW
- for software control.
-
--maxim,shutdown-fps-time-period-us: u32, FPS time period in microseconds
- when system enters in to shutdown
- state.
-
--maxim,suspend-fps-time-period-us: u32, FPS time period in microseconds
- when system enters in to suspend state.
-
--maxim,device-state-on-disabled-event: u32, describe the PMIC state when FPS
- event cleared (set to LOW) whether it
- should go to sleep state or low-power
- state. Following are valid values:
- - MAX77620_FPS_INACTIVE_STATE_SLEEP
- to set the PMIC state to sleep.
- - MAX77620_FPS_INACTIVE_STATE_LOW_POWER
- to set the PMIC state to low
- power.
- Absence of this property or other value
- will not change device state when FPS
- event get cleared.
-
-Here supported time periods by device in microseconds are as follows:
-MAX77620 supports 40, 80, 160, 320, 640, 1280, 2560 and 5120 microseconds.
-MAX20024 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.
-MAX77663 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.
-
--maxim,power-ok-control: configure map power ok bit
- 1: Enables POK(Power OK) to control nRST_IO and GPIO1
- POK function.
- 0: Disables POK control.
- if property missing, do not configure MPOK bit.
- If POK mapping is enabled for GPIO1/nRST_IO then,
- GPIO1/nRST_IO pins are HIGH only if all rails
- that have POK control enabled are HIGH.
- If any of the rails goes down(which are enabled for POK
- control) then, GPIO1/nRST_IO goes LOW.
- this property is valid for max20024 only.
-
-For DT binding details of different sub modules like GPIO, pincontrol,
-regulator, power, please refer respective device-tree binding document
-under their respective sub-system directories.
-
-Example:
---------
-#include <dt-bindings/mfd/max77620.h>
-
-max77620@3c {
- compatible = "maxim,max77620";
- reg = <0x3c>;
-
- interrupt-parent = <&intc>;
- interrupts = <0 86 IRQ_TYPE_NONE>;
-
- interrupt-controller;
- #interrupt-cells = <2>;
-
- fps {
- fps0 {
- maxim,shutdown-fps-time-period-us = <1280>;
- maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN1>;
- };
-
- fps1 {
- maxim,shutdown-fps-time-period-us = <1280>;
- maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
- };
-
- fps2 {
- maxim,shutdown-fps-time-period-us = <1280>;
- maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_SW>;
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/mfd/maxim,max77620.yaml b/Documentation/devicetree/bindings/mfd/maxim,max77620.yaml
new file mode 100644
index 000000000000..602711865274
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/maxim,max77620.yaml
@@ -0,0 +1,444 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/maxim,max77620.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MAX77620 Power management IC from Maxim Semiconductor
+
+maintainers:
+ - Svyatoslav Ryhel <clamor95@gmail.com>
+
+properties:
+ compatible:
+ enum:
+ - maxim,max20024
+ - maxim,max77620
+ - maxim,max77663
+
+ reg:
+ description:
+ Can contain an optional second I2C address pointing to the PMIC's
+ RTC device. If no RTC address is provided, a default address specific
+ to this PMIC will be used.
+ minItems: 1
+ maxItems: 2
+
+ reg-names:
+ items:
+ - const: pmic
+ - const: rtc
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ "#interrupt-cells":
+ const: 2
+
+ gpio-controller: true
+
+ "#gpio-cells":
+ const: 2
+ description:
+ Device has 8 GPIO pins which can be configured as GPIO as well as
+ the special IO functions. The first cell is the pin number, and the
+ second cell is used to specify the gpio polarity (GPIO_ACTIVE_HIGH or
+ GPIO_ACTIVE_LOW).
+
+ system-power-controller: true
+
+ "#thermal-sensor-cells":
+ const: 0
+ description:
+ Maxim Semiconductor MAX77620 supports alarm interrupts when its
+ die temperature crosses 120C and 140C. These threshold temperatures
+ are not configurable. Device does not provide the real temperature
+ of die other than just indicating whether temperature is above or
+ below threshold level.
+
+ fps:
+ type: object
+ additionalProperties: false
+ description: |
+ The Flexible Power Sequencer (FPS) allows each regulator to power up
+ under hardware or software control. Additionally, each regulator can
+ power on independently or among a group of other regulators with an
+ adjustable power-up and power-down delays (sequencing). GPIO1, GPIO2,
+ and GPIO3 can be programmed to be part of a sequence allowing external
+ regulators to be sequenced along with internal regulators. 32KHz clock
+ can be programmed to be part of a sequence.
+
+ The flexible sequencing structure consists of two hardware enable inputs
+ (EN0, EN1), and 3 master sequencing timers called FPS0, FPS1 and FPS2.
+ Each master sequencing timer is programmable through its configuration
+ register to have a hardware enable source (EN1 or EN2) or a software enable
+ source (SW). When enabled/disabled, the master sequencing timer generates
+ eight sequencing events on different time periods called slots. The time
+ period between each event is programmable within the configuration register.
+ Each regulator, GPIO1, GPIO2, GPIO3, and 32KHz clock has a flexible power
+ sequence slave register which allows its enable source to be specified as
+ a flexible power sequencer timer or a software bit. When a FPS source of
+ regulators, GPIOs and clocks specifies the enable source to be a flexible
+ power sequencer, the power up and power down delays can be specified in
+ the regulators, GPIOs and clocks flexible power sequencer configuration
+ registers.
+
+ When FPS event cleared (set to LOW), regulators, GPIOs and 32KHz clock
+ are set into following state at the sequencing event that corresponds
+ to its flexible sequencer configuration register.
+
+ Sleep state: In this state, regulators, GPIOs and 32KHz clock get disabled
+ at the sequencing event.
+ Global Low Power Mode (GLPM): In this state, regulators are set in low
+ power mode at the sequencing event.
+
+ The configuration parameters of FPS is provided through sub-node "fps"
+ and their child for FPS specific. The child node name for FPS are "fps0",
+ "fps1", and "fps2" for FPS0, FPS1 and FPS2 respectively.
+
+ The FPS configurations like FPS source, power up and power down slots for
+ regulators, GPIOs and 32kHz clocks are provided in their respective
+ configuration nodes which is explained in respective sub-system DT
+ binding document.
+
+ There is need for different FPS configuration parameters based on system
+ state like when system state changed from active to suspend or active to
+ power off (shutdown).
+
+ patternProperties:
+ "^fps[0-2]$":
+ type: object
+ additionalProperties: false
+
+ properties:
+ maxim,fps-event-source:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ FPS event source like external hardware input to PMIC i.e. EN0, EN1
+ or software (SW).
+
+ The macros are defined on dt-bindings/mfd/max77620.h for different
+ control source.
+ - MAX77620_FPS_EVENT_SRC_EN0 for hardware input pin EN0.
+ - MAX77620_FPS_EVENT_SRC_EN1 for hardware input pin EN1.
+ - MAX77620_FPS_EVENT_SRC_SW for software control.
+
+ maxim,shutdown-fps-time-period-us:
+ description:
+ FPS time period in microseconds when system enters in to shutdown state.
+
+ maxim,suspend-fps-time-period-us:
+ description:
+ FPS time period in microseconds when system enters in to suspend state.
+
+ maxim,device-state-on-disabled-event:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Describe the PMIC state when FPS event cleared (set to LOW) whether it
+ should go to sleep state or low-power state. Following are valid values:
+ - MAX77620_FPS_INACTIVE_STATE_SLEEP to set the PMIC state to sleep.
+ - MAX77620_FPS_INACTIVE_STATE_LOW_POWER to set the PMIC state to low
+ power.
+ Absence of this property or other value will not change device state
+ when FPS event get cleared.
+
+ maxim,power-ok-control:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Configure map power ok bit
+
+ 1: Enables POK(Power OK) to control nRST_IO and GPIO1 POK function.
+ 0: Disables POK control.
+
+ If property missing, do not configure MPOK bit. If POK mapping is
+ enabled for GPIO1/nRST_IO then, GPIO1/nRST_IO pins are HIGH only if
+ all rails that have POK control enabled are HIGH. If any of the rails
+ goes down (which are enabled for POK control) then, GPIO1/nRST_IO
+ goes LOW.
+ enum: [0, 1]
+
+ pinmux:
+ $ref: /schemas/pinctrl/maxim,max77620-pinctrl.yaml
+
+ regulators:
+ $ref: /schemas/regulator/maxim,max77620-regulator.yaml
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - maxim,max20024
+ - maxim,max77663
+ then:
+ properties:
+ "#thermal-sensor-cells": false
+ fps:
+ patternProperties:
+ "^fps[0-2]$":
+ properties:
+ maxim,shutdown-fps-time-period-us:
+ enum: [20, 40, 80, 160, 320, 640, 1280, 2540]
+ maxim,suspend-fps-time-period-us:
+ enum: [20, 40, 80, 160, 320, 640, 1280, 2540]
+ maxim,power-ok-control: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: maxim,max77620
+ then:
+ properties:
+ fps:
+ patternProperties:
+ "^fps[0-2]$":
+ properties:
+ maxim,shutdown-fps-time-period-us:
+ enum: [40, 80, 160, 320, 640, 1280, 2560, 5120]
+ maxim,suspend-fps-time-period-us:
+ enum: [40, 80, 160, 320, 640, 1280, 2560, 5120]
+
+ - if:
+ properties:
+ compatible:
+ not:
+ contains:
+ const: maxim,max77663
+ then:
+ properties:
+ reg-names: false
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/mfd/max77620.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@3c {
+ compatible = "maxim,max77620";
+ reg = <0x3c>;
+
+ interrupt-parent = <&gpio>;
+ interrupts = <86 IRQ_TYPE_LEVEL_HIGH>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ #thermal-sensor-cells = <0>;
+
+ system-power-controller;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&max77620_default>;
+
+ max77620_default: pinmux {
+ gpio0 {
+ pins = "gpio0";
+ function = "gpio";
+ };
+
+ gpio1 {
+ pins = "gpio1";
+ function = "fps-out";
+ maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
+ };
+
+ gpio2 {
+ pins = "gpio2";
+ function = "fps-out";
+ maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
+ };
+
+ gpio3 {
+ pins = "gpio3";
+ function = "gpio";
+ };
+
+ gpio4 {
+ pins = "gpio4";
+ function = "32k-out1";
+ };
+
+ gpio5-6 {
+ pins = "gpio5", "gpio6";
+ function = "gpio";
+ drive-push-pull = <1>;
+ };
+
+ gpio7 {
+ pins = "gpio7";
+ function = "gpio";
+ };
+ };
+
+ fps {
+ fps0 {
+ maxim,shutdown-fps-time-period-us = <1280>;
+ maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
+ };
+
+ fps1 {
+ maxim,shutdown-fps-time-period-us = <1280>;
+ maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN1>;
+ };
+
+ fps2 {
+ maxim,shutdown-fps-time-period-us = <1280>;
+ maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_SW>;
+ };
+ };
+
+ regulators {
+ in-sd0-supply = <&vdd_5v0_vbus>;
+ in-sd1-supply = <&vdd_5v0_vbus>;
+ in-sd2-supply = <&vdd_5v0_vbus>;
+ in-sd3-supply = <&vdd_5v0_vbus>;
+
+ in-ldo0-1-supply = <&vdd_1v8_vio>;
+ in-ldo2-supply = <&vdd_3v3_vbat>;
+ in-ldo3-5-supply = <&vdd_3v3_vbat>;
+ in-ldo4-6-supply = <&vdd_3v3_vbat>;
+ in-ldo7-8-supply = <&vdd_1v8_vio>;
+
+ sd0 {
+ regulator-name = "vdd_cpu";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-always-on;
+ regulator-boot-on;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ };
+
+ sd1 {
+ regulator-name = "vdd_core";
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-always-on;
+ regulator-boot-on;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
+ };
+
+ vdd_1v8_vio: sd2 {
+ regulator-name = "vdd_1v8_gen";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ };
+
+ sd3 {
+ regulator-name = "vddio_ddr";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ regulator-boot-on;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ };
+
+ ldo0 {
+ regulator-name = "avdd_pll";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ regulator-boot-on;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
+ };
+
+ ldo1 {
+ regulator-name = "vdd_ddr_hs";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-always-on;
+ regulator-boot-on;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ };
+
+ ldo2 {
+ regulator-name = "avdd_usb";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ };
+
+ ldo3 {
+ regulator-name = "vdd_sdmmc3";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-always-on;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ };
+
+ ldo4 {
+ regulator-name = "vdd_rtc";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ regulator-boot-on;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
+ };
+
+ ldo5 {
+ regulator-name = "vdd_ddr_rx";
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ regulator-always-on;
+ regulator-boot-on;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
+ };
+
+ ldo6 {
+ regulator-name = "avdd_osc";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ };
+
+ ldo7 {
+ regulator-name = "vdd_1v2_mhl";
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1250000>;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ };
+
+ ldo8 {
+ regulator-name = "avdd_dsi_csi";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ };
+ };
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd72720-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd72720-pmic.yaml
index 9f42097dfbac..b094542339e8 100644
--- a/Documentation/devicetree/bindings/mfd/rohm,bd72720-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/rohm,bd72720-pmic.yaml
@@ -4,19 +4,19 @@
$id: http://devicetree.org/schemas/mfd/rohm,bd72720-pmic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: ROHM BD72720 Power Management Integrated Circuit
+title: ROHM BD72720 and BD73900 Power Management Integrated Circuits
maintainers:
- Matti Vaittinen <mazziesaccount@gmail.com>
description:
- BD72720 is a single-chip power management IC for battery-powered portable
- devices. The BD72720 integrates 10 bucks and 11 LDOs, and a 3000 mA
- switching charger. The IC also includes a Coulomb counter, a real-time
- clock (RTC), GPIOs and a 32.768 kHz clock gate.
+ BD72720 and BD73900 are single-chip power management ICs for
+ battery-powered portable devices. They integrate 10 bucks and 11 LDOs,
+ and a 3000 mA switching charger. ICs also include a Coulomb counter,
+ a real-time clock (RTC), GPIOs and a 32.768 kHz clock gate.
-# In addition to the properties found from the charger node, the ROHM BD72720
-# uses properties from a static battery node. Please see the:
+# In addition to the properties found from the charger node, PMICs
+# use properties from a static battery node. Please see the:
# Documentation/devicetree/bindings/power/supply/battery.yaml
#
# Following properties are used
@@ -48,7 +48,12 @@ description:
properties:
compatible:
- const: rohm,bd72720
+ oneOf:
+ - const: rohm,bd72720
+
+ - items:
+ - const: rohm,bd73900
+ - const: rohm,bd72720
reg:
description:
@@ -84,7 +89,7 @@ properties:
minimum: 10000
maximum: 50000
description:
- BD72720 has a SAR ADC for measuring charging currents. External sense
+ PMIC has a SAR ADC for measuring charging currents. External sense
resistor (RSENSE in data sheet) should be used. If some other but
30 mOhm resistor is used the resistance value should be given here in
micro Ohms.
@@ -100,7 +105,7 @@ properties:
rohm,pin-fault_b:
$ref: /schemas/types.yaml#/definitions/string
description:
- BD72720 has an OTP option to use fault_b-pin for different
+ PMIC has an OTP option to use fault_b-pin for different
purposes. Set this property accordingly. OTP options are
OTP0 - bi-directional FAULT_B or READY indicator depending on a
'sub option'
@@ -116,7 +121,7 @@ patternProperties:
"^rohm,pin-dvs[0-1]$":
$ref: /schemas/types.yaml#/definitions/string
description:
- BD72720 has 4 different OTP options to determine the use of dvs<X>-pins.
+ PMIC has 4 different OTP options to determine the use of dvs<X>-pins.
OTP0 - regulator RUN state control.
OTP1 - GPI.
OTP2 - GPO.
@@ -130,7 +135,7 @@ patternProperties:
"^rohm,pin-exten[0-1]$":
$ref: /schemas/types.yaml#/definitions/string
- description: BD72720 has an OTP option to use exten0-pin for different
+ description: PMIC has an OTP option to use exten0-pin for different
purposes. Set this property accordingly.
OTP0 - GPO
OTP1 - Power sequencer output.
diff --git a/Documentation/devicetree/bindings/thermal/max77620_thermal.txt b/Documentation/devicetree/bindings/thermal/max77620_thermal.txt
deleted file mode 100644
index 82ed5d487966..000000000000
--- a/Documentation/devicetree/bindings/thermal/max77620_thermal.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-Thermal driver for MAX77620 Power management IC from Maxim Semiconductor.
-
-Maxim Semiconductor MAX77620 supports alarm interrupts when its
-die temperature crosses 120C and 140C. These threshold temperatures
-are not configurable. Device does not provide the real temperature
-of die other than just indicating whether temperature is above or
-below threshold level.
-
-Required properties:
--------------------
-#thermal-sensor-cells: For more details, please refer to
- <devicetree/bindings/thermal/thermal-sensor.yaml>
- The value must be 0.
-
-For more details, please refer generic thermal DT binding document
-<devicetree/bindings/thermal/thermal*.yaml>.
-
-Please refer <devicetree/bindings/mfd/max77620.txt> for mfd DT binding
-document for the MAX77620.
-
-Example:
---------
-#include <dt-bindings/mfd/max77620.h>
-#include <dt-bindings/thermal/thermal.h>
-...
-
-i2c@7000d000 {
- spmic: max77620@3c {
- compatible = "maxim,max77620";
- :::::
- #thermal-sensor-cells = <0>;
- :::
- };
-};
-
-cool_dev: cool-dev {
- compatible = "cooling-dev";
- #cooling-cells = <2>;
-};
-
-thermal-zones {
- PMIC-Die {
- polling-delay = <0>;
- polling-delay-passive = <0>;
- thermal-sensors = <&spmic>;
-
- trips {
- pmic_die_warn_temp_thresh: hot-die {
- temperature = <120000>;
- type = "hot";
- hysteresis = <0>;
- };
-
- pmic_die_cirt_temp_thresh: cirtical-die {
- temperature = <140000>;
- type = "critical";
- hysteresis = <0>;
- };
- };
-
- cooling-maps {
- map0 {
- trip = <&pmic_die_warn_temp_thresh>;
- cooling-device = <&cool_dev THERMAL_NO_LIMIT
- THERMAL_NO_LIMIT>;
- contribution = <100>;
- };
- };
- };
-};
diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c
index c3f3d39bf584..0b541c0d3b1b 100644
--- a/drivers/mfd/atmel-hlcdc.c
+++ b/drivers/mfd/atmel-hlcdc.c
@@ -108,10 +108,19 @@ static int atmel_hlcdc_probe(struct platform_device *pdev)
return PTR_ERR(hlcdc->periph_clk);
}
+ /*
+ * Retrieve one of the primary clocks required for LCD operation:
+ * prefer sys_clk (for RGB/MIPI), and fall back to lvds_pll_clk
+ * (for LVDS) if needed.
+ */
hlcdc->sys_clk = devm_clk_get(dev, "sys_clk");
if (IS_ERR(hlcdc->sys_clk)) {
- dev_err(dev, "failed to get system clock\n");
- return PTR_ERR(hlcdc->sys_clk);
+ hlcdc->sys_clk = NULL;
+ hlcdc->lvds_pll_clk = devm_clk_get(dev, "lvds_pll_clk");
+ if (IS_ERR(hlcdc->lvds_pll_clk)) {
+ dev_err(dev, "Failed to obtain both the LCDC (generic) and LVDS PLL clocks\n");
+ return PTR_ERR(hlcdc->lvds_pll_clk);
+ }
}
hlcdc->slow_clk = devm_clk_get(dev, "slow_clk");
diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c
index 8bed59816e82..9e8e3dcf4bce 100644
--- a/drivers/mfd/bcm2835-pm.c
+++ b/drivers/mfd/bcm2835-pm.c
@@ -81,6 +81,7 @@ static int bcm2835_pm_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, pm);
pm->dev = dev;
+ pm->soc = (uintptr_t)device_get_match_data(dev);
ret = bcm2835_pm_get_pdata(pdev, pm);
if (ret)
@@ -97,7 +98,7 @@ static int bcm2835_pm_probe(struct platform_device *pdev)
* bcm2835-pm binding as the key for whether we can reference
* the full PM register range and support power domains.
*/
- if (pm->asb)
+ if (pm->asb || pm->soc == BCM2835_PM_SOC_BCM2712)
return devm_mfd_add_devices(dev, -1, bcm2835_power_devs,
ARRAY_SIZE(bcm2835_power_devs),
NULL, 0, NULL);
@@ -106,9 +107,9 @@ static int bcm2835_pm_probe(struct platform_device *pdev)
static const struct of_device_id bcm2835_pm_of_match[] = {
{ .compatible = "brcm,bcm2835-pm-wdt", },
- { .compatible = "brcm,bcm2835-pm", },
- { .compatible = "brcm,bcm2711-pm", },
- { .compatible = "brcm,bcm2712-pm", },
+ { .compatible = "brcm,bcm2835-pm", .data = (void *)BCM2835_PM_SOC_BCM2835 },
+ { .compatible = "brcm,bcm2711-pm", .data = (void *)BCM2835_PM_SOC_BCM2711 },
+ { .compatible = "brcm,bcm2712-pm", .data = (void *)BCM2835_PM_SOC_BCM2712 },
{},
};
MODULE_DEVICE_TABLE(of, bcm2835_pm_of_match);
diff --git a/drivers/mfd/dln2.c b/drivers/mfd/dln2.c
index d12510e391c8..0b1e7fd7f5d7 100644
--- a/drivers/mfd/dln2.c
+++ b/drivers/mfd/dln2.c
@@ -424,8 +424,8 @@ static void free_rx_slot(struct dln2_dev *dln2, u16 handle, int slot)
}
static int _dln2_transfer(struct dln2_dev *dln2, u16 handle, u16 cmd,
- const void *obuf, unsigned obuf_len,
- void *ibuf, unsigned *ibuf_len)
+ const void *obuf, unsigned int obuf_len,
+ void *ibuf, unsigned int *ibuf_len)
{
int ret = 0;
int rx_slot;
@@ -511,8 +511,8 @@ out_decr:
}
int dln2_transfer(struct platform_device *pdev, u16 cmd,
- const void *obuf, unsigned obuf_len,
- void *ibuf, unsigned *ibuf_len)
+ const void *obuf, unsigned int obuf_len,
+ void *ibuf, unsigned int *ibuf_len)
{
struct dln2_platform_data *dln2_pdata;
struct dln2_dev *dln2;
@@ -583,10 +583,8 @@ static void dln2_free_rx_urbs(struct dln2_dev *dln2)
{
int i;
- for (i = 0; i < DLN2_MAX_URBS; i++) {
+ for (i = 0; i < DLN2_MAX_URBS; i++)
usb_free_urb(dln2->rx_urb[i]);
- kfree(dln2->rx_buf[i]);
- }
}
static void dln2_stop_rx_urbs(struct dln2_dev *dln2)
@@ -600,8 +598,6 @@ static void dln2_stop_rx_urbs(struct dln2_dev *dln2)
static void dln2_free(struct dln2_dev *dln2)
{
dln2_free_rx_urbs(dln2);
- usb_put_dev(dln2->usb_dev);
- kfree(dln2);
}
static int dln2_setup_rx_urbs(struct dln2_dev *dln2,
@@ -609,9 +605,10 @@ static int dln2_setup_rx_urbs(struct dln2_dev *dln2,
{
int i;
const int rx_max_size = DLN2_RX_BUF_SIZE;
+ struct device *dev = &dln2->interface->dev;
for (i = 0; i < DLN2_MAX_URBS; i++) {
- dln2->rx_buf[i] = kmalloc(rx_max_size, GFP_KERNEL);
+ dln2->rx_buf[i] = devm_kmalloc(dev, rx_max_size, GFP_KERNEL);
if (!dln2->rx_buf[i])
return -ENOMEM;
@@ -778,13 +775,13 @@ static int dln2_probe(struct usb_interface *interface,
if (ret)
return ret;
- dln2 = kzalloc_obj(*dln2);
+ dln2 = devm_kzalloc(dev, sizeof(*dln2), GFP_KERNEL);
if (!dln2)
return -ENOMEM;
dln2->ep_out = epout->bEndpointAddress;
dln2->ep_in = epin->bEndpointAddress;
- dln2->usb_dev = usb_get_dev(interface_to_usbdev(interface));
+ dln2->usb_dev = interface_to_usbdev(interface);
dln2->interface = interface;
usb_set_intfdata(interface, dln2);
init_waitqueue_head(&dln2->disconnect_wq);
diff --git a/drivers/mfd/ene-kb3930.c b/drivers/mfd/ene-kb3930.c
index 9460a67acb0b..086e0758d4cc 100644
--- a/drivers/mfd/ene-kb3930.c
+++ b/drivers/mfd/ene-kb3930.c
@@ -157,7 +157,7 @@ static int kb3930_probe(struct i2c_client *client)
if (ret)
return ret;
- if (of_property_read_bool(np, "system-power-controller")) {
+ if (of_device_is_system_power_controller(np)) {
ddata->off_gpios =
devm_gpiod_get_array_optional(dev, "off", GPIOD_IN);
if (IS_ERR(ddata->off_gpios))
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 24ca140d6a48..9a685ff8cd15 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -375,8 +375,6 @@ static void ezx_pcap_remove(struct spi_device *spi)
/* cleanup irqchip */
for (i = pcap->irq_base; i < (pcap->irq_base + PCAP_NIRQS); i++)
irq_set_chip_and_handler(i, NULL, NULL);
-
- destroy_workqueue(pcap->workqueue);
}
static int ezx_pcap_probe(struct spi_device *spi)
@@ -384,17 +382,15 @@ static int ezx_pcap_probe(struct spi_device *spi)
struct pcap_platform_data *pdata = dev_get_platdata(&spi->dev);
struct pcap_chip *pcap;
int i, adc_irq;
- int ret = -ENODEV;
+ int ret;
/* platform data is required */
if (!pdata)
- goto ret;
+ return -ENODEV;
pcap = devm_kzalloc(&spi->dev, sizeof(*pcap), GFP_KERNEL);
- if (!pcap) {
- ret = -ENOMEM;
- goto ret;
- }
+ if (!pcap)
+ return -ENOMEM;
spin_lock_init(&pcap->io_lock);
spin_lock_init(&pcap->adc_lock);
@@ -407,18 +403,15 @@ static int ezx_pcap_probe(struct spi_device *spi)
spi->mode = SPI_MODE_0 | (pdata->config & PCAP_CS_AH ? SPI_CS_HIGH : 0);
ret = spi_setup(spi);
if (ret)
- goto ret;
+ return ret;
pcap->spi = spi;
/* setup irq */
pcap->irq_base = pdata->irq_base;
- pcap->workqueue = create_singlethread_workqueue("pcapd");
- if (!pcap->workqueue) {
- ret = -ENOMEM;
- dev_err(&spi->dev, "can't create pcap thread\n");
- goto ret;
- }
+ pcap->workqueue = devm_alloc_ordered_workqueue(&spi->dev, "pcapd", 0);
+ if (!pcap->workqueue)
+ return -ENOMEM;
/* redirect interrupts to AP, except adcdone2 */
if (!(pdata->config & PCAP_SECOND_PORT))
@@ -468,9 +461,7 @@ remove_subdevs:
free_irqchip:
for (i = pcap->irq_base; i < (pcap->irq_base + PCAP_NIRQS); i++)
irq_set_chip_and_handler(i, NULL, NULL);
-/* destroy_workqueue: */
- destroy_workqueue(pcap->workqueue);
-ret:
+
return ret;
}
diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
index 713a5bfb1a3c..a9452ac92fb2 100644
--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -633,6 +633,19 @@ static const struct pci_device_id intel_lpss_pci_ids[] = {
{ PCI_VDEVICE(INTEL, 0xa879), (kernel_ulong_t)&ehl_i2c_info },
{ PCI_VDEVICE(INTEL, 0xa87a), (kernel_ulong_t)&ehl_i2c_info },
{ PCI_VDEVICE(INTEL, 0xa87b), (kernel_ulong_t)&ehl_i2c_info },
+ /* NVL-H */
+ { PCI_VDEVICE(INTEL, 0xd325), (kernel_ulong_t)&bxt_uart_info },
+ { PCI_VDEVICE(INTEL, 0xd326), (kernel_ulong_t)&bxt_uart_info },
+ { PCI_VDEVICE(INTEL, 0xd327), (kernel_ulong_t)&tgl_spi_info },
+ { PCI_VDEVICE(INTEL, 0xd330), (kernel_ulong_t)&tgl_spi_info },
+ { PCI_VDEVICE(INTEL, 0xd347), (kernel_ulong_t)&tgl_spi_info },
+ { PCI_VDEVICE(INTEL, 0xd350), (kernel_ulong_t)&ehl_i2c_info },
+ { PCI_VDEVICE(INTEL, 0xd351), (kernel_ulong_t)&ehl_i2c_info },
+ { PCI_VDEVICE(INTEL, 0xd352), (kernel_ulong_t)&bxt_uart_info },
+ { PCI_VDEVICE(INTEL, 0xd378), (kernel_ulong_t)&ehl_i2c_info },
+ { PCI_VDEVICE(INTEL, 0xd379), (kernel_ulong_t)&ehl_i2c_info },
+ { PCI_VDEVICE(INTEL, 0xd37a), (kernel_ulong_t)&ehl_i2c_info },
+ { PCI_VDEVICE(INTEL, 0xd37b), (kernel_ulong_t)&ehl_i2c_info },
/* PTL-H */
{ PCI_VDEVICE(INTEL, 0xe325), (kernel_ulong_t)&bxt_uart_info },
{ PCI_VDEVICE(INTEL, 0xe326), (kernel_ulong_t)&bxt_uart_info },
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index 4b7d0cb9340f..5a3d79f339dd 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -45,6 +45,7 @@
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/pinctrl/pinctrl.h>
+#include <linux/property.h>
#include <linux/mfd/core.h>
#include <linux/mfd/lpc_ich.h>
#include <linux/platform_data/itco_wdt.h>
@@ -125,11 +126,17 @@ static struct mfd_cell lpc_ich_wdt_cell = {
.ignore_resource_conflicts = true,
};
+const struct software_node lpc_ich_gpio_swnode = {
+ .name = "gpio_ich",
+};
+EXPORT_SYMBOL_NS(lpc_ich_gpio_swnode, "LPC_ICH");
+
static struct mfd_cell lpc_ich_gpio_cell = {
.name = "gpio_ich",
.num_resources = ARRAY_SIZE(gpio_ich_res),
.resources = gpio_ich_res,
.ignore_resource_conflicts = true,
+ .swnode = &lpc_ich_gpio_swnode,
};
#define INTEL_GPIO_RESOURCE_SIZE 0x1000
diff --git a/drivers/mfd/macsmc.c b/drivers/mfd/macsmc.c
index 1b7e7b3e785f..358feec2d088 100644
--- a/drivers/mfd/macsmc.c
+++ b/drivers/mfd/macsmc.c
@@ -46,6 +46,7 @@
static const struct mfd_cell apple_smc_devs[] = {
MFD_CELL_NAME("macsmc-input"),
+ MFD_CELL_NAME("macsmc-power"),
MFD_CELL_OF("macsmc-gpio", NULL, NULL, 0, 0, "apple,smc-gpio"),
MFD_CELL_OF("macsmc-hwmon", NULL, NULL, 0, 0, "apple,smc-hwmon"),
MFD_CELL_OF("macsmc-reboot", NULL, NULL, 0, 0, "apple,smc-reboot"),
diff --git a/drivers/mfd/max77705.c b/drivers/mfd/max77705.c
index e1a9bfd65856..e98c76d6b699 100644
--- a/drivers/mfd/max77705.c
+++ b/drivers/mfd/max77705.c
@@ -157,7 +157,7 @@ static int max77705_resume(struct device *dev)
return 0;
}
-DEFINE_SIMPLE_DEV_PM_OPS(max77705_pm_ops, max77705_suspend, max77705_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(max77705_pm_ops, max77705_suspend, max77705_resume);
static const struct of_device_id max77705_i2c_of_match[] = {
{ .compatible = "maxim,max77705" },
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index 920797b806ce..786eab3b2d03 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -377,7 +377,7 @@ static int mc13xxx_add_subdevice_pdata(struct mc13xxx *mc13xxx,
if (snprintf(buf, sizeof(buf), format, name) > sizeof(buf))
return -E2BIG;
- cell.name = kmemdup(buf, strlen(buf) + 1, GFP_KERNEL);
+ cell.name = devm_kmemdup(mc13xxx->dev, buf, strlen(buf) + 1, GFP_KERNEL);
if (!cell.name)
return -ENOMEM;
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 6be58eb5a746..7aa32b90cf1e 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -88,7 +88,17 @@ static void mfd_acpi_add_device(const struct mfd_cell *cell,
}
}
- device_set_node(&pdev->dev, acpi_fwnode_handle(adev ?: parent));
+ /*
+ * NOTE: The fwnode design doesn't allow proper stacking/sharing. This
+ * should eventually turn into a device fwnode API call that will allow
+ * prepending to a list of fwnodes (with ACPI taking precedence).
+ *
+ * set_primary_fwnode() is used here, instead of device_set_node(), as
+ * device_set_node() will overwrite the existing fwnode, which may be an
+ * OF node that was populated earlier. To support a use case where ACPI
+ * and OF is used in conjunction, we call set_primary_fwnode() instead.
+ */
+ set_primary_fwnode(&pdev->dev, acpi_fwnode_handle(adev ?: parent));
}
#else
static inline void mfd_acpi_add_device(const struct mfd_cell *cell,
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 3e58d0764c7e..1bdacda9a933 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -297,7 +297,7 @@ static const struct chip_data mt6323_core = {
static const struct chip_data mt6328_core = {
.cid_addr = MT6328_HWCID,
- .cid_shift = 0,
+ .cid_shift = 8,
.cells = mt6328_devs,
.cell_size = ARRAY_SIZE(mt6328_devs),
.irq_init = mt6397_irq_init,
@@ -313,7 +313,7 @@ static const struct chip_data mt6357_core = {
static const struct chip_data mt6331_mt6332_core = {
.cid_addr = MT6331_HWCID,
- .cid_shift = 0,
+ .cid_shift = 8,
.cells = mt6331_mt6332_devs,
.cell_size = ARRAY_SIZE(mt6331_mt6332_devs),
.irq_init = mt6397_irq_init,
diff --git a/drivers/mfd/rohm-bd71828.c b/drivers/mfd/rohm-bd71828.c
index e54152a03510..a79f354bf5cb 100644
--- a/drivers/mfd/rohm-bd71828.c
+++ b/drivers/mfd/rohm-bd71828.c
@@ -41,6 +41,7 @@ static struct gpio_keys_button button = {
.code = KEY_POWER,
.gpio = -1,
.type = EV_KEY,
+ .wakeup = 1,
};
static const struct gpio_keys_platform_data bd71828_powerkey_data = {
diff --git a/drivers/mfd/stpmic1.c b/drivers/mfd/stpmic1.c
index 081827bc0596..7c677b0344c6 100644
--- a/drivers/mfd/stpmic1.c
+++ b/drivers/mfd/stpmic1.c
@@ -16,6 +16,8 @@
#include <dt-bindings/mfd/st,stpmic1.h>
+#define STPMIC1_MAX_RETRIES 2
+
#define STPMIC1_MAIN_IRQ 0
static const struct regmap_range stpmic1_readable_ranges[] = {
@@ -121,9 +123,23 @@ static const struct regmap_irq_chip stpmic1_regmap_irq_chip = {
static int stpmic1_power_off(struct sys_off_data *data)
{
struct stpmic1 *ddata = data->cb_data;
+ int ret;
+
+ /*
+ * Attempt to shut down again, in case the first attempt failed.
+ * The STPMIC1 might get confused and the first regmap_update_bits()
+ * returns with -ETIMEDOUT / -110 . If that or similar transient
+ * failure occurs, try to shut down again. If the second attempt
+ * fails, there is some bigger problem, report it to user.
+ */
+ for (int retries = 0; retries < STPMIC1_MAX_RETRIES; retries++) {
+ ret = regmap_update_bits(ddata->regmap, MAIN_CR, SOFTWARE_SWITCH_OFF,
+ SOFTWARE_SWITCH_OFF);
+ if (!ret)
+ return NOTIFY_DONE;
+ }
- regmap_update_bits(ddata->regmap, MAIN_CR,
- SOFTWARE_SWITCH_OFF, SOFTWARE_SWITCH_OFF);
+ dev_err(ddata->dev, "Failed to access PMIC I2C bus (%d)\n", ret);
return NOTIFY_DONE;
}
diff --git a/drivers/mfd/viperboard.c b/drivers/mfd/viperboard.c
index f964bcfa0796..888737b8e7be 100644
--- a/drivers/mfd/viperboard.c
+++ b/drivers/mfd/viperboard.c
@@ -59,7 +59,7 @@ static int vprbrd_probe(struct usb_interface *interface,
mutex_init(&vb->lock);
- vb->usb_dev = usb_get_dev(interface_to_usbdev(interface));
+ vb->usb_dev = interface_to_usbdev(interface);
/* save our data pointer in this interface device */
usb_set_intfdata(interface, vb);
@@ -96,10 +96,8 @@ static int vprbrd_probe(struct usb_interface *interface,
return 0;
error:
- if (vb) {
- usb_put_dev(vb->usb_dev);
+ if (vb)
kfree(vb);
- }
return ret;
}
@@ -110,7 +108,6 @@ static void vprbrd_disconnect(struct usb_interface *interface)
mfd_remove_devices(&interface->dev);
usb_set_intfdata(interface, NULL);
- usb_put_dev(vb->usb_dev);
kfree(vb);
dev_dbg(&interface->dev, "disconnected\n");
diff --git a/include/linux/mfd/atmel-hlcdc.h b/include/linux/mfd/atmel-hlcdc.h
index 80d675a03b39..07c2081867fd 100644
--- a/include/linux/mfd/atmel-hlcdc.h
+++ b/include/linux/mfd/atmel-hlcdc.h
@@ -75,6 +75,7 @@
*/
struct atmel_hlcdc {
struct regmap *regmap;
+ struct clk *lvds_pll_clk;
struct clk *periph_clk;
struct clk *sys_clk;
struct clk *slow_clk;
diff --git a/include/linux/mfd/bcm2835-pm.h b/include/linux/mfd/bcm2835-pm.h
index f70a810c55f7..d2e17ab1dbfc 100644
--- a/include/linux/mfd/bcm2835-pm.h
+++ b/include/linux/mfd/bcm2835-pm.h
@@ -5,11 +5,18 @@
#include <linux/regmap.h>
+enum bcm2835_soc {
+ BCM2835_PM_SOC_BCM2835,
+ BCM2835_PM_SOC_BCM2711,
+ BCM2835_PM_SOC_BCM2712,
+};
+
struct bcm2835_pm {
struct device *dev;
void __iomem *base;
void __iomem *asb;
void __iomem *rpivid_asb;
+ enum bcm2835_soc soc;
};
#endif /* BCM2835_MFD_PM_H */
diff --git a/include/linux/mfd/cgbc.h b/include/linux/mfd/cgbc.h
index badbec4c7033..91f501e76c8f 100644
--- a/include/linux/mfd/cgbc.h
+++ b/include/linux/mfd/cgbc.h
@@ -26,8 +26,8 @@ struct cgbc_version {
* @io_cmd: Pointer to the command IO memory
* @session: Session id returned by the Board Controller
* @dev: Pointer to kernel device structure
- * @cgbc_version: Board Controller version structure
- * @mutex: Board Controller mutex
+ * @version: Board Controller version structure
+ * @lock: Board Controller mutex
*/
struct cgbc_device_data {
void __iomem *io_session;
diff --git a/include/linux/mfd/kempld.h b/include/linux/mfd/kempld.h
index 2dbd80abfd1d..5d75071eaaea 100644
--- a/include/linux/mfd/kempld.h
+++ b/include/linux/mfd/kempld.h
@@ -98,10 +98,10 @@ struct kempld_device_data {
/**
* struct kempld_platform_data - PLD hardware configuration structure
* @pld_clock: PLD clock frequency
- * @gpio_base GPIO base pin number
+ * @gpio_base: GPIO base pin number
* @ioresource: IO addresses of the PLD
- * @get_mutex: PLD specific get_mutex callback
- * @release_mutex: PLD specific release_mutex callback
+ * @get_hardware_mutex: PLD specific get_mutex callback
+ * @release_hardware_mutex: PLD specific release_mutex callback
* @get_info: PLD specific get_info callback
* @register_cells: PLD specific register_cells callback
*/
diff --git a/include/linux/mfd/lpc_ich.h b/include/linux/mfd/lpc_ich.h
index 1fbda1f8967d..1819aa743c5c 100644
--- a/include/linux/mfd/lpc_ich.h
+++ b/include/linux/mfd/lpc_ich.h
@@ -37,4 +37,6 @@ struct lpc_ich_info {
u8 use_gpio;
};
+extern const struct software_node lpc_ich_gpio_swnode;
+
#endif
diff --git a/include/linux/mfd/mt6397/core.h b/include/linux/mfd/mt6397/core.h
index b774c3a4bb62..340fc72e22aa 100644
--- a/include/linux/mfd/mt6397/core.h
+++ b/include/linux/mfd/mt6397/core.h
@@ -12,9 +12,9 @@
enum chip_id {
MT6323_CHIP_ID = 0x23,
- MT6328_CHIP_ID = 0x30,
- MT6331_CHIP_ID = 0x20,
- MT6332_CHIP_ID = 0x20,
+ MT6328_CHIP_ID = 0x28,
+ MT6331_CHIP_ID = 0x31,
+ MT6332_CHIP_ID = 0x32,
MT6357_CHIP_ID = 0x57,
MT6358_CHIP_ID = 0x58,
MT6359_CHIP_ID = 0x59,
diff --git a/include/linux/mfd/rsmu.h b/include/linux/mfd/rsmu.h
index 0379aa207428..2f27386a7122 100644
--- a/include/linux/mfd/rsmu.h
+++ b/include/linux/mfd/rsmu.h
@@ -19,7 +19,6 @@ enum rsmu_type {
};
/**
- *
* struct rsmu_ddata - device data structure for sub devices.
*
* @dev: i2c/spi device.
diff --git a/include/linux/mfd/si476x-core.h b/include/linux/mfd/si476x-core.h
index dd95c37ca134..e913b2cdf77d 100644
--- a/include/linux/mfd/si476x-core.h
+++ b/include/linux/mfd/si476x-core.h
@@ -77,6 +77,7 @@ enum si476x_power_state {
* underlying "core" device which all the MFD cell-devices use.
*
* @client: Actual I2C client used to transfer commands to the chip.
+ * @regmap: Regmap for accessing the device registers
* @chip_id: Last digit of the chip model(E.g. "1" for SI4761)
* @cells: MFD cell devices created by this driver.
* @cmd_lock: Mutex used to serialize all the requests to the core
@@ -100,16 +101,18 @@ enum si476x_power_state {
* @stc: Similar to @cts, but for the STC bit of the status value.
* @power_up_parameters: Parameters used as argument for POWER_UP
* command when the device is started.
- * @state: Current power state of the device.
- * @supplues: Structure containing handles to all power supplies used
+ * @power_state: Current power state of the device.
+ * @supplies: Structure containing handles to all power supplies used
* by the device (NULL ones are ignored).
* @gpio_reset: GPIO pin connectet to the RSTB pin of the chip.
* @pinmux: Chip's configurable pins configuration.
* @diversity_mode: Chips role when functioning in diversity mode.
+ * @is_alive: Chip is initialized and active.
* @status_monitor: Polling worker used in polling use case scenarion
* (when IRQ is not avalible).
* @revision: Chip's running firmware revision number(Used for correct
* command set support).
+ * @rds_fifo_depth: RDS FIFO size: 20 for IRQ mode or 5 for polling mode.
*/
struct si476x_core {
@@ -166,6 +169,7 @@ static inline struct si476x_core *i2c_mfd_cell_to_core(struct device *dev)
/**
* si476x_core_lock() - lock the core device to get an exclusive access
* to it.
+ * @core: Core device structure
*/
static inline void si476x_core_lock(struct si476x_core *core)
{
@@ -175,6 +179,7 @@ static inline void si476x_core_lock(struct si476x_core *core)
/**
* si476x_core_unlock() - unlock the core device to relinquish an
* exclusive access to it.
+ * @core: Core device structure
*/
static inline void si476x_core_unlock(struct si476x_core *core)
{
@@ -246,9 +251,10 @@ static inline int si476x_to_v4l2(struct si476x_core *core, u16 freq)
* struct si476x_func_info - structure containing result of the
* FUNC_INFO command.
*
+ * @firmware: Firmware version numbers.
* @firmware.major: Firmware major number.
* @firmware.minor[...]: Firmware minor numbers.
- * @patch_id:
+ * @patch_id: Firmware patch level.
* @func: Mode tuner is working in.
*/
struct si476x_func_info {
@@ -318,8 +324,9 @@ enum si476x_smoothmetrics {
* @tp: Current channel's TP flag.
* @pty: Current channel's PTY code.
* @pi: Current channel's PI code.
- * @rdsfifoused: Number of blocks remaining in the RDS FIFO (0 if
- * empty).
+ * @rdsfifoused: Number of blocks remaining in the RDS FIFO (0 if empty).
+ * @ble:
+ * @rds: RDS data descriptor
*/
struct si476x_rds_status_report {
bool rdstpptyint, rdspiint, rdssyncint, rdsfifoint;