Skip to content

Commit

Permalink
Merge tag 'mfd-fixes-4.2' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/lee/mfd

Pull MFD fixes from Lee Jones:
 - fix dependency issues on ChromeOS platforms
 - fix runtime PM issues on Arizona
 - fix IRQ/suspend race on Arizona

* tag 'mfd-fixes-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
  mfd: Remove MFD_CROS_EC_SPI depends on OF
  platform/chrome: Don't make CHROME_PLATFORMS depends on X86 || ARM
  mfd: arizona: Fix initialisation of the PM runtime
  mfd: arizona: Fix race between runtime suspend and IRQs
  • Loading branch information
Linus Torvalds committed Aug 10, 2015
2 parents 016a9f5 + fb9caee commit 2b9bea0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion drivers/mfd/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ config MFD_CROS_EC_I2C

config MFD_CROS_EC_SPI
tristate "ChromeOS Embedded Controller (SPI)"
depends on MFD_CROS_EC && CROS_EC_PROTO && SPI && OF
depends on MFD_CROS_EC && CROS_EC_PROTO && SPI

---help---
If you say Y here, you get support for talking to the ChromeOS EC
Expand Down
16 changes: 7 additions & 9 deletions drivers/mfd/arizona-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ static int arizona_runtime_suspend(struct device *dev)

arizona->has_fully_powered_off = true;

disable_irq(arizona->irq);
disable_irq_nosync(arizona->irq);
arizona_enable_reset(arizona);
regulator_bulk_disable(arizona->num_core_supplies,
arizona->core_supplies);
Expand Down Expand Up @@ -1141,10 +1141,6 @@ int arizona_dev_init(struct arizona *arizona)
arizona->pdata.gpio_defaults[i]);
}

pm_runtime_set_autosuspend_delay(arizona->dev, 100);
pm_runtime_use_autosuspend(arizona->dev);
pm_runtime_enable(arizona->dev);

/* Chip default */
if (!arizona->pdata.clk32k_src)
arizona->pdata.clk32k_src = ARIZONA_32KZ_MCLK2;
Expand Down Expand Up @@ -1245,11 +1241,17 @@ int arizona_dev_init(struct arizona *arizona)
arizona->pdata.spk_fmt[i]);
}

pm_runtime_set_active(arizona->dev);
pm_runtime_enable(arizona->dev);

/* Set up for interrupts */
ret = arizona_irq_init(arizona);
if (ret != 0)
goto err_reset;

pm_runtime_set_autosuspend_delay(arizona->dev, 100);
pm_runtime_use_autosuspend(arizona->dev);

arizona_request_irq(arizona, ARIZONA_IRQ_CLKGEN_ERR, "CLKGEN error",
arizona_clkgen_err, arizona);
arizona_request_irq(arizona, ARIZONA_IRQ_OVERCLOCKED, "Overclocked",
Expand Down Expand Up @@ -1278,10 +1280,6 @@ int arizona_dev_init(struct arizona *arizona)
goto err_irq;
}

#ifdef CONFIG_PM
regulator_disable(arizona->dcvdd);
#endif

return 0;

err_irq:
Expand Down
1 change: 0 additions & 1 deletion drivers/platform/chrome/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

menuconfig CHROME_PLATFORMS
bool "Platform support for Chrome hardware"
depends on X86 || ARM
---help---
Say Y here to get to see options for platform support for
various Chromebooks and Chromeboxes. This option alone does
Expand Down

0 comments on commit 2b9bea0

Please sign in to comment.