]> git.hungrycats.org Git - linux/commit
drm/xe/i2c: Keep the i2c controller always enabled
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tue, 11 Aug 2026 12:10:08 +0000 (14:10 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 27 Aug 2026 16:00:17 +0000 (12:00 -0400)
commit244abef7f280a6a84297bfab5fd2e77147bc419a
treeca22aa0a9e3eb25312a09480aceea23fd5ae5b70
parentf43fa4b8522ba6038b77e86e5f0d94be35effcde
drm/xe/i2c: Keep the i2c controller always enabled

Some platforms make an assumption that the i2c controller's
enabled state indicates also the power state of the
controller. This can create a problem when the controller is
in disabled state, because the hardware may assume
incorrectly that it is then also in low-power state.

To fix this, the controller is kept enabled by taking over
the IC_ENABLE register. The controller has to be disabled
when the configuration is updated and when the target
address or the slave address are assigned, so disabling it
when IC_CON, IC_TAR or IC_SAR registers are programmed, and
then re-enabling it again.

Fixes: f0e53aadd702 ("drm/xe: Support for I2C attached MCUs")
Cc: stable@vger.kernel.org
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patch.msgid.link/20260811121008.1493015-4-heikki.krogerus@linux.intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
(cherry picked from commit 76cc14e2faed1adae20f4ee144ead0e3a7566c49)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_i2c.c
drivers/gpu/drm/xe/xe_i2c.h