Skip to content

Commit 9db6ce4

Browse files
committed
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
2 parents 145f47c + a05a2e7 commit 9db6ce4

File tree

3 files changed

+45
-22
lines changed

3 files changed

+45
-22
lines changed

drivers/mfd/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ config MFD_STA2X11
12461246

12471247
config MFD_SUN6I_PRCM
12481248
bool "Allwinner A31 PRCM controller"
1249-
depends on ARCH_SUNXI
1249+
depends on ARCH_SUNXI || COMPILE_TEST
12501250
select MFD_CORE
12511251
help
12521252
Support for the PRCM (Power/Reset/Clock Management) unit available

drivers/mfd/sprd-sc27xx-spi.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -53,67 +53,67 @@ static const struct sprd_pmic_data sc2731_data = {
5353
static const struct mfd_cell sprd_pmic_devs[] = {
5454
{
5555
.name = "sc27xx-wdt",
56-
.of_compatible = "sprd,sc27xx-wdt",
56+
.of_compatible = "sprd,sc2731-wdt",
5757
}, {
5858
.name = "sc27xx-rtc",
59-
.of_compatible = "sprd,sc27xx-rtc",
59+
.of_compatible = "sprd,sc2731-rtc",
6060
}, {
6161
.name = "sc27xx-charger",
62-
.of_compatible = "sprd,sc27xx-charger",
62+
.of_compatible = "sprd,sc2731-charger",
6363
}, {
6464
.name = "sc27xx-chg-timer",
65-
.of_compatible = "sprd,sc27xx-chg-timer",
65+
.of_compatible = "sprd,sc2731-chg-timer",
6666
}, {
6767
.name = "sc27xx-fast-chg",
68-
.of_compatible = "sprd,sc27xx-fast-chg",
68+
.of_compatible = "sprd,sc2731-fast-chg",
6969
}, {
7070
.name = "sc27xx-chg-wdt",
71-
.of_compatible = "sprd,sc27xx-chg-wdt",
71+
.of_compatible = "sprd,sc2731-chg-wdt",
7272
}, {
7373
.name = "sc27xx-typec",
74-
.of_compatible = "sprd,sc27xx-typec",
74+
.of_compatible = "sprd,sc2731-typec",
7575
}, {
7676
.name = "sc27xx-flash",
77-
.of_compatible = "sprd,sc27xx-flash",
77+
.of_compatible = "sprd,sc2731-flash",
7878
}, {
7979
.name = "sc27xx-eic",
80-
.of_compatible = "sprd,sc27xx-eic",
80+
.of_compatible = "sprd,sc2731-eic",
8181
}, {
8282
.name = "sc27xx-efuse",
83-
.of_compatible = "sprd,sc27xx-efuse",
83+
.of_compatible = "sprd,sc2731-efuse",
8484
}, {
8585
.name = "sc27xx-thermal",
86-
.of_compatible = "sprd,sc27xx-thermal",
86+
.of_compatible = "sprd,sc2731-thermal",
8787
}, {
8888
.name = "sc27xx-adc",
89-
.of_compatible = "sprd,sc27xx-adc",
89+
.of_compatible = "sprd,sc2731-adc",
9090
}, {
9191
.name = "sc27xx-audio-codec",
92-
.of_compatible = "sprd,sc27xx-audio-codec",
92+
.of_compatible = "sprd,sc2731-audio-codec",
9393
}, {
9494
.name = "sc27xx-regulator",
95-
.of_compatible = "sprd,sc27xx-regulator",
95+
.of_compatible = "sprd,sc2731-regulator",
9696
}, {
9797
.name = "sc27xx-vibrator",
98-
.of_compatible = "sprd,sc27xx-vibrator",
98+
.of_compatible = "sprd,sc2731-vibrator",
9999
}, {
100100
.name = "sc27xx-keypad-led",
101-
.of_compatible = "sprd,sc27xx-keypad-led",
101+
.of_compatible = "sprd,sc2731-keypad-led",
102102
}, {
103103
.name = "sc27xx-bltc",
104-
.of_compatible = "sprd,sc27xx-bltc",
104+
.of_compatible = "sprd,sc2731-bltc",
105105
}, {
106106
.name = "sc27xx-fgu",
107-
.of_compatible = "sprd,sc27xx-fgu",
107+
.of_compatible = "sprd,sc2731-fgu",
108108
}, {
109109
.name = "sc27xx-7sreset",
110-
.of_compatible = "sprd,sc27xx-7sreset",
110+
.of_compatible = "sprd,sc2731-7sreset",
111111
}, {
112112
.name = "sc27xx-poweroff",
113-
.of_compatible = "sprd,sc27xx-poweroff",
113+
.of_compatible = "sprd,sc2731-poweroff",
114114
}, {
115115
.name = "sc27xx-syscon",
116-
.of_compatible = "sprd,sc27xx-syscon",
116+
.of_compatible = "sprd,sc2731-syscon",
117117
},
118118
};
119119

drivers/mfd/twl-core.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,6 +1245,28 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
12451245
return status;
12461246
}
12471247

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+
12481270
static const struct i2c_device_id twl_ids[] = {
12491271
{ "twl4030", TWL4030_VAUX2 }, /* "Triton 2" */
12501272
{ "twl5030", 0 }, /* T2 updated */
@@ -1262,6 +1284,7 @@ static const struct i2c_device_id twl_ids[] = {
12621284
/* One Client Driver , 4 Clients */
12631285
static struct i2c_driver twl_driver = {
12641286
.driver.name = DRIVER_NAME,
1287+
.driver.pm = &twl_dev_pm_ops,
12651288
.id_table = twl_ids,
12661289
.probe = twl_probe,
12671290
.remove = twl_remove,

0 commit comments

Comments
 (0)