]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i2c: tda998x: allow sharing of the CEC device accesses
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 3 Nov 2016 10:16:17 +0000 (10:16 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Fri, 18 Nov 2016 00:00:40 +0000 (00:00 +0000)
commit14e5b5889d75894b633a393aff49d6583bce3b0d
treec698fd05f6a179816289a984e5be70c9166c7639
parentae81553c30ef86305048fcac379b8b16b71d3099
drm/i2c: tda998x: allow sharing of the CEC device accesses

cec_read() is non-atomic in the presence of other I2C bus transactions
to the same device.  This presents a problem when we add support for
the TDA9950 CEC engine part - both drivers can be trying to access the
device.

Avoid the inherent problems by switching to i2c_transfer() instead,
which allows us to perform more than one bus transaction atomically.

As this means we will be using I2C transactions rather than SMBUS, we
have to check that the host supports I2C functionality.

Tested-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
drivers/gpu/drm/i2c/tda998x_drv.c