]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: i801: Restore INTREN on unload
authorJean Delvare <jdelvare@suse.de>
Tue, 9 Nov 2021 15:02:57 +0000 (16:02 +0100)
committerWolfram Sang <wsa@kernel.org>
Tue, 23 Nov 2021 09:43:50 +0000 (10:43 +0100)
commitbc04110c864756d7b69ad6c5d861f17acc36122f
tree31aca0273b5c2d8e0dd3cfa6904fda50d3844ae8
parent593ad171bfb0c7af2be7d8e97d52b08a31f0bd4b
i2c: i801: Restore INTREN on unload

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@suse.de>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-i801.c