Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcc3a5d2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'mfd-for-linus-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "Changes to existing drivers:
  - DT clean-ups in da9055-core, max14577, rn5t618, arizona, hi6421, stmpe, twl4030
  - Export symbols for use in modules in max14577
  - Plenty of static code analysis/Coccinelle fixes throughout the SS
  - Regmap clean-ups in arizona, wm5102, wm5110, da9052, tps65217, rk808
  - Remove unused/duplicate code in da9052, 88pm860x, ti_ssp, lpc_sch, arizona
  - Bug fixes in ti_am335x_tscadc, da9052, ti_am335x_tscadc, rtsx_pcr
  - IRQ fixups in arizona, stmpe, max14577
  - Regulator related changes in axp20x
  - Pass DMA coherency information from parent => child in MFD core
  - Rename DT document files for consistency
  - Add ACPI support to the MFD core
  - Add Andreas Werner to MAINTAINERS for MEN F21BMC

 New drivers/supported devices:
  - New driver for MEN 14F021P00 Board Management Controller
  - New driver for Ricoh RN5T618 PMIC
  - New driver for Rockchip RK808
  - New driver for HiSilicon Hi6421 PMIC
  - New driver for Qualcomm SPMI PMICs
  - Add support for Intel Braswell in lpc_ich
  - Add support for Intel 9 Series PCH in lpc_ich
  - Add support for Intel Quark ILB in lpc_sch"

[ Delayed to after the poweer/reset pull due to Kconfig problems with
  recursive Kconfig select/depends-on chains.   - Linus ]

* tag 'mfd-for-linus-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (79 commits)
  mfd: cros_ec: wait for completion of commands that return IN_PROGRESS
  i2c: i2c-cros-ec-tunnel: Set retries to 3
  mfd: cros_ec: move locking into cros_ec_cmd_xfer
  mfd: cros_ec: stop calling ->cmd_xfer() directly
  mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC
  MAINTAINERS: Adds Andreas Werner to maintainers list for MEN F21BMC
  mfd: arizona: Correct mask to allow setting micbias external cap
  mfd: Add ACPI support
  Revert "mfd: wm5102: Manually apply register patch"
  mfd: ti_am335x_tscadc: Update logic in CTRL register for 5-wire TS
  mfd: dt-bindings: atmel-gpbr: Rename doc file to conform to naming convention
  mfd: dt-bindings: qcom-pm8xxx: Rename doc file to conform to naming convention
  mfd: Inherit coherent_dma_mask from parent device
  mfd: Document DT bindings for Qualcomm SPMI PMICs
  mfd: Add support for Qualcomm SPMI PMICs
  mfd: dt-bindings: pm8xxx: Add new compatible string
  mfd: axp209x: Drop the parent supplies field
  mfd: twl4030-power: Use 'ti,system-power-controller' as alternative way to support system power off
  mfd: dt-bindings: twl4030-power: Use the standard property to mark power control
  mfd: syscon: Add Atmel GPBR DT bindings documention
  ...
parents 50fa8617 d86c21fd
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -312,3 +312,30 @@ a code like this:

There are also devm_* versions of these functions which release the
descriptors once the device is released.

MFD devices
~~~~~~~~~~~
The MFD devices register their children as platform devices. For the child
devices there needs to be an ACPI handle that they can use to reference
parts of the ACPI namespace that relate to them. In the Linux MFD subsystem
we provide two ways:

	o The children share the parent ACPI handle.
	o The MFD cell can specify the ACPI id of the device.

For the first case, the MFD drivers do not need to do anything. The
resulting child platform device will have its ACPI_COMPANION() set to point
to the parent device.

If the ACPI namespace has a device that we can match using an ACPI id,
the id should be set like:

	static struct mfd_cell my_subdevice_cell = {
		.name = "my_subdevice",
		/* set the resources relative to the parent */
		.acpi_pnpid = "XYZ0001",
	};

The ACPI id "XYZ0001" is then used to lookup an ACPI device directly under
the MFD device and if found, that ACPI companion device is bound to the
resulting child platform device.
+7 −0
Original line number Diff line number Diff line
@@ -42,6 +42,13 @@ Optional properties:
    the chip default will be used.  If present exactly five values must
    be specified.

  - wlf,inmode : A list of INn_MODE register values, where n is the number
    of input signals. Valid values are 0 (Differential), 1 (Single-ended) and
    2 (Digital Microphone). If absent, INn_MODE registers set to 0 by default.
    If present, values must be specified less than or equal to the number of
    input singals. If values less than the number of input signals, elements
    that has not been specifed are set to 0 by default.

  - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if
    they are being externally supplied. As covered in
    Documentation/devicetree/bindings/regulator/regulator.txt
