Skip to content

Commit 6972b00

Browse files
committed
Merge (most of) tag 'mfd-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull MFD updates from Lee Jones: "New Drivers: - Intel Cherry Trail Whiskey Cove PMIC - TI LP87565 PMIC New Device Support: - Add support for Cannonlake to intel-lpss-pci - Add support for Simatic IOT2000 to intel_quark_i2c_gpio New Functionality: - Add Regulator support (axp20x) Fix-ups: - Rework IRQ handling (intel_soc_pmic_bxtwc, rtsx_pcr, cros_ec) - Remove unused/unwelcome code (ipaq-micro, wm831x-core, da9062-core) - Provide deregistration on unbind (rn5t618) - Rework DT code/documentation (arizona) - Constify things (fsl-imx25-tsadc) - MAINTAINERS updates (DA9062/61) - Kconfig configuration adaptions (INTEL_SOC_PMIC, MFD_AXP20X_I2C) - Switch to DMI matching (intel_quark_i2c_gpio) - Provide an appropriate level of error checking (wm831x-{i2c,spi}, twl4030-irq, tc6393xb) - Make use of devm_* (resource handling) calls (intel_soc_pmic_bxtwc, stm32-timers, atmel-flexcom, cros_ec, fsl-imx25-tsadc, exynos-lpass, palmas, qcom-spmi-pmic, smsc-ece1099, motorola-cpcap)" [ Skipped the last commit in that series that added eight thousand lines of pointless repeated register definitions. - Linus ] * tag 'mfd-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (38 commits) mfd: Add LP87565 PMIC support mfd: cros_ec: Free IRQ on exit dt-bindings: vendor-prefixes: Add arctic to vendor prefix mfd: da9061: Fix to remove BBAT_CONT register from chip model mfd: da9061: Fix to remove BBAT_CONT register from chip model mfd: axp20x-i2c: Document that this must be builtin on x86 mfd: Add Cherry Trail Whiskey Cove PMIC driver mfd: tc6393xb: Handle return value of clk_prepare_enable mfd: intel_quark_i2c_gpio: Add support for SIMATIC IOT2000 platform mfd: intel_quark_i2c_gpio: Use dmi_system_id table for retrieving frequency mfd: motorola-cpcap: Use devm_of_platform_populate() mfd: smsc-ece: Use devm_of_platform_populate() mfd: qcom-spmi-pmic: Use devm_of_platform_populate() mfd: palmas: Use devm_of_platform_populate() mfd: exynos: Use devm_of_platform_populate() mfd: fsl-imx25: Use devm_of_platform_populate() mfd: cros_ec: Use devm_of_platform_populate() mfd: atmel: Use devm_of_platform_populate() mfd: stm32-timers: Use devm_of_platform_populate() mfd: intel_soc_pmic: Select designware i2c-bus driver ...
2 parents c7d28ec + 1e34960 commit 6972b00

37 files changed

Lines changed: 985 additions & 183 deletions

‎Documentation/devicetree/bindings/mfd/arizona.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Required properties:
3030

3131
- gpio-controller : Indicates this device is a GPIO controller.
3232
- #gpio-cells : Must be 2. The first cell is the pin number and the
33-
second cell is used to specify optional parameters (currently unused).
33+
second cell is used to specify optional parameters, see ../gpio/gpio.txt
34+
for details.
3435

3536
- AVDD-supply, DBVDD1-supply, CPVDD-supply : Power supplies for the device,
3637
as covered in Documentation/devicetree/bindings/regulator/regulator.txt
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
TI LP87565 PMIC MFD driver
2+
3+
Required properties:
4+
- compatible: "ti,lp87565", "ti,lp87565-q1"
5+
- reg: I2C slave address.
6+
- gpio-controller: Marks the device node as a GPIO Controller.
7+
- #gpio-cells: Should be two. The first cell is the pin number and
8+
the second cell is used to specify flags.
9+
See ../gpio/gpio.txt for more information.
10+
- xxx-in-supply: Phandle to parent supply node of each regulator
11+
populated under regulators node. xxx should match
12+
the supply_name populated in driver.
13+
Example:
14+
15+
lp87565_pmic: pmic@60 {
16+
compatible = "ti,lp87565-q1";
17+
reg = <0x60>;
18+
gpio-controller;
19+
#gpio-cells = <2>;
20+
21+
buck10-in-supply = <&vsys_3v3>;
22+
buck23-in-supply = <&vsys_3v3>;
23+
24+
regulators: regulators {
25+
buck10_reg: buck10 {
26+
/* VDD_MPU */
27+
regulator-name = "buck10";
28+
regulator-min-microvolt = <850000>;
29+
regulator-max-microvolt = <1250000>;
30+
regulator-always-on;
31+
regulator-boot-on;
32+
};
33+
34+
buck23_reg: buck23 {
35+
/* VDD_GPU */
36+
regulator-name = "buck23";
37+
regulator-min-microvolt = <850000>;
38+
regulator-max-microvolt = <1250000>;
39+
regulator-boot-on;
40+
regulator-always-on;
41+
};
42+
};
43+
};

