OSDN Git Service

i2c: designware: Do not process interrupt when device is suspended
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Mon, 7 Nov 2022 13:42:43 +0000 (15:42 +0200)
committerWolfram Sang <wsa@kernel.org>
Sat, 12 Nov 2022 06:37:49 +0000 (07:37 +0100)
commitcdbd2f169bf1aff9f679a3e07d62244fc4341968
treed33d5d998f3cb42eb2f4dfe4cf4758c0d53cf4ec
parent4c7107c2974270ff369342f6f1bd5d3669c182f1
i2c: designware: Do not process interrupt when device is suspended

Do not return with interrupt handled if host controller is off and thus
interrupt is originating from other device or is spurious.

Add a check to detect when controller is runtime suspended or
transitioning/reset. In latter case all raw interrupt status register
bits may read one. In both cases return IRQ_NONE to indicate interrupt
was not from this device.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-designware-master.c