]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING
authorAkinobu Mita <akinobu.mita@gmail.com>
Sun, 6 May 2018 14:19:18 +0000 (10:19 -0400)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:51:42 +0000 (19:51 -0600)
commit811b02e331956a1d5942d6b1fa5c8dc758443934
tree1c35876025003f6a751bf690b3387a23744273ae
parentacdce4fd9f5c820cbe5e3263edd345ce34a6fa02
media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING

BugLink: https://bugs.launchpad.net/bugs/1836287
[ Upstream commit 0b964d183cbf3f95a062ad9f3eec87ffa2790558 ]

The ov772x driver only works when the i2c controller have
I2C_FUNC_PROTOCOL_MANGLING.  However, many i2c controller drivers don't
support it.

The reason that the ov772x requires I2C_FUNC_PROTOCOL_MANGLING is that
it doesn't support repeated starts.

This changes the reading ov772x register method so that it doesn't
require I2C_FUNC_PROTOCOL_MANGLING by calling two separated i2c messages.

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/i2c/soc_camera/ov772x.c