diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-04 20:42:47 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-04 20:42:47 -0400 |
| commit | 9db6ce4ecefb03698cb2875c1a46b9513303a9bf (patch) | |
| tree | 2060885d960edecca2a23c85b070f91e2e8cbba2 | |
| parent | 145f47c7381d43c789cbad55d4dbfd28fc6c46a4 (diff) | |
| parent | a05a2e7998ab1badcf80aed47b5313934fd131fa (diff) | |
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
| -rw-r--r-- | drivers/mfd/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/mfd/sprd-sc27xx-spi.c | 42 | ||||
| -rw-r--r-- | drivers/mfd/twl-core.c | 23 |
3 files changed, 45 insertions, 22 deletions
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 0ce2d8dfc5f1..26ad6468d13a 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
| @@ -1246,7 +1246,7 @@ config MFD_STA2X11 | |||
| 1246 | 1246 | ||
| 1247 | config MFD_SUN6I_PRCM | 1247 | config MFD_SUN6I_PRCM |
| 1248 | bool "Allwinner A31 PRCM controller" | 1248 | bool "Allwinner A31 PRCM controller" |
| 1249 | depends on ARCH_SUNXI | 1249 | depends on ARCH_SUNXI || COMPILE_TEST |
| 1250 | select MFD_CORE | 1250 | select MFD_CORE |
| 1251 | help | 1251 | help |
| 1252 | Support for the PRCM (Power/Reset/Clock Management) unit available | 1252 | Support for the PRCM (Power/Reset/Clock Management) unit available |
diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c index 69df27769c21..43ac71691fe4 100644 --- a/drivers/mfd/sprd-sc27xx-spi.c +++ b/drivers/mfd/sprd-sc27xx-spi.c | |||
| @@ -53,67 +53,67 @@ static const struct sprd_pmic_data sc2731_data = { | |||
| 53 | static const struct mfd_cell sprd_pmic_devs[] = { | 53 | static const struct mfd_cell sprd_pmic_devs[] = { |
| 54 | { | 54 | { |
| 55 | .name = "sc27xx-wdt", | 55 | .name = "sc27xx-wdt", |
| 56 | .of_compatible = "sprd,sc27xx-wdt", | 56 | .of_compatible = "sprd,sc2731-wdt", |
| 57 | }, { | 57 | }, { |
| 58 | .name = "sc27xx-rtc", | 58 | .name = "sc27xx-rtc", |
| 59 | .of_compatible = "sprd,sc27xx-rtc", | 59 | .of_compatible = "sprd,sc2731-rtc", |
| 60 | }, { | 60 | }, { |
| 61 | .name = "sc27xx-charger", | 61 | .name = "sc27xx-charger", |
| 62 | .of_compatible = "sprd,sc27xx-charger", | 62 | .of_compatible = "sprd,sc2731-charger", |
| 63 | }, { | 63 | }, { |
| 64 | .name = "sc27xx-chg-timer", | 64 | .name = "sc27xx-chg-timer", |
| 65 | .of_compatible = "sprd,sc27xx-chg-timer", | 65 | .of_compatible = "sprd,sc2731-chg-timer", |
| 66 | }, { | 66 | }, { |
| 67 | .name = "sc27xx-fast-chg", | 67 | .name = "sc27xx-fast-chg", |
| 68 | .of_compatible = "sprd,sc27xx-fast-chg", | 68 | .of_compatible = "sprd,sc2731-fast-chg", |
| 69 | }, { | 69 | }, { |
| 70 | .name = "sc27xx-chg-wdt", | 70 | .name = "sc27xx-chg-wdt", |
| 71 | .of_compatible = "sprd,sc27xx-chg-wdt", | 71 | .of_compatible = "sprd,sc2731-chg-wdt", |
| 72 | }, { | 72 | }, { |
| 73 | .name = "sc27xx-typec", | 73 | .name = "sc27xx-typec", |
| 74 | .of_compatible = "sprd,sc27xx-typec", | 74 | .of_compatible = "sprd,sc2731-typec", |
| 75 | }, { | 75 | }, { |
| 76 | .name = "sc27xx-flash", | 76 | .name = "sc27xx-flash", |
| 77 | .of_compatible = "sprd,sc27xx-flash", | 77 | .of_compatible = "sprd,sc2731-flash", |
| 78 | }, { | 78 | }, { |
| 79 | .name = "sc27xx-eic", | 79 | .name = "sc27xx-eic", |
| 80 | .of_compatible = "sprd,sc27xx-eic", | 80 | .of_compatible = "sprd,sc2731-eic", |
| 81 | }, { | 81 | }, { |
| 82 | .name = "sc27xx-efuse", | 82 | .name = "sc27xx-efuse", |
| 83 | .of_compatible = "sprd,sc27xx-efuse", | 83 | .of_compatible = "sprd,sc2731-efuse", |
| 84 | }, { | 84 | }, { |
| 85 | .name = "sc27xx-thermal", | 85 | .name = "sc27xx-thermal", |
| 86 | .of_compatible = "sprd,sc27xx-thermal", | 86 | .of_compatible = "sprd,sc2731-thermal", |
| 87 | }, { | 87 | }, { |
| 88 | .name = "sc27xx-adc", | 88 | .name = "sc27xx-adc", |
| 89 | .of_compatible = "sprd,sc27xx-adc", | 89 | .of_compatible = "sprd,sc2731-adc", |
| 90 | }, { | 90 | }, { |
| 91 | .name = "sc27xx-audio-codec", | 91 | .name = "sc27xx-audio-codec", |
| 92 | .of_compatible = "sprd,sc27xx-audio-codec", | 92 | .of_compatible = "sprd,sc2731-audio-codec", |
| 93 | }, { | 93 | }, { |
| 94 | .name = "sc27xx-regulator", | 94 | .name = "sc27xx-regulator", |
| 95 | .of_compatible = "sprd,sc27xx-regulator", | 95 | .of_compatible = "sprd,sc2731-regulator", |
| 96 | }, { | 96 | }, { |
| 97 | .name = "sc27xx-vibrator", | 97 | .name = "sc27xx-vibrator", |
| 98 | .of_compatible = "sprd,sc27xx-vibrator", | 98 | .of_compatible = "sprd,sc2731-vibrator", |
| 99 | }, { | 99 | }, { |
| 100 | .name = "sc27xx-keypad-led", | 100 | .name = "sc27xx-keypad-led", |
| 101 | .of_compatible = "sprd,sc27xx-keypad-led", | 101 | .of_compatible = "sprd,sc2731-keypad-led", |
| 102 | }, { | 102 | }, { |
| 103 | .name = "sc27xx-bltc", | 103 | .name = "sc27xx-bltc", |
| 104 | .of_compatible = "sprd,sc27xx-bltc", | 104 | .of_compatible = "sprd,sc2731-bltc", |
| 105 | }, { | 105 | }, { |
| 106 | .name = "sc27xx-fgu", | 106 | .name = "sc27xx-fgu", |
| 107 | .of_compatible = "sprd,sc27xx-fgu", | 107 | .of_compatible = "sprd,sc2731-fgu", |
| 108 | }, { | 108 | }, { |
| 109 | .name = "sc27xx-7sreset", | 109 | .name = "sc27xx-7sreset", |
| 110 | .of_compatible = "sprd,sc27xx-7sreset", | 110 | .of_compatible = "sprd,sc2731-7sreset", |
| 111 | }, { | 111 | }, { |
| 112 | .name = "sc27xx-poweroff", | 112 | .name = "sc27xx-poweroff", |
| 113 | .of_compatible = "sprd,sc27xx-poweroff", | 113 | .of_compatible = "sprd,sc2731-poweroff", |
| 114 | }, { | 114 | }, { |
| 115 | .name = "sc27xx-syscon", | 115 | .name = "sc27xx-syscon", |
| 116 | .of_compatible = "sprd,sc27xx-syscon", | 116 | .of_compatible = "sprd,sc2731-syscon", |
| 117 | }, | 117 | }, |
| 118 | }; | 118 | }; |
| 119 | 119 | ||
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 299016bc46d9..104477b512a2 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c | |||
| @@ -1245,6 +1245,28 @@ free: | |||
| 1245 | return status; | 1245 | return status; |
| 1246 | } | 1246 | } |
| 1247 | 1247 | ||
| 1248 | static int __maybe_unused twl_suspend(struct device *dev) | ||
| 1249 | { | ||
| 1250 | struct i2c_client *client = to_i2c_client(dev); | ||
| 1251 | |||
| 1252 | if (client->irq) | ||
| 1253 | disable_irq(client->irq); | ||
| 1254 | |||
| 1255 | return 0; | ||
| 1256 | } | ||
| 1257 | |||
| 1258 | static int __maybe_unused twl_resume(struct device *dev) | ||
| 1259 | { | ||
| 1260 | struct i2c_client *client = to_i2c_client(dev); | ||
| 1261 | |||
| 1262 | if (client->irq) | ||
| 1263 | enable_irq(client->irq); | ||
| 1264 | |||
| 1265 | return 0; | ||
| 1266 | } | ||
| 1267 | |||
| 1268 | static SIMPLE_DEV_PM_OPS(twl_dev_pm_ops, twl_suspend, twl_resume); | ||
| 1269 | |||
| 1248 | static const struct i2c_device_id twl_ids[] = { | 1270 | static const struct i2c_device_id twl_ids[] = { |
| 1249 | { "twl4030", TWL4030_VAUX2 }, /* "Triton 2" */ | 1271 | { "twl4030", TWL4030_VAUX2 }, /* "Triton 2" */ |
| 1250 | { "twl5030", 0 }, /* T2 updated */ | 1272 | { "twl5030", 0 }, /* T2 updated */ |
| @@ -1262,6 +1284,7 @@ static const struct i2c_device_id twl_ids[] = { | |||
| 1262 | /* One Client Driver , 4 Clients */ | 1284 | /* One Client Driver , 4 Clients */ |
| 1263 | static struct i2c_driver twl_driver = { | 1285 | static struct i2c_driver twl_driver = { |
| 1264 | .driver.name = DRIVER_NAME, | 1286 | .driver.name = DRIVER_NAME, |
| 1287 | .driver.pm = &twl_dev_pm_ops, | ||
| 1265 | .id_table = twl_ids, | 1288 | .id_table = twl_ids, |
| 1266 | .probe = twl_probe, | 1289 | .probe = twl_probe, |
| 1267 | .remove = twl_remove, | 1290 | .remove = twl_remove, |
