diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-08 23:02:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-08 23:02:54 -0500 |
commit | 3a7dbed7f23cdde8394e9adf92cc222856e0fc1e (patch) | |
tree | a83fa52d24d2457acadf4c1bc72ea3a3e294b57d /drivers/mfd/sec-core.c | |
parent | f2fb38049c724558c590c31e57627f6ba8d48a5b (diff) | |
parent | a3b63979f8a32af9e975a793fd0f612d42072740 (diff) |
Merge tag 'mfd-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull MFD updates from Lee Jones:
"Changes to the core:
- Honour PLATFORM_DEVID_NONE and PLATFORM_DEVID_AUTO dev IDs
Changes to existing drivers:
- IRQ additions/fixes; axp20x, da9063-core
- Code simplification; i2c-dln2
- Regmap additions/fixes; max77693
- Error checking/handling improvements; dln2, db8500-prcmu
- Bug fixes; dln2, wm8350-core
- DT support/documentation; max77693, max77686, tps65217, twl4030-power,
gpio-tc3589x
- Decouple syscon interface from platform devices
- Use MFD hotplug registration; rtsx_usb, viperboard, hid-sensor-hub
- Regulator fixups; sec-core
- Power Management additions/fixes; rts5227, tc6393xb
- Remove relic/redundant code; ab8500-sysctrl, lpc_sch, max77693-private
- Clean-up/coding style changes; tps65090
- Clk additions/fixes; tc6393xb, tc6387xb, t7l66xb
- Add USB-SPI support; dln2
- Trivial changes; max14577, arizona-spi, lpc_sch, wm8997-tables, wm5102-tables
wm5110-tables, axp20x, atmel-hlcdc, rtsx_pci
New drivers/supported devices:
- axp288 PMIC support added to axp20x
- s2mps13 support added to sec-core
- New support for Diolan DLN-2
- New support for atmel-hlcdc"
* tag 'mfd-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (55 commits)
mfd: rtsx: Add func to split u32 into register
mfd: atmel-hlcdc: Add Kconfig option description and name
mfd: da9063: Get irq base dynamically before registering device
mfd: max14577: Fix obvious typo in company name in copyright
mfd: axp20x: Constify axp20x_acpi_match and rid unused warning
mfd: t7l66xb: prepare/unprepare clocks
mfd: tc6387xb: prepare/unprepare clocks
mfd: dln2: add support for USB-SPI module
mfd: wm5110: Add missing registers for AIF2 channels 3-6
mfd: tc3589x: get rid of static base
mfd: arizona: Document HP_CTRL_1L and HP_CTRL_1R registers
mfd: wm8997: Mark INTERRUPT_STATUS_2_MASK as readable
mfd: tc6393xb: Prepare/unprepare clocks
mfd: tps65090: Fix bonkers indenting strategy
mfd: tc6393xb: Fail ohci suspend if full state restore is required
mfd: lpc_sch: Don't call mfd_remove_devices()
mfd: wm8350-core: Fix probable mask then right shift defect
mfd: ab8500-sysctrl: Drop ab8500_restart
mfd: db8500-prcmu: Provide sane error path values
mfd: db8500-prcmu: Check return of devm_ioremap for error
...
Diffstat (limited to 'drivers/mfd/sec-core.c')
-rw-r--r-- | drivers/mfd/sec-core.c | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index dba7e2b6f8e9..0a7bc43db4e4 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c | |||
@@ -27,11 +27,11 @@ | |||
27 | #include <linux/mfd/samsung/irq.h> | 27 | #include <linux/mfd/samsung/irq.h> |
28 | #include <linux/mfd/samsung/s2mpa01.h> | 28 | #include <linux/mfd/samsung/s2mpa01.h> |
29 | #include <linux/mfd/samsung/s2mps11.h> | 29 | #include <linux/mfd/samsung/s2mps11.h> |
30 | #include <linux/mfd/samsung/s2mps13.h> | ||
30 | #include <linux/mfd/samsung/s2mps14.h> | 31 | #include <linux/mfd/samsung/s2mps14.h> |
31 | #include <linux/mfd/samsung/s2mpu02.h> | 32 | #include <linux/mfd/samsung/s2mpu02.h> |
32 | #include <linux/mfd/samsung/s5m8763.h> | 33 | #include <linux/mfd/samsung/s5m8763.h> |
33 | #include <linux/mfd/samsung/s5m8767.h> | 34 | #include <linux/mfd/samsung/s5m8767.h> |
34 | #include <linux/regulator/machine.h> | ||
35 | #include <linux/regmap.h> | 35 | #include <linux/regmap.h> |
36 | 36 | ||
37 | static const struct mfd_cell s5m8751_devs[] = { | 37 | static const struct mfd_cell s5m8751_devs[] = { |
@@ -74,6 +74,15 @@ static const struct mfd_cell s2mps11_devs[] = { | |||
74 | } | 74 | } |
75 | }; | 75 | }; |
76 | 76 | ||
77 | static const struct mfd_cell s2mps13_devs[] = { | ||
78 | { .name = "s2mps13-pmic", }, | ||
79 | { .name = "s2mps13-rtc", }, | ||
80 | { | ||
81 | .name = "s2mps13-clk", | ||
82 | .of_compatible = "samsung,s2mps13-clk", | ||
83 | }, | ||
84 | }; | ||
85 | |||
77 | static const struct mfd_cell s2mps14_devs[] = { | 86 | static const struct mfd_cell s2mps14_devs[] = { |
78 | { | 87 | { |
79 | .name = "s2mps14-pmic", | 88 | .name = "s2mps14-pmic", |
@@ -108,6 +117,9 @@ static const struct of_device_id sec_dt_match[] = { | |||
108 | .compatible = "samsung,s2mps11-pmic", | 117 | .compatible = "samsung,s2mps11-pmic", |
109 | .data = (void *)S2MPS11X, | 118 | .data = (void *)S2MPS11X, |
110 | }, { | 119 | }, { |
120 | .compatible = "samsung,s2mps13-pmic", | ||
121 | .data = (void *)S2MPS13X, | ||
122 | }, { | ||
111 | .compatible = "samsung,s2mps14-pmic", | 123 | .compatible = "samsung,s2mps14-pmic", |
112 | .data = (void *)S2MPS14X, | 124 | .data = (void *)S2MPS14X, |
113 | }, { | 125 | }, { |
@@ -194,6 +206,15 @@ static const struct regmap_config s2mps11_regmap_config = { | |||
194 | .cache_type = REGCACHE_FLAT, | 206 | .cache_type = REGCACHE_FLAT, |
195 | }; | 207 | }; |
196 | 208 | ||
209 | static const struct regmap_config s2mps13_regmap_config = { | ||
210 | .reg_bits = 8, | ||
211 | .val_bits = 8, | ||
212 | |||
213 | .max_register = S2MPS13_REG_LDODSCH5, | ||
214 | .volatile_reg = s2mps11_volatile, | ||
215 | .cache_type = REGCACHE_FLAT, | ||
216 | }; | ||
217 | |||
197 | static const struct regmap_config s2mps14_regmap_config = { | 218 | static const struct regmap_config s2mps14_regmap_config = { |
198 | .reg_bits = 8, | 219 | .reg_bits = 8, |
199 | .val_bits = 8, | 220 | .val_bits = 8, |
@@ -325,6 +346,9 @@ static int sec_pmic_probe(struct i2c_client *i2c, | |||
325 | case S2MPS11X: | 346 | case S2MPS11X: |
326 | regmap = &s2mps11_regmap_config; | 347 | regmap = &s2mps11_regmap_config; |
327 | break; | 348 | break; |
349 | case S2MPS13X: | ||
350 | regmap = &s2mps13_regmap_config; | ||
351 | break; | ||
328 | case S2MPS14X: | 352 | case S2MPS14X: |
329 | regmap = &s2mps14_regmap_config; | 353 | regmap = &s2mps14_regmap_config; |
330 | break; | 354 | break; |
@@ -378,6 +402,10 @@ static int sec_pmic_probe(struct i2c_client *i2c, | |||
378 | sec_devs = s2mps11_devs; | 402 | sec_devs = s2mps11_devs; |
379 | num_sec_devs = ARRAY_SIZE(s2mps11_devs); | 403 | num_sec_devs = ARRAY_SIZE(s2mps11_devs); |
380 | break; | 404 | break; |
405 | case S2MPS13X: | ||
406 | sec_devs = s2mps13_devs; | ||
407 | num_sec_devs = ARRAY_SIZE(s2mps13_devs); | ||
408 | break; | ||
381 | case S2MPS14X: | 409 | case S2MPS14X: |
382 | sec_devs = s2mps14_devs; | 410 | sec_devs = s2mps14_devs; |
383 | num_sec_devs = ARRAY_SIZE(s2mps14_devs); | 411 | num_sec_devs = ARRAY_SIZE(s2mps14_devs); |
@@ -432,15 +460,6 @@ static int sec_pmic_suspend(struct device *dev) | |||
432 | */ | 460 | */ |
433 | disable_irq(sec_pmic->irq); | 461 | disable_irq(sec_pmic->irq); |
434 | 462 | ||
435 | switch (sec_pmic->device_type) { | ||
436 | case S2MPS14X: | ||
437 | case S2MPU02: | ||
438 | regulator_suspend_prepare(PM_SUSPEND_MEM); | ||
439 | break; | ||
440 | default: | ||
441 | break; | ||
442 | } | ||
443 | |||
444 | return 0; | 463 | return 0; |
445 | } | 464 | } |
446 | 465 | ||