+15 −0
Original line number Diff line number Diff line
* Device tree bindings for Atmel GPBR (General Purpose Backup Registers)

The GPBR are a set of battery-backed registers.

Required properties:
- compatible:		"atmel,at91sam9260-gpbr", "syscon"
- reg:			contains offset/length value of the GPBR memory
			region.

Example:

gpbr: gpbr@fffffd50 {
	compatible = "atmel,at91sam9260-gpbr", "syscon";
	reg = <0xfffffd50 0x10>;
};
+38 −0
Original line number Diff line number Diff line
* HI6421 Multi-Functional Device (MFD), by HiSilicon Ltd.

Required parent device properties:
- compatible	: contains "hisilicon,hi6421-pmic";
- reg		: register range space of hi6421;

Supported Hi6421 sub-devices include:

Device                     IRQ Names              Supply Names   Description
------                     ---------              ------------   -----------
regulators               :  None                 : None         : Regulators

Required child device properties:
None.

Example:
	hi6421 {
		compatible = "hisilicon,hi6421-pmic";
		reg = <0xfcc00000 0x0180>; /* 0x60 << 2 */

		regulators {
			// supply for MLC NAND/ eMMC
			hi6421_vout0_reg: hi6421_vout0 {
				regulator-name = "VOUT0";
				regulator-min-microvolt = <2850000>;
				regulator-max-microvolt = <2850000>;
			};

			// supply for 26M Oscillator
			hi6421_vout1_reg: hi6421_vout1 {
				regulator-name = "VOUT1";
				regulator-min-microvolt = <1700000>;
				regulator-max-microvolt = <2000000>;
				regulator-boot-on;
				regulator-always-on;
			};
		};
	};
+64 −0
Original line number Diff line number Diff line
          Qualcomm SPMI PMICs multi-function device bindings

The Qualcomm SPMI series presently includes PM8941, PM8841 and PMA8084
PMICs.  These PMICs use a QPNP scheme through SPMI interface.
QPNP is effectively a partitioning scheme for dividing the SPMI extended
register space up into logical pieces, and set of fixed register
locations/definitions within these regions, with some of these regions
specifically used for interrupt handling.

The QPNP PMICs are used with the Qualcomm Snapdragon series SoCs, and are
interfaced to the chip via the SPMI (System Power Management Interface) bus.
Support for multiple independent functions are implemented by splitting the
16-bit SPMI slave address space into 256 smaller fixed-size regions, 256 bytes
each. A function can consume one or more of these fixed-size register regions.

Required properties:
- compatible:      Should contain one of:
                     "qcom,pm8941"
                     "qcom,pm8841"
                     "qcom,pma8084"
                     or generalized "qcom,spmi-pmic".
- reg:             Specifies the SPMI USID slave address for this device.
                   For more information see:
                   Documentation/devicetree/bindings/spmi/spmi.txt

Required properties for peripheral child nodes:
- compatible:      Should contain "qcom,xxx", where "xxx" is a peripheral name.

Optional properties for peripheral child nodes:
- interrupts:      Interrupts are specified as a 4-tuple. For more information
                   see:
                   Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt
- interrupt-names: Corresponding interrupt name to the interrupts property

Each child node of SPMI slave id represents a function of the PMIC. In the
example below the rtc device node represents a peripheral of pm8941
SID = 0. The regulator device node represents a peripheral of pm8941 SID = 1.

Example:

	spmi {
		compatible = "qcom,spmi-pmic-arb";

		pm8941@0 {
			compatible = "qcom,pm8941", "qcom,spmi-pmic";
			reg = <0x0 SPMI_USID>;

			rtc {
				compatible = "qcom,rtc";
				interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
				interrupt-names = "alarm";
			};
		};

		pm8941@1 {
			compatible = "qcom,pm8941", "qcom,spmi-pmic";
			reg = <0x1 SPMI_USID>;

			regulator {
				compatible = "qcom,regulator";
				regulator-name = "8941_boost";
			};
		};
	};
Loading