Skip to content

Commit 8de4651

Browse files
committed
Merge tag 'mfd-3.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next
Pull MFD (multi-function device) updates from Samuel Ortiz: "For the 3.12 merge window we have one new driver for the DA9063 PMIC from Dialog Semiconductor. Besides that driver we also have: - Device tree support for the s2mps11 driver - More devm_* conversion for the pm8921, max89xx, menelaus, tps65010, wl1273 and pcf50633-adc drivers. - A conversion to threaded IRQ and IRQ domain for the twl6030 driver. - A fairly big update for the rtsx driver: Better power saving support, better vendor settings handling, and a few fixes. - Support for a couple more boards (COMe-bHL6 and COMe-cTH6) for the Kontron driver. - A conversion to the dev_get_platdata() API for all MFD drivers. - A removal of non-DT (legacy) support for the twl6040 driver. - A few fixes and additions (Mic detect level) to the wm5110 register tables. - Regmap support for the davinci_voicecodec driver. - The usual bunch of minor cleanups and janitorial fixes" * tag 'mfd-3.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (81 commits) mfd: ucb1x00-core: Rewrite ucb1x00_add_dev() mfd: ab8500-debugfs: Apply a check for -ENOMEM after allocating memory for event name mfd: ab8500-debugfs: Apply a check for -ENOMEM after allocating memory for sysfs mfd: timberdale: Use module_pci_driver mfd: timberdale: Remove redundant break mfd: timberdale: Staticize local variables mfd: ab8500-debugfs: Staticize local variables mfd: db8500-prcmu: Staticize clk_mgt mfd: db8500-prcmu: Use ANSI function declaration mfd: omap-usb-host: Staticize usbhs_driver_name mfd: 88pm805: Fix potential NULL pdata dereference mfd: 88pm800: Fix potential NULL pdata dereference mfd: twl6040: Use regmap for register cache mfd: davinci_voicecodec: Provide a regmap for register I/O mfd: davinci_voicecodec: Remove unused read and write functions mmc: memstick: rtsx: Modify copyright comments mmc: rtsx: Clear SD_CLK toggle enable bit if switching voltage fail mfd: mmc: rtsx: Change default tx phase mfd: pcf50633-adc: Use devm_*() functions mfd: rtsx: Copyright modifications ...
2 parents 327fff3 + 9c31e88 commit 8de4651

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+3222
-656
lines changed

Documentation/devicetree/bindings/mfd/palmas.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ twl6035 (palmas)
55
twl6037 (palmas)
66
tps65913 (palmas)
77
tps65914 (palmas)
8+
tps659038
89

