Commit c854539d authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'mfd-for-linus-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull MFD fixes from Samuel Ortiz:

 - A twl fix preventing a buffer overflow.

 - A wm5102 register patch fix.

 - A wm5110 error misreport fix.

 - Arizona fixes: Use the right array size when adding subdevices,
   correctly report underclocked events, synchronize register cache
   after reset.

 - A twl4030 fix for preventing the system to hang from an interrupt
   flood.

* tag 'mfd-for-linus-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: twl4030: Fix chained irq handling on resume from suspend
  mfd: arizona: Sync regcache after reset
  mfd: arizona: Correctly report when AIF2/AIF1 is underclocked
  mfd: arizona: Use correct array for ARRAY_SIZE in mfd_add_devices call
  mfd: wm5110: Disable control interface error report for WM5110 rev B
  mfd: wm5102: Update register patch for latest evaluation
  mfd: twl-core: Fix chip ID for the twl6030-pwm module
parents 33057692 8b41669c
...@@ -96,11 +96,11 @@ static irqreturn_t arizona_underclocked(int irq, void *data) ...@@ -96,11 +96,11 @@ static irqreturn_t arizona_underclocked(int irq, void *data)
return IRQ_NONE; return IRQ_NONE;
} }
if (val & ARIZONA_AIF3_UNDERCLOCKED_STS)
dev_err(arizona->dev, "AIF3 underclocked\n");
if (val & ARIZONA_AIF3_UNDERCLOCKED_STS) if (val & ARIZONA_AIF3_UNDERCLOCKED_STS)
dev_err(arizona->dev, "AIF3 underclocked\n"); dev_err(arizona->dev, "AIF3 underclocked\n");
if (val & ARIZONA_AIF2_UNDERCLOCKED_STS) if (val & ARIZONA_AIF2_UNDERCLOCKED_STS)
dev_err(arizona->dev, "AIF2 underclocked\n");
if (val & ARIZONA_AIF1_UNDERCLOCKED_STS)
dev_err(arizona->dev, "AIF1 underclocked\n"); dev_err(arizona->dev, "AIF1 underclocked\n");
if (val & ARIZONA_ISRC2_UNDERCLOCKED_STS) if (val & ARIZONA_ISRC2_UNDERCLOCKED_STS)
dev_err(arizona->dev, "ISRC2 underclocked\n"); dev_err(arizona->dev, "ISRC2 underclocked\n");
...@@ -415,11 +415,19 @@ int __devinit arizona_dev_init(struct arizona *arizona) ...@@ -415,11 +415,19 @@ int __devinit arizona_dev_init(struct arizona *arizona)
/* If we have a /RESET GPIO we'll already be reset */ /* If we have a /RESET GPIO we'll already be reset */
if (!arizona->pdata.reset) { if (!arizona->pdata.reset) {
regcache_mark_dirty(arizona->regmap);
ret = regmap_write(arizona->regmap, ARIZONA_SOFTWARE_RESET, 0); ret = regmap_write(arizona->regmap, ARIZONA_SOFTWARE_RESET, 0);
if (ret != 0) { if (ret != 0) {
dev_err(dev, "Failed to reset device: %d\n", ret); dev_err(dev, "Failed to reset device: %d\n", ret);
goto err_reset; goto err_reset;
} }
ret = regcache_sync(arizona->regmap);
if (ret != 0) {
dev_err(dev, "Failed to sync device: %d\n", ret);
goto err_reset;
}
} }
ret = arizona_wait_for_boot(arizona); ret = arizona_wait_for_boot(arizona);
...@@ -520,7 +528,7 @@ int __devinit arizona_dev_init(struct arizona *arizona) ...@@ -520,7 +528,7 @@ int __devinit arizona_dev_init(struct arizona *arizona)
break; break;
case WM5110: case WM5110:
ret = mfd_add_devices(arizona->dev, -1, wm5110_devs, ret = mfd_add_devices(arizona->dev, -1, wm5110_devs,
ARRAY_SIZE(wm5102_devs), NULL, 0, NULL); ARRAY_SIZE(wm5110_devs), NULL, 0, NULL);
break; break;
} }
......
...@@ -178,6 +178,7 @@ int arizona_irq_init(struct arizona *arizona) ...@@ -178,6 +178,7 @@ int arizona_irq_init(struct arizona *arizona)
switch (arizona->rev) { switch (arizona->rev) {
case 0: case 0:
case 1:
ctrlif_error = false; ctrlif_error = false;
break; break;
default: default:
......
...@@ -671,7 +671,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base, ...@@ -671,7 +671,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
} }
if (IS_ENABLED(CONFIG_PWM_TWL6030) && twl_class_is_6030()) { if (IS_ENABLED(CONFIG_PWM_TWL6030) && twl_class_is_6030()) {
child = add_child(TWL6030_MODULE_ID1, "twl6030-pwm", NULL, 0, child = add_child(SUB_CHIP_ID1, "twl6030-pwm", NULL, 0,
false, 0, 0); false, 0, 0);
if (IS_ERR(child)) if (IS_ERR(child))
return PTR_ERR(child); return PTR_ERR(child);
......
...@@ -672,7 +672,8 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base) ...@@ -672,7 +672,8 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base)
irq = sih_mod + twl4030_irq_base; irq = sih_mod + twl4030_irq_base;
irq_set_handler_data(irq, agent); irq_set_handler_data(irq, agent);
agent->irq_name = kasprintf(GFP_KERNEL, "twl4030_%s", sih->name); agent->irq_name = kasprintf(GFP_KERNEL, "twl4030_%s", sih->name);
status = request_threaded_irq(irq, NULL, handle_twl4030_sih, 0, status = request_threaded_irq(irq, NULL, handle_twl4030_sih,
IRQF_EARLY_RESUME,
agent->irq_name ?: sih->name, NULL); agent->irq_name ?: sih->name, NULL);
dev_info(dev, "%s (irq %d) chaining IRQs %d..%d\n", sih->name, dev_info(dev, "%s (irq %d) chaining IRQs %d..%d\n", sih->name,
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment