aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/arizona-core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-15 00:58:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-15 00:58:16 -0400
commitfcc3a5d277571bc6048e7b4ef8cd391b935de629 (patch)
tree143954c115011c657f747a0e1470973b94ab3690 /drivers/mfd/arizona-core.c
parent50fa86172bec2769979b5eb0cd1a244391ae4bb0 (diff)
parentd86c21fd31114e3ef9fae64be335c76aa22859dc (diff)
Merge tag 'mfd-for-linus-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull MFD updates from Lee Jones: "Changes to existing drivers: - DT clean-ups in da9055-core, max14577, rn5t618, arizona, hi6421, stmpe, twl4030 - Export symbols for use in modules in max14577 - Plenty of static code analysis/Coccinelle fixes throughout the SS - Regmap clean-ups in arizona, wm5102, wm5110, da9052, tps65217, rk808 - Remove unused/duplicate code in da9052, 88pm860x, ti_ssp, lpc_sch, arizona - Bug fixes in ti_am335x_tscadc, da9052, ti_am335x_tscadc, rtsx_pcr - IRQ fixups in arizona, stmpe, max14577 - Regulator related changes in axp20x - Pass DMA coherency information from parent => child in MFD core - Rename DT document files for consistency - Add ACPI support to the MFD core - Add Andreas Werner to MAINTAINERS for MEN F21BMC New drivers/supported devices: - New driver for MEN 14F021P00 Board Management Controller - New driver for Ricoh RN5T618 PMIC - New driver for Rockchip RK808 - New driver for HiSilicon Hi6421 PMIC - New driver for Qualcomm SPMI PMICs - Add support for Intel Braswell in lpc_ich - Add support for Intel 9 Series PCH in lpc_ich - Add support for Intel Quark ILB in lpc_sch" [ Delayed to after the poweer/reset pull due to Kconfig problems with recursive Kconfig select/depends-on chains. - Linus ] * tag 'mfd-for-linus-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (79 commits) mfd: cros_ec: wait for completion of commands that return IN_PROGRESS i2c: i2c-cros-ec-tunnel: Set retries to 3 mfd: cros_ec: move locking into cros_ec_cmd_xfer mfd: cros_ec: stop calling ->cmd_xfer() directly mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC MAINTAINERS: Adds Andreas Werner to maintainers list for MEN F21BMC mfd: arizona: Correct mask to allow setting micbias external cap mfd: Add ACPI support Revert "mfd: wm5102: Manually apply register patch" mfd: ti_am335x_tscadc: Update logic in CTRL register for 5-wire TS mfd: dt-bindings: atmel-gpbr: Rename doc file to conform to naming convention mfd: dt-bindings: qcom-pm8xxx: Rename doc file to conform to naming convention mfd: Inherit coherent_dma_mask from parent device mfd: Document DT bindings for Qualcomm SPMI PMICs mfd: Add support for Qualcomm SPMI PMICs mfd: dt-bindings: pm8xxx: Add new compatible string mfd: axp209x: Drop the parent supplies field mfd: twl4030-power: Use 'ti,system-power-controller' as alternative way to support system power off mfd: dt-bindings: twl4030-power: Use the standard property to mark power control mfd: syscon: Add Atmel GPBR DT bindings documention ...
Diffstat (limited to 'drivers/mfd/arizona-core.c')
-rw-r--r--drivers/mfd/arizona-core.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 10a0cb90619a..bce7c0784b6b 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -393,18 +393,6 @@ static int arizona_runtime_resume(struct device *dev)
393 break; 393 break;
394 } 394 }
395 395
396 switch (arizona->type) {
397 case WM5102:
398 ret = wm5102_patch(arizona);
399 if (ret != 0) {
400 dev_err(arizona->dev, "Failed to apply patch: %d\n",
401 ret);
402 goto err;
403 }
404 default:
405 break;
406 }
407
408 ret = regcache_sync(arizona->regmap); 396 ret = regcache_sync(arizona->regmap);
409 if (ret != 0) { 397 if (ret != 0) {
410 dev_err(arizona->dev, "Failed to restore register cache\n"); 398 dev_err(arizona->dev, "Failed to restore register cache\n");
@@ -534,7 +522,11 @@ EXPORT_SYMBOL_GPL(arizona_of_get_named_gpio);
534static int arizona_of_get_core_pdata(struct arizona *arizona) 522static int arizona_of_get_core_pdata(struct arizona *arizona)
535{ 523{
536 struct arizona_pdata *pdata = &arizona->pdata; 524 struct arizona_pdata *pdata = &arizona->pdata;
525 struct property *prop;
526 const __be32 *cur;
527 u32 val;
537 int ret, i; 528 int ret, i;
529 int count = 0;
538 530
539 pdata->reset = arizona_of_get_named_gpio(arizona, "wlf,reset", true); 531 pdata->reset = arizona_of_get_named_gpio(arizona, "wlf,reset", true);
540 532
@@ -560,6 +552,15 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
560 ret); 552 ret);
561 } 553 }
562 554
555 of_property_for_each_u32(arizona->dev->of_node, "wlf,inmode", prop,
556 cur, val) {
557 if (count == ARRAY_SIZE(arizona->pdata.inmode))
558 break;
559
560 arizona->pdata.inmode[count] = val;
561 count++;
562 }
563
563 return 0; 564 return 0;
564} 565}
565 566
@@ -784,7 +785,8 @@ int arizona_dev_init(struct arizona *arizona)
784 /* Ensure device startup is complete */ 785 /* Ensure device startup is complete */
785 switch (arizona->type) { 786 switch (arizona->type) {
786 case WM5102: 787 case WM5102:
787 ret = regmap_read(arizona->regmap, 0x19, &val); 788 ret = regmap_read(arizona->regmap,
789 ARIZONA_WRITE_SEQUENCER_CTRL_3, &val);
788 if (ret != 0) 790 if (ret != 0)
789 dev_err(dev, 791 dev_err(dev,
790 "Failed to check write sequencer state: %d\n", 792 "Failed to check write sequencer state: %d\n",
@@ -945,6 +947,7 @@ int arizona_dev_init(struct arizona *arizona)
945 regmap_update_bits(arizona->regmap, 947 regmap_update_bits(arizona->regmap,
946 ARIZONA_MIC_BIAS_CTRL_1 + i, 948 ARIZONA_MIC_BIAS_CTRL_1 + i,
947 ARIZONA_MICB1_LVL_MASK | 949 ARIZONA_MICB1_LVL_MASK |
950 ARIZONA_MICB1_EXT_CAP |
948 ARIZONA_MICB1_DISCH | 951 ARIZONA_MICB1_DISCH |
949 ARIZONA_MICB1_BYPASS | 952 ARIZONA_MICB1_BYPASS |
950 ARIZONA_MICB1_RATE, val); 953 ARIZONA_MICB1_RATE, val);