aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/Kconfig2
-rw-r--r--drivers/mfd/lpc_ich.c2
-rw-r--r--drivers/mfd/pcf50633-core.c2
-rw-r--r--drivers/mfd/rtsx_pcr.c10
-rw-r--r--drivers/mfd/sec-core.c50
-rw-r--r--drivers/mfd/sec-irq.c6
-rw-r--r--drivers/mfd/ti-ssp.c2
7 files changed, 32 insertions, 42 deletions
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 62a60caa5d1f..dd671582c9a1 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -32,7 +32,7 @@ config MFD_AS3722
32 select MFD_CORE 32 select MFD_CORE
33 select REGMAP_I2C 33 select REGMAP_I2C
34 select REGMAP_IRQ 34 select REGMAP_IRQ
35 depends on I2C && OF 35 depends on I2C=y && OF
36 help 36 help
37 The ams AS3722 is a compact system PMU suitable for mobile phones, 37 The ams AS3722 is a compact system PMU suitable for mobile phones,
38 tablets etc. It has 4 DC/DC step-down regulators, 3 DC/DC step-down 38 tablets etc. It has 4 DC/DC step-down regulators, 3 DC/DC step-down
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index da1c6566d93d..37edf9e989b0 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -506,7 +506,7 @@ static struct lpc_ich_info lpc_chipset_info[] = {
506 .iTCO_version = 2, 506 .iTCO_version = 2,
507 }, 507 },
508 [LPC_WPT_LP] = { 508 [LPC_WPT_LP] = {
509 .name = "Lynx Point_LP", 509 .name = "Wildcat Point_LP",
510 .iTCO_version = 2, 510 .iTCO_version = 2,
511 }, 511 },
512}; 512};
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index 6841d6805fd6..41ab5e34d2ac 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -245,7 +245,7 @@ static int pcf50633_probe(struct i2c_client *client,
245 for (i = 0; i < PCF50633_NUM_REGULATORS; i++) { 245 for (i = 0; i < PCF50633_NUM_REGULATORS; i++) {
246 struct platform_device *pdev; 246 struct platform_device *pdev;
247 247
248 pdev = platform_device_alloc("pcf50633-regltr", i); 248 pdev = platform_device_alloc("pcf50633-regulator", i);
249 if (!pdev) { 249 if (!pdev) {
250 dev_err(pcf->dev, "Cannot create regulator %d\n", i); 250 dev_err(pcf->dev, "Cannot create regulator %d\n", i);
251 continue; 251 continue;
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index 11e20afbdcac..705698fd2c7e 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -1228,8 +1228,14 @@ static void rtsx_pci_remove(struct pci_dev *pcidev)
1228 1228
1229 pcr->remove_pci = true; 1229 pcr->remove_pci = true;
1230 1230
1231 cancel_delayed_work(&pcr->carddet_work); 1231 /* Disable interrupts at the pcr level */
1232 cancel_delayed_work(&pcr->idle_work); 1232 spin_lock_irq(&pcr->lock);
1233 rtsx_pci_writel(pcr, RTSX_BIER, 0);
1234 pcr->bier = 0;
1235 spin_unlock_irq(&pcr->lock);
1236
1237 cancel_delayed_work_sync(&pcr->carddet_work);
1238 cancel_delayed_work_sync(&pcr->idle_work);
1233 1239
1234 mfd_remove_devices(&pcidev->dev); 1240 mfd_remove_devices(&pcidev->dev);
1235 1241
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 34c18fb8c089..1d158d5ba8b8 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -79,36 +79,6 @@ static struct of_device_id sec_dt_match[] = {
79}; 79};
80#endif 80#endif
81 81
82int sec_reg_read(struct sec_pmic_dev *sec_pmic, u8 reg, void *dest)
83{
84 return regmap_read(sec_pmic->regmap, reg, dest);
85}
86EXPORT_SYMBOL_GPL(sec_reg_read);
87
88int sec_bulk_read(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf)
89{
90 return regmap_bulk_read(sec_pmic->regmap, reg, buf, count);
91}
92EXPORT_SYMBOL_GPL(sec_bulk_read);
93
94int sec_reg_write(struct sec_pmic_dev *sec_pmic, u8 reg, u8 value)
95{
96 return regmap_write(sec_pmic->regmap, reg, value);
97}
98EXPORT_SYMBOL_GPL(sec_reg_write);
99
100int sec_bulk_write(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf)
101{
102 return regmap_raw_write(sec_pmic->regmap, reg, buf, count);
103}
104EXPORT_SYMBOL_GPL(sec_bulk_write);
105
106int sec_reg_update(struct sec_pmic_dev *sec_pmic, u8 reg, u8 val, u8 mask)
107{
108 return regmap_update_bits(sec_pmic->regmap, reg, mask, val);
109}
110EXPORT_SYMBOL_GPL(sec_reg_update);
111
112static bool s2mps11_volatile(struct device *dev, unsigned int reg) 82static bool s2mps11_volatile(struct device *dev, unsigned int reg)
113{ 83{
114 switch (reg) { 84 switch (reg) {
@@ -166,6 +136,11 @@ static struct regmap_config s5m8767_regmap_config = {
166 .cache_type = REGCACHE_FLAT, 136 .cache_type = REGCACHE_FLAT,
167}; 137};
168 138
139static const struct regmap_config sec_rtc_regmap_config = {
140 .reg_bits = 8,
141 .val_bits = 8,
142};
143
169#ifdef CONFIG_OF 144#ifdef CONFIG_OF
170/* 145/*
171 * Only the common platform data elements for s5m8767 are parsed here from the 146 * Only the common platform data elements for s5m8767 are parsed here from the
@@ -266,9 +241,9 @@ static int sec_pmic_probe(struct i2c_client *i2c,
266 break; 241 break;
267 } 242 }
268 243
269 sec_pmic->regmap = devm_regmap_init_i2c(i2c, regmap); 244 sec_pmic->regmap_pmic = devm_regmap_init_i2c(i2c, regmap);
270 if (IS_ERR(sec_pmic->regmap)) { 245 if (IS_ERR(sec_pmic->regmap_pmic)) {
271 ret = PTR_ERR(sec_pmic->regmap); 246 ret = PTR_ERR(sec_pmic->regmap_pmic);
272 dev_err(&i2c->dev, "Failed to allocate register map: %d\n", 247 dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
273 ret); 248 ret);
274 return ret; 249 return ret;
@@ -277,6 +252,15 @@ static int sec_pmic_probe(struct i2c_client *i2c,
277 sec_pmic->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR); 252 sec_pmic->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR);
278 i2c_set_clientdata(sec_pmic->rtc, sec_pmic); 253 i2c_set_clientdata(sec_pmic->rtc, sec_pmic);
279 254
255 sec_pmic->regmap_rtc = devm_regmap_init_i2c(sec_pmic->rtc,
256 &sec_rtc_regmap_config);
257 if (IS_ERR(sec_pmic->regmap_rtc)) {
258 ret = PTR_ERR(sec_pmic->regmap_rtc);
259 dev_err(&i2c->dev, "Failed to allocate RTC register map: %d\n",
260 ret);
261 return ret;
262 }
263
280 if (pdata && pdata->cfg_pmic_irq) 264 if (pdata && pdata->cfg_pmic_irq)
281 pdata->cfg_pmic_irq(); 265 pdata->cfg_pmic_irq();
282 266
diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c
index 0dd84e99081e..b441b1be27cb 100644
--- a/drivers/mfd/sec-irq.c
+++ b/drivers/mfd/sec-irq.c
@@ -280,19 +280,19 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic)
280 280
281 switch (type) { 281 switch (type) {
282 case S5M8763X: 282 case S5M8763X:
283 ret = regmap_add_irq_chip(sec_pmic->regmap, sec_pmic->irq, 283 ret = regmap_add_irq_chip(sec_pmic->regmap_pmic, sec_pmic->irq,
284 IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 284 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
285 sec_pmic->irq_base, &s5m8763_irq_chip, 285 sec_pmic->irq_base, &s5m8763_irq_chip,
286 &sec_pmic->irq_data); 286 &sec_pmic->irq_data);
287 break; 287 break;
288 case S5M8767X: 288 case S5M8767X:
289 ret = regmap_add_irq_chip(sec_pmic->regmap, sec_pmic->irq, 289 ret = regmap_add_irq_chip(sec_pmic->regmap_pmic, sec_pmic->irq,
290 IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 290 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
291 sec_pmic->irq_base, &s5m8767_irq_chip, 291 sec_pmic->irq_base, &s5m8767_irq_chip,
292 &sec_pmic->irq_data); 292 &sec_pmic->irq_data);
293 break; 293 break;
294 case S2MPS11X: 294 case S2MPS11X:
295 ret = regmap_add_irq_chip(sec_pmic->regmap, sec_pmic->irq, 295 ret = regmap_add_irq_chip(sec_pmic->regmap_pmic, sec_pmic->irq,
296 IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 296 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
297 sec_pmic->irq_base, &s2mps11_irq_chip, 297 sec_pmic->irq_base, &s2mps11_irq_chip,
298 &sec_pmic->irq_data); 298 &sec_pmic->irq_data);
diff --git a/drivers/mfd/ti-ssp.c b/drivers/mfd/ti-ssp.c
index 71e3e0c5bf73..a5424579679c 100644
--- a/drivers/mfd/ti-ssp.c
+++ b/drivers/mfd/ti-ssp.c
@@ -32,6 +32,7 @@
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/delay.h> 33#include <linux/delay.h>
34#include <linux/io.h> 34#include <linux/io.h>
35#include <linux/sched.h>
35#include <linux/mfd/core.h> 36#include <linux/mfd/core.h>
36#include <linux/mfd/ti_ssp.h> 37#include <linux/mfd/ti_ssp.h>
37 38
@@ -409,7 +410,6 @@ static int ti_ssp_probe(struct platform_device *pdev)
409 cells[id].id = id; 410 cells[id].id = id;
410 cells[id].name = data->dev_name; 411 cells[id].name = data->dev_name;
411 cells[id].platform_data = data->pdata; 412 cells[id].platform_data = data->pdata;
412 cells[id].data_size = data->pdata_size;
413 } 413 }
414 414
415 error = mfd_add_devices(dev, 0, cells, 2, NULL, 0, NULL); 415 error = mfd_add_devices(dev, 0, cells, 2, NULL, 0, NULL);