Skip to content

Commit 97ec5fd

Browse files
committed
mfd: atmel-flexcom: use resume_noirq
Flexcom IP embeds 3 other IPs: usart, i2c, spi and selects the operation mode (usart, i2c, spi) via mode register (FLEX_MR). On i2c bus there might be connected critical devices (like PMIC) which on suspend/resume should be suspended/resumed at the end/beginning. i2c uses .suspend_noirq/.resume_noirq for this kind of purposes. Align flexcom to use .resume_noirq as it should be resumed before the embedded IPs. Otherwise the embedded devices might behave badly. Fixes: 7fdec11 ("atmel_flexcom: Support resuming after a chip reset") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
1 parent a052f07 commit 97ec5fd

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/mfd/atmel-flexcom.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static const struct of_device_id atmel_flexcom_of_match[] = {
8787
};
8888
MODULE_DEVICE_TABLE(of, atmel_flexcom_of_match);
8989

90-
static int __maybe_unused atmel_flexcom_resume(struct device *dev)
90+
static int __maybe_unused atmel_flexcom_resume_noirq(struct device *dev)
9191
{
9292
struct atmel_flexcom *ddata = dev_get_drvdata(dev);
9393
int err;
@@ -105,8 +105,9 @@ static int __maybe_unused atmel_flexcom_resume(struct device *dev)
105105
return 0;
106106
}
107107

108-
static SIMPLE_DEV_PM_OPS(atmel_flexcom_pm_ops, NULL,
109-
atmel_flexcom_resume);
108+
static const struct dev_pm_ops atmel_flexcom_pm_ops = {
109+
.resume_noirq = atmel_flexcom_resume_noirq,
110+
};
110111

111112
static struct platform_driver atmel_flexcom_driver = {
112113
.probe = atmel_flexcom_probe,

0 commit comments

Comments
 (0)