Hi Marek, On Sun, Dec 2, 2018 at 8:36 PM Marek Vasut <marek.vasut@xxxxxxxxx> wrote: > It is possible that the PCA953x is powered down during suspend. > Use regmap cache to assure the registers in the PCA953x are in > line with the driver state after resume. > > Signed-off-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxx> Thanks for your series! Background info: the main motivation for this series is to make sure SATA keeps working after system suspend/resume on the Salvator-XS development board, where the SATA functionality is configured using a gpio hog. With your series applied, the SATA link seems to be functional after resume. Dmesg difference: ata1: link resume succeeded after 1 retries -ata1: SATA link down (SStatus 0 SControl 300) -ata1: link resume succeeded after 1 retries -ata1: SATA link down (SStatus 0 SControl 300) -ata1: link resume succeeded after 1 retries -ata1: SATA link down (SStatus 0 SControl 300) -ata1.00: disabled -sd 0:0:0:0: rejecting I/O to offline device +ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300) +ata1.00: configured for UDMA/133 However, when trying to read from an attached hard drive, it fails: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen ata1.00: failed command: READ DMA ata1.00: cmd c8/00:20:00:00:00/00:00:00:00:00/e0 tag 0 dma 16384 in res 40/00:00:01:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout) ata1.00: status: { DRDY } ata1: hard resetting link ata1: link resume succeeded after 1 retries ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata1.00: configured for UDMA/133 sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08 sd 0:0:0:0: [sda] tag#0 Sense Key : 0x5 [current] sd 0:0:0:0: [sda] tag#0 ASC=0x21 ASCQ=0x4 sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 20 00 print_req_error: I/O error, dev sda, sector 0 ata1: EH complete ... Buffer I/O error on dev sda, logical block 0, async page read Does SATA work for you after resume! This could still be an issue in the sata_rcar driver. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds