- Bug Fixes

- Fix failed reads due to enabled IRQs when suspended; twl-core
    - Fix driver	registration when using	DT; sprd-sc27xx-spi
    - Fix `make allyesconfig` on	x86_64;	SUN6I_PRCM
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAlylz7oACgkQUa+KL4f8
 d2Hb9A/7ByIAS5N/N6vp0g3PZLHnIikb8hOeva6SCZHzM5wTlw5F2x+evn6tmVaG
 euXyek3EvHGCP8S92Ccj6aF01xEmA7xbCFzt22lhzmd6jplkyJhS84nt7S1E7spi
 FcZRWf2pTMyz4t5tXf4weqLnSBnianBmXBZr7xSMvEMcaRXMKn3/SiasMnmLjE83
 Uyv522tSa8s4sASOp0yGKGuPmxJHR1wbb41SIwSQnPfBohVEqBamaO6hMIxvRqwz
 Dl+ns6n1mXPvSAMS4WTmi7YUHwZTOdCwGMBhX0a2z66dqKgHBeJajCB9r+aCmnny
 WON0y9axqUdcal6XZcLfgPQQiNvKs2pAzBmNZaZEVjtyHDCM5vuFL0hmqnFrRqM7
 i1/SbVT6SIiNJAEoi4LrssDPRKwpR9Z4OvAWEGVsCWtWREMfya30MP2n5048FnXc
 88j+kuTumjgH0TTKnU7ls+Oqok3e6hAR/waEvgxG2IiT9T1d3u8UwqrWrCYA2y2i
 9k1qO9D2989wTs+9YmIk4/94SIgJvLvAOh5USEhfuAEoHHSO1kKdiW/8EWei68u2
 XfpX3kZQYny6q39Ia2dhTUaFpa7g6g142dzCK94M/iM/73UHszp5qpE50XvbFv6W
 6rAGJbk9Wo9hVWOT+tZwxTqIVEGCbkBOx9R3gbF1V2FowTBzmJM=
 =Sa3v
 -----END PGP SIGNATURE-----

Merge tag 'mfd-fixes-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull mfd fixes from Lee Jones:

 - Fix failed reads due to enabled IRQs when suspended; twl-core

 - Fix driver registration when using DT; sprd-sc27xx-spi

 - Fix `make allyesconfig` on x86_64; SUN6I_PRCM

* tag 'mfd-fixes-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
  mfd: sun6i-prcm: Allow to compile with COMPILE_TEST
  mfd: sc27xx: Use SoC compatible string for PMIC devices
  mfd: twl-core: Disable IRQ while suspended
This commit is contained in:
Linus Torvalds 2019-04-04 14:42:47 -10:00
commit 9db6ce4ece
3 changed files with 45 additions and 22 deletions

View File

@ -1246,7 +1246,7 @@ config MFD_STA2X11
config MFD_SUN6I_PRCM
bool "Allwinner A31 PRCM controller"
depends on ARCH_SUNXI
depends on ARCH_SUNXI || COMPILE_TEST
select MFD_CORE
help
Support for the PRCM (Power/Reset/Clock Management) unit available

View File

@ -53,67 +53,67 @@ static const struct sprd_pmic_data sc2731_data = {
static const struct mfd_cell sprd_pmic_devs[] = {
{
.name = "sc27xx-wdt",
.of_compatible = "sprd,sc27xx-wdt",
.of_compatible = "sprd,sc2731-wdt",
}, {
.name = "sc27xx-rtc",
.of_compatible = "sprd,sc27xx-rtc",
.of_compatible = "sprd,sc2731-rtc",
}, {
.name = "sc27xx-charger",
.of_compatible = "sprd,sc27xx-charger",
.of_compatible = "sprd,sc2731-charger",
}, {
.name = "sc27xx-chg-timer",
.of_compatible = "sprd,sc27xx-chg-timer",
.of_compatible = "sprd,sc2731-chg-timer",
}, {
.name = "sc27xx-fast-chg",
.of_compatible = "sprd,sc27xx-fast-chg",
.of_compatible = "sprd,sc2731-fast-chg",
}, {
.name = "sc27xx-chg-wdt",
.of_compatible = "sprd,sc27xx-chg-wdt",
.of_compatible = "sprd,sc2731-chg-wdt",
}, {
.name = "sc27xx-typec",
.of_compatible = "sprd,sc27xx-typec",
.of_compatible = "sprd,sc2731-typec",
}, {
.name = "sc27xx-flash",
.of_compatible = "sprd,sc27xx-flash",
.of_compatible = "sprd,sc2731-flash",
}, {
.name = "sc27xx-eic",
.of_compatible = "sprd,sc27xx-eic",
.of_compatible = "sprd,sc2731-eic",
}, {
.name = "sc27xx-efuse",
.of_compatible = "sprd,sc27xx-efuse",
.of_compatible = "sprd,sc2731-efuse",
}, {
.name = "sc27xx-thermal",
.of_compatible = "sprd,sc27xx-thermal",
.of_compatible = "sprd,sc2731-thermal",
}, {
.name = "sc27xx-adc",
.of_compatible = "sprd,sc27xx-adc",
.of_compatible = "sprd,sc2731-adc",
}, {
.name = "sc27xx-audio-codec",
.of_compatible = "sprd,sc27xx-audio-codec",
.of_compatible = "sprd,sc2731-audio-codec",
}, {
.name = "sc27xx-regulator",
.of_compatible = "sprd,sc27xx-regulator",
.of_compatible = "sprd,sc2731-regulator",
}, {
.name = "sc27xx-vibrator",
.of_compatible = "sprd,sc27xx-vibrator",
.of_compatible = "sprd,sc2731-vibrator",
}, {
.name = "sc27xx-keypad-led",
.of_compatible = "sprd,sc27xx-keypad-led",
.of_compatible = "sprd,sc2731-keypad-led",
}, {
.name = "sc27xx-bltc",
.of_compatible = "sprd,sc27xx-bltc",
.of_compatible = "sprd,sc2731-bltc",
}, {
.name = "sc27xx-fgu",
.of_compatible = "sprd,sc27xx-fgu",
.of_compatible = "sprd,sc2731-fgu",
}, {
.name = "sc27xx-7sreset",
.of_compatible = "sprd,sc27xx-7sreset",
.of_compatible = "sprd,sc2731-7sreset",
}, {
.name = "sc27xx-poweroff",
.of_compatible = "sprd,sc27xx-poweroff",
.of_compatible = "sprd,sc2731-poweroff",
}, {
.name = "sc27xx-syscon",
.of_compatible = "sprd,sc27xx-syscon",
.of_compatible = "sprd,sc2731-syscon",
},
};

View File

@ -1245,6 +1245,28 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
return status;
}
static int __maybe_unused twl_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
if (client->irq)
disable_irq(client->irq);
return 0;
}
static int __maybe_unused twl_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
if (client->irq)
enable_irq(client->irq);
return 0;
}
static SIMPLE_DEV_PM_OPS(twl_dev_pm_ops, twl_suspend, twl_resume);
static const struct i2c_device_id twl_ids[] = {
{ "twl4030", TWL4030_VAUX2 }, /* "Triton 2" */
{ "twl5030", 0 }, /* T2 updated */
@ -1262,6 +1284,7 @@ static const struct i2c_device_id twl_ids[] = {
/* One Client Driver , 4 Clients */
static struct i2c_driver twl_driver = {
.driver.name = DRIVER_NAME,
.driver.pm = &twl_dev_pm_ops,
.id_table = twl_ids,
.probe = twl_probe,
.remove = twl_remove,