Message ID | 20240102-j7200-pcie-s2r-v5-1-4b8c46711ded@bootlin.com |
---|---|
State | Superseded |
Headers | show |
Series | Add suspend to ram support for PCIe on J7200 | expand |
Hi Thomas, On Tue, Apr 23, 2024 at 12:53 PM Thomas Richard <thomas.richard@bootlin.com> wrote: > On 4/23/24 12:34, Andy Shevchenko wrote: > > On Tue, Apr 23, 2024 at 12:42 PM Geert Uytterhoeven > > <geert@linux-m68k.org> wrote: > >> On Tue, Apr 16, 2024 at 3:31 PM Thomas Richard > >> <thomas.richard@bootlin.com> wrote: > > > > ... > > > >> +i2c-rcar e66d8000.i2c: error -16 : 10000005 > > > > It probably means that I²C host controller is already in power off > > mode and can't serve anymore. > > Yes the i2c controller is already off. > In fact it's the same issue I had with the i2c-omap driver. > In suspend-noirq, the runtime pm is disabled, so you can't wakeup a > device. More details available in this thread [1]. > So the trick is to wakeup the device during suspend (like I did for the > i2c-omap driver [2]. > > [1] > https://lore.kernel.org/all/f68c9a54-0fde-4709-9d2f-0d23a049341b@bootlin.com/ > [2] > https://lore.kernel.org/all/20240102-j7200-pcie-s2r-v5-2-4b8c46711ded@bootlin.com/ > > I think the patch below should fix the issue. Thanks, I gave that a try, but it doesn't make any difference. Gr{oetje,eeting}s, Geert
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 00ffa168e405..6e495fc67a93 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -1234,7 +1234,7 @@ static void pca953x_save_context(struct pca953x_chip *chip) regcache_cache_only(chip->regmap, true); } -static int pca953x_suspend(struct device *dev) +static int pca953x_suspend_noirq(struct device *dev) { struct pca953x_chip *chip = dev_get_drvdata(dev); @@ -1248,7 +1248,7 @@ static int pca953x_suspend(struct device *dev) return 0; } -static int pca953x_resume(struct device *dev) +static int pca953x_resume_noirq(struct device *dev) { struct pca953x_chip *chip = dev_get_drvdata(dev); int ret; @@ -1268,7 +1268,8 @@ static int pca953x_resume(struct device *dev) return ret; } -static DEFINE_SIMPLE_DEV_PM_OPS(pca953x_pm_ops, pca953x_suspend, pca953x_resume); +static DEFINE_NOIRQ_DEV_PM_OPS(pca953x_pm_ops, + pca953x_suspend_noirq, pca953x_resume_noirq); /* convenience to stop overlong match-table lines */ #define OF_653X(__nrgpio, __int) ((void *)(__nrgpio | PCAL653X_TYPE | __int))