910
Required properties:
1011
- compatible : Should be from the list
@@ -14,6 +15,7 @@ Required properties:
1415
ti,tps65913
1516
ti,tps65914
1617
ti,tps80036
18+
ti,tps659038
1719
and also the generic series names
1820
ti,palmas
1921
- interrupt-controller : palmas has its own internal IRQs
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
2+
* Samsung S2MPS11 Voltage and Current Regulator
3+
4+
The Samsung S2MP211 is a multi-function device which includes voltage and
5+
current regulators, RTC, charger controller and other sub-blocks. It is
6+
interfaced to the host controller using a I2C interface. Each sub-block is
7+
addressed by the host system using different I2C slave address.
8+
9+
Required properties:
10+
- compatible: Should be "samsung,s2mps11-pmic".
11+
- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
12+
13+
Optional properties:
14+
- interrupt-parent: Specifies the phandle of the interrupt controller to which
15+
the interrupts from s2mps11 are delivered to.
16+
- interrupts: Interrupt specifiers for interrupt sources.
17+
18+
Optional nodes:
19+
- clocks: s2mps11 provides three(AP/CP/BT) buffered 32.768 KHz outputs, so to
20+
register these as clocks with common clock framework instantiate a sub-node
21+
named "clocks". It uses the common clock binding documented in :
22+
[Documentation/devicetree/bindings/clock/clock-bindings.txt]
23+
- #clock-cells: should be 1.
24+
25+
- The following is the list of clocks generated by the controller. Each clock
26+
is assigned an identifier and client nodes use this identifier to specify
27+
the clock which they consume.
28+
Clock ID
29+
----------------------
30+
32KhzAP 0
31+
32KhzCP 1
32+
32KhzBT 2
33+
34+
- regulators: The regulators of s2mps11 that have to be instantiated should be
35+
included in a sub-node named 'regulators'. Regulator nodes included in this
36+
sub-node should be of the format as listed below.
37+
38+
regulator_name {
39+
[standard regulator constraints....];
40+
};
41+
42+
regulator-ramp-delay for BUCKs = [6250/12500/25000(default)/50000] uV/us
43+
44+
BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explictly
45+
regulator-ramp-delay = <0> can be used for them to disable ramp delay.
46+
In absence of regulator-ramp-delay property, default ramp delay will be used.
47+
48+
NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set
49+
for a particular group of BUCKs. So provide same regulator-ramp-delay<value>.
50+
Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6],
51+
BUCK[3, 4], and BUCK[7, 8, 10]
52+
53+
The regulator constraints inside the regulator nodes use the standard regulator
54+
bindings which are documented elsewhere.
55+
56+
The following are the names of the regulators that the s2mps11 pmic block
57+
supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
58+
as per the datasheet of s2mps11.
59+
60+
- LDOn
61+
- valid values for n are 1 to 28
62+
- Example: LDO0, LD01, LDO28
63+
- BUCKn
64+
- valid values for n are 1 to 9.
65+
- Example: BUCK1, BUCK2, BUCK9
66+
67+
Example:
68+
69+
s2mps11_pmic@66 {
70+
compatible = "samsung,s2mps11-pmic";
71+
reg = <0x66>;
72+
73+
s2m_osc: clocks{
74+
#clock-cells = 1;
75+
clock-output-names = "xx", "yy", "zz";
76+
};
77+
78+
regulators {
79+
ldo1_reg: LDO1 {
80+
regulator-name = "VDD_ABB_3.3V";
81+
regulator-min-microvolt = <3300000>;
82+
regulator-max-microvolt = <3300000>;
83+
};
84+
85+
ldo2_reg: LDO2 {
86+
regulator-name = "VDD_ALIVE_1.1V";
87+
regulator-min-microvolt = <1100000>;
88+
regulator-max-microvolt = <1100000>;
89+
regulator-always-on;
90+
};
91+
92+
buck1_reg: BUCK1 {
93+
regulator-name = "vdd_mif";
94+
regulator-min-microvolt = <950000>;
95+
regulator-max-microvolt = <1350000>;
96+
regulator-always-on;
97+
regulator-boot-on;
98+
};
99+
100+
buck2_reg: BUCK2 {
101+
regulator-name = "vdd_arm";
102+
regulator-min-microvolt = <950000>;
103+
regulator-max-microvolt = <1350000>;
104+
regulator-always-on;
105+
regulator-boot-on;
106+
regulator-ramp-delay = <50000>;
107+
};
108+
};
109+
};

Documentation/devicetree/bindings/regulator/palmas-pmic.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ Optional nodes:
3636
ti,smps-range - OTP has the wrong range set for the hardware so override
3737
0 - low range, 1 - high range.
3838

39+
- ti,system-power-controller: Telling whether or not this pmic is controlling
40+
the system power.
41+
3942
Example:
4043

