aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/sec-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/sec-core.c')
-rw-r--r--drivers/mfd/sec-core.c39
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
37static const struct mfd_cell s5m8751_devs[] = { 37static const struct mfd_cell s5m8751_devs[] = {
@@ -74,6 +74,15 @@ static const struct mfd_cell s2mps11_devs[] = {
74 } 74 }
75}; 75};
76 76
77static 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
77static const struct mfd_cell s2mps14_devs[] = { 86static 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
209static 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
197static const struct regmap_config s2mps14_regmap_config = { 218static 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