‎Documentation/devicetree/bindings/vendor-prefixes.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ andestech Andes Technology Corporation
2929
apm Applied Micro Circuits Corporation (APM)
3030
aptina Aptina Imaging
3131
arasan Arasan Chip Systems
32+
arctic Arctic Sand
3233
aries Aries Embedded GmbH
3334
arm ARM Ltd.
3435
armadeus ARMadeus Systems SARL

‎MAINTAINERS‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4048,7 +4048,10 @@ W: http://www.dialog-semiconductor.com/products
40484048
S: Supported
40494049
F: Documentation/hwmon/da90??
40504050
F: Documentation/devicetree/bindings/mfd/da90*.txt
4051+
F: Documentation/devicetree/bindings/input/da90??-onkey.txt
4052+
F: Documentation/devicetree/bindings/thermal/da90??-thermal.txt
40514053
F: Documentation/devicetree/bindings/regulator/da92*.txt
4054+
F: Documentation/devicetree/bindings/watchdog/da92??-wdt.txt
40524055
F: Documentation/devicetree/bindings/sound/da[79]*.txt
40534056
F: drivers/gpio/gpio-da90??.c
40544057
F: drivers/hwmon/da90??-hwmon.c
@@ -4063,6 +4066,7 @@ F: drivers/power/supply/da9052-battery.c
40634066
F: drivers/power/supply/da91??-*.c
40644067
F: drivers/regulator/da903x.c
40654068
F: drivers/regulator/da9???-regulator.[ch]
4069+
F: drivers/thermal/da90??-thermal.c
40664070
F: drivers/rtc/rtc-da90??.c
40674071
F: drivers/video/backlight/da90??_bl.c
40684072
F: drivers/watchdog/da90??_wdt.c

‎drivers/gpio/gpio-wcove.c‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ static int wcove_gpio_probe(struct platform_device *pdev)
428428
if (!wg)
429429
return -ENOMEM;
430430

431-
wg->regmap_irq_chip = pmic->irq_chip_data_level2;
431+
wg->regmap_irq_chip = pmic->irq_chip_data;
432432

433433
platform_set_drvdata(pdev, wg);
434434

@@ -476,6 +476,18 @@ static int wcove_gpio_probe(struct platform_device *pdev)
476476

477477
gpiochip_set_nested_irqchip(&wg->chip, &wcove_irqchip, virq);
478478

479+
/* Enable GPIO0 interrupts */
480+
ret = regmap_update_bits(wg->regmap, IRQ_MASK_BASE, GPIO_IRQ0_MASK,
481+
0x00);
482+
if (ret)
483+
return ret;
484+
485+
/* Enable GPIO1 interrupts */
486+
ret = regmap_update_bits(wg->regmap, IRQ_MASK_BASE + 1, GPIO_IRQ1_MASK,
487+
0x00);
488+
if (ret)
489+
return ret;
490+
479491
return 0;
480492
}
481493

‎drivers/mfd/Kconfig‎

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ config MFD_AXP20X_I2C
160160
components like regulators or the PEK (Power Enable Key) under the
161161
corresponding menus.
162162

163+
Note on x86 this provides an ACPI OpRegion, so this must be 'y'
164+
(builtin) and not a module, as the OpRegion must be available as
165+
soon as possible. For the same reason the I2C bus driver options
166+
I2C_DESIGNWARE_PLATFORM and I2C_DESIGNWARE_BAYTRAIL must be 'y' too.
167+
163168
config MFD_AXP20X_RSB
164169
tristate "X-Powers AXP series PMICs with RSB"
165170
select MFD_AXP20X
@@ -448,17 +453,22 @@ config LPC_SCH
448453

449454
config INTEL_SOC_PMIC
450455
bool "Support for Crystal Cove PMIC"
451-
depends on GPIOLIB
452-
depends on I2C=y
456+
depends on HAS_IOMEM && I2C=y && GPIOLIB && COMMON_CLK
457+
depends on X86 || COMPILE_TEST
453458
select MFD_CORE
454459
select REGMAP_I2C
455460
select REGMAP_IRQ
461+
select I2C_DESIGNWARE_PLATFORM if ACPI
456462
help
457463
Select this option to enable support for Crystal Cove PMIC
458464
on some Intel SoC systems. The PMIC provides ADC, GPIO,
459465
thermal, charger and related power management functions
460466
on these systems.
461467

468+
This option is a bool as it provides an ACPI OpRegion which must be
469+
available before any devices using it are probed. This option also
470+
causes the designware-i2c driver to be builtin for the same reason.
471+
462472
config INTEL_SOC_PMIC_BXTWC
463473
tristate "Support for Intel Broxton Whiskey Cove PMIC"
464474
depends on INTEL_PMC_IPC
@@ -470,6 +480,22 @@ config INTEL_SOC_PMIC_BXTWC
470480
thermal, charger and related power management functions
471481
on these systems.
472482

483+
config INTEL_SOC_PMIC_CHTWC
484+
tristate "Support for Intel Cherry Trail Whiskey Cove PMIC"
485+
depends on ACPI && HAS_IOMEM && I2C=y && COMMON_CLK
486+
depends on X86 || COMPILE_TEST
487+
select MFD_CORE
488+
select REGMAP_I2C
489+
select REGMAP_IRQ
490+
select I2C_DESIGNWARE_PLATFORM
491+
help
492+
Select this option to enable support for the Intel Cherry Trail
493+
Whiskey Cove PMIC found on some Intel Cherry Trail systems.
494+
495+
This option is a bool as it provides an ACPI OpRegion which must be
496+
available before any devices using it are probed. This option also
497+
causes the designware-i2c driver to be builtin for the same reason.
498+
473499
config MFD_INTEL_LPSS
474500
tristate
475501
select COMMON_CLK
@@ -1325,6 +1351,20 @@ config MFD_TI_LP873X
13251351
This driver can also be built as a module. If so, the module
13261352
will be called lp873x.
13271353

1354+
config MFD_TI_LP87565
1355+
tristate "TI LP87565 Power Management IC"
1356+
depends on I2C && OF
1357+
select MFD_CORE
1358+
select REGMAP_I2C
1359+
help
1360+
If you say yes here then you get support for the LP87565 series of
1361+
Power Management Integrated Circuits (PMIC).
1362+
These include voltage regulators, thermal protection, configurable
1363+
General Purpose Outputs (GPO) that are used in portable devices.
1364+
1365+
This driver can also be built as a module. If so, the module
1366+
will be called lp87565.
1367+
13281368
config MFD_TPS65218
13291369
tristate "TI TPS65218 Power Management chips"
13301370
depends on I2C

‎drivers/mfd/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ obj-$(CONFIG_HTC_PASIC3) += htc-pasic3.o
2525
obj-$(CONFIG_HTC_I2CPLD) += htc-i2cpld.o
2626

2727
obj-$(CONFIG_MFD_TI_LP873X) += lp873x.o
28+
obj-$(CONFIG_MFD_TI_LP87565) += lp87565.o
2829

2930
obj-$(CONFIG_MFD_DAVINCI_VOICECODEC) += davinci_voicecodec.o
3031
obj-$(CONFIG_MFD_DM355EVM_MSP) += dm355evm_msp.o
@@ -214,6 +215,7 @@ obj-$(CONFIG_MFD_SKY81452) += sky81452.o
214215
intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o
215216
obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o
216217
obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC) += intel_soc_pmic_bxtwc.o
218+
obj-$(CONFIG_INTEL_SOC_PMIC_CHTWC) += intel_soc_pmic_chtwc.o
217219
obj-$(CONFIG_MFD_MT6397) += mt6397-core.o
218220

219221
obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o

‎drivers/mfd/atmel-flexcom.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static int atmel_flexcom_probe(struct platform_device *pdev)
8080

8181
clk_disable_unprepare(clk);
8282

83-
return of_platform_populate(np, NULL, NULL, &pdev->dev);
83+
return devm_of_platform_populate(&pdev->dev);
8484
}
8585

8686
static const struct of_device_id atmel_flexcom_of_match[] = {

‎drivers/mfd/axp20x.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,8 @@ static struct mfd_cell axp803_cells[] = {
848848
.name = "axp20x-pek",
849849
.num_resources = ARRAY_SIZE(axp803_pek_resources),
850850
.resources = axp803_pek_resources,
851-
}
851+
},
852+
{ .name = "axp20x-regulator" },
852853
};
853854

854855
static struct mfd_cell axp806_cells[] = {

‎drivers/mfd/cros_ec.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
147147
}
148148

149149
if (IS_ENABLED(CONFIG_OF) && dev->of_node) {
150-
err = of_platform_populate(dev->of_node, NULL, NULL, dev);
150+
err = devm_of_platform_populate(dev);
151151
if (err) {
152152
mfd_remove_devices(dev);
153153
dev_err(dev, "Failed to register sub-devices\n");
@@ -183,6 +183,9 @@ int cros_ec_remove(struct cros_ec_device *ec_dev)
183183

184184
cros_ec_acpi_remove_gpe_handler();
185185

186+
if (ec_dev->irq)
187+
free_irq(ec_dev->irq, ec_dev);
188+
186189
return 0;
187190
}
188191
EXPORT_SYMBOL(cros_ec_remove);

0 commit comments

Comments
 (0)