4144
#include <dt-bindings/interrupt-controller/irq.h>
@@ -48,6 +51,8 @@ pmic {
4851

4952
ti,ldo6-vibrator;
5053

54+
ti,system-power-controller;
55+
5156
regulators {
5257
smps12_reg : smps12 {
5358
regulator-name = "smps12";

drivers/memstick/host/rtsx_pci_ms.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Realtek PCI-Express Memstick Card Interface driver
22
*
3-
* Copyright(c) 2009 Realtek Semiconductor Corp. All rights reserved.
3+
* Copyright(c) 2009-2013 Realtek Semiconductor Corp. All rights reserved.
44
*
55
* This program is free software; you can redistribute it and/or modify it
66
* under the terms of the GNU General Public License as published by the
@@ -17,7 +17,6 @@
1717
*
1818
* Author:
1919
* Wei WANG <[email protected]>
20-
* No. 450, Shenhu Road, Suzhou Industry Park, Suzhou, China
2120
*/
2221

2322
#include <linux/module.h>

drivers/mfd/88pm800.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,11 @@ static int device_rtc_init(struct pm80x_chip *chip,
333333
{
334334
int ret;
335335

336-
rtc_devs[0].platform_data = pdata->rtc;
337-
rtc_devs[0].pdata_size =
338-
pdata->rtc ? sizeof(struct pm80x_rtc_pdata) : 0;
336+
if (pdata) {
337+
rtc_devs[0].platform_data = pdata->rtc;
338+
rtc_devs[0].pdata_size =
339+
pdata->rtc ? sizeof(struct pm80x_rtc_pdata) : 0;
340+
}
339341
ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0],
340342
ARRAY_SIZE(rtc_devs), NULL, 0, NULL);
341343
if (ret) {
@@ -541,7 +543,7 @@ static int pm800_probe(struct i2c_client *client,
541543
{
542544
int ret = 0;
543545
struct pm80x_chip *chip;
544-
struct pm80x_platform_data *pdata = client->dev.platform_data;
546+
struct pm80x_platform_data *pdata = dev_get_platdata(&client->dev);
545547
struct pm80x_subchip *subchip;
546548

547549
ret = pm80x_init(client);
@@ -578,7 +580,7 @@ static int pm800_probe(struct i2c_client *client,
578580
goto err_device_init;
579581
}
580582

581-
if (pdata->plat_config)
583+
if (pdata && pdata->plat_config)
582584
pdata->plat_config(chip, pdata);
583585

584586
return 0;

drivers/mfd/88pm805.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static int pm805_probe(struct i2c_client *client,
227227
{
228228
int ret = 0;
229229
struct pm80x_chip *chip;
230-
struct pm80x_platform_data *pdata = client->dev.platform_data;
230+
struct pm80x_platform_data *pdata = dev_get_platdata(&client->dev);
231231

232232
ret = pm80x_init(client);
233233
if (ret) {
@@ -243,7 +243,7 @@ static int pm805_probe(struct i2c_client *client,
243243
goto err_805_init;
244244
}
245245

246-
if (pdata->plat_config)
246+
if (pdata && pdata->plat_config)
247247
pdata->plat_config(chip, pdata);
248248

249249
err_805_init:

drivers/mfd/88pm860x-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ static int pm860x_dt_init(struct device_node *np,
11301130
static int pm860x_probe(struct i2c_client *client,
11311131
const struct i2c_device_id *id)
11321132
{
1133-
struct pm860x_platform_data *pdata = client->dev.platform_data;
1133+
struct pm860x_platform_data *pdata = dev_get_platdata(&client->dev);
11341134
struct device_node *node = client->dev.of_node;
11351135
struct pm860x_chip *chip;
11361136
int ret;

drivers/mfd/Kconfig

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@ config MFD_DA9055
139139
This driver can be built as a module. If built as a module it will be
140140
called "da9055"
141141

142+
config MFD_DA9063
143+
bool "Dialog Semiconductor DA9063 PMIC Support"
144+
select MFD_CORE
145+
select REGMAP_I2C
146+
select REGMAP_IRQ
147+
depends on I2C=y && GENERIC_HARDIRQS
148+
help
149+
Say yes here for support for the Dialog Semiconductor DA9063 PMIC.
150+
This includes the I2C driver and core APIs.
151+
Additional drivers must be enabled in order to use the functionality
152+
of the device.
153+
142154
config MFD_MC13783
143155
tristate
144156

@@ -1070,7 +1082,7 @@ config MFD_WM5110
10701082
Support for Wolfson Microelectronics WM5110 low power audio SoC
10711083

10721084
config MFD_WM8997
1073-
bool "Support Wolfson Microelectronics WM8997"
1085+
bool "Wolfson Microelectronics WM8997"
10741086
depends on MFD_ARIZONA
10751087
help
10761088
Support for Wolfson Microelectronics WM8997 low power audio SoC

drivers/mfd/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ obj-$(CONFIG_MFD_LP8788) += lp8788.o lp8788-irq.o
107107
da9055-objs := da9055-core.o da9055-i2c.o
108108
obj-$(CONFIG_MFD_DA9055) += da9055.o
109109

110+
da9063-objs := da9063-core.o da9063-irq.o da9063-i2c.o
111+
obj-$(CONFIG_MFD_DA9063) += da9063.o
112+
110113
obj-$(CONFIG_MFD_MAX77686) += max77686.o max77686-irq.o
111114
obj-$(CONFIG_MFD_MAX77693) += max77693.o max77693-irq.o
112115
obj-$(CONFIG_MFD_MAX8907) += max8907.o

drivers/mfd/aat2870-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ static inline void aat2870_uninit_debugfs(struct aat2870_data *aat2870)
363363
static int aat2870_i2c_probe(struct i2c_client *client,
364364
const struct i2c_device_id *id)
365365
{
366-
struct aat2870_platform_data *pdata = client->dev.platform_data;
366+
struct aat2870_platform_data *pdata = dev_get_platdata(&client->dev);
367367
struct aat2870_data *aat2870;
368368
int i, j;
369369
int ret = 0;

drivers/mfd/ab3100-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ static int ab3100_probe(struct i2c_client *client,
854854
{
855855
struct ab3100 *ab3100;
856856
struct ab3100_platform_data *ab3100_plf_data =
857-
client->dev.platform_data;
857+
dev_get_platdata(&client->dev);
858858
int err;
859859
int i;
860860

drivers/mfd/ab8500-debugfs.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static struct hwreg_cfg hwreg_cfg = {
159159

160160
static struct ab8500_prcmu_ranges *debug_ranges;
161161

162-
struct ab8500_prcmu_ranges ab8500_debug_ranges[AB8500_NUM_BANKS] = {
162+
static struct ab8500_prcmu_ranges ab8500_debug_ranges[AB8500_NUM_BANKS] = {
163163
[0x0] = {
164164
.num_ranges = 0,
165165
.range = NULL,
@@ -488,7 +488,7 @@ struct ab8500_prcmu_ranges ab8500_debug_ranges[AB8500_NUM_BANKS] = {
488488
},
489489
};
490490

491-
struct ab8500_prcmu_ranges ab8505_debug_ranges[AB8500_NUM_BANKS] = {
491+
static struct ab8500_prcmu_ranges ab8505_debug_ranges[AB8500_NUM_BANKS] = {
492492
[0x0] = {
493493
.num_ranges = 0,
494494
.range = NULL,
@@ -847,7 +847,7 @@ struct ab8500_prcmu_ranges ab8505_debug_ranges[AB8500_NUM_BANKS] = {
847847
},
848848
};
849849

850-
struct ab8500_prcmu_ranges ab8540_debug_ranges[AB8500_NUM_BANKS] = {
850+
static struct ab8500_prcmu_ranges ab8540_debug_ranges[AB8500_NUM_BANKS] = {
851851
[AB8500_M_FSM_RANK] = {
852852
.num_ranges = 1,
853853
.range = (struct ab8500_reg_range[]) {
@@ -1377,7 +1377,7 @@ void ab8500_dump_all_banks(struct device *dev)
13771377

13781378
/* Space for 500 registers. */
13791379
#define DUMP_MAX_REGS 700
1380-
struct ab8500_register_dump
1380+
static struct ab8500_register_dump
13811381
{
13821382
u8 bank;
13831383
u8 reg;
@@ -2800,7 +2800,13 @@ static ssize_t ab8500_subscribe_write(struct file *file,
28002800
*/
28012801
dev_attr[irq_index] = kmalloc(sizeof(struct device_attribute),
28022802
GFP_KERNEL);
2803+
if (!dev_attr[irq_index])
2804+
return -ENOMEM;
2805+
28032806
event_name[irq_index] = kmalloc(count, GFP_KERNEL);
2807+
if (!event_name[irq_index])
2808+
return -ENOMEM;
2809+
28042810
sprintf(event_name[irq_index], "%lu", user_val);
28052811
dev_attr[irq_index]->show = show_irq;
28062812
dev_attr[irq_index]->store = NULL;

drivers/mfd/ab8500-gpadc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ static void ab8500_gpadc_read_calibration_data(struct ab8500_gpadc *gpadc)
867867
gpadc->cal_data[ADC_INPUT_VBAT].offset);
868868
}
869869

870+
#ifdef CONFIG_PM_RUNTIME
870871
static int ab8500_gpadc_runtime_suspend(struct device *dev)
871872
{
872873
struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);
@@ -885,7 +886,9 @@ static int ab8500_gpadc_runtime_resume(struct device *dev)
885886
dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret);
886887
return ret;
887888
}
889+
#endif
888890

891+
#ifdef CONFIG_PM_SLEEP
889892
static int ab8500_gpadc_suspend(struct device *dev)
890893
{
891894
struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);
@@ -913,6 +916,7 @@ static int ab8500_gpadc_resume(struct device *dev)
913916
mutex_unlock(&gpadc->ab8500_gpadc_lock);
914917
return ret;
915918
}
919+
#endif
916920

917921
static int ab8500_gpadc_probe(struct platform_device *pdev)
918922
{

drivers/mfd/adp5520.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static int adp5520_remove_subdevs(struct adp5520_chip *chip)
207207
static int adp5520_probe(struct i2c_client *client,
208208
const struct i2c_device_id *id)
209209
{
210-
struct adp5520_platform_data *pdata = client->dev.platform_data;
210+
struct adp5520_platform_data *pdata = dev_get_platdata(&client->dev);
211211
struct platform_device *pdev;
212212
struct adp5520_chip *chip;
213213
int ret;

drivers/mfd/arizona-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,9 @@ static int arizona_runtime_suspend(struct device *dev)
438438
}
439439
}
440440

441-
regulator_disable(arizona->dcvdd);
442441
regcache_cache_only(arizona->regmap, true);
443442
regcache_mark_dirty(arizona->regmap);
443+
regulator_disable(arizona->dcvdd);
444444

445445
return 0;
446446
}

drivers/mfd/as3711.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int as3711_i2c_probe(struct i2c_client *client,
129129
int ret;
130130

131131
if (!client->dev.of_node) {
132-
pdata = client->dev.platform_data;
132+
pdata = dev_get_platdata(&client->dev);
133133
if (!pdata)
134134
dev_dbg(&client->dev, "Platform data not found\n");
135135
} else {

drivers/mfd/asic3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ static void asic3_mfd_remove(struct platform_device *pdev)
952952
/* Core */
953953
static int __init asic3_probe(struct platform_device *pdev)
954954
{
955-
struct asic3_platform_data *pdata = pdev->dev.platform_data;
955+
struct asic3_platform_data *pdata = dev_get_platdata(&pdev->dev);
956956
struct asic3 *asic;
957957
struct resource *mem;
958958
unsigned long clksel;

drivers/mfd/da903x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ static int da903x_add_subdevs(struct da903x_chip *chip,
494494
static int da903x_probe(struct i2c_client *client,
495495
const struct i2c_device_id *id)
496496
{
497-
struct da903x_platform_data *pdata = client->dev.platform_data;
497+
struct da903x_platform_data *pdata = dev_get_platdata(&client->dev);
498498
struct da903x_chip *chip;
499499
unsigned int tmp;
500500
int ret;

0 commit comments

Comments
 (0)