]> 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)
commited47508a96a101b70c3a81ab01f63d7b6bb6d7e5
tree31aca0273b5c2d8e0dd3cfa6904fda50d3844ae8
parent0e353c3f93551024795e88d97a26850274771e98
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