Re: [PATCH] i2c: i801: Restore INTREN on unload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/9/21 5:02 PM, Jean Delvare wrote:
If driver interrupts are enabled, SMBHSTCNT_INTREN will be 1 after
the first transaction, and will stay to that value forever. This
means that interrupts will be generated for both host-initiated
transactions and also SMBus Alert events even after the driver is
unloaded. To be on the safe side, we should restore the initial state
of this bit at suspend and reboot time, as we do for several other
configuration bits already and for the same reason: the BIOS should
be handed the device in the same configuration state in which we
received it. Otherwise interrupts may be generated which nobody
will process.

Signed-off-by: Jean Delvare <jdelvare@xxxxxxx>
Tested-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>
---
This probably doesn't change much on its own in practice, however it
is mandatory to make this change before Jarkko's fix for the SMB_ALERT
interrupt storm gets applied, otherwise the fix will be incomplete.

Jarkko, this is not exactly the patch you tested, I added restoration
to the suspend path as well to be 100% safe.

Same Tested-by holds here.

We have one laptop with RMI4 SMBus connected touchpad and trackpad. I wanted to check it does the suspend path here cease them to not work but they work after your patch.

Now we restore INTREN on suspend but do not explicitly enable it after resume. I didn't fully get how RMI4 stack resumes but perhaps they will do some power on, reset, etc command transaction and that gets the INTREN enabled and allow host notify.

Jarkko



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux