[PATCH -next v4 0/3] introduce SCCB regmap

From: Akinobu Mita
Date: Mon Jul 16 2018 - 11:48:12 EST


This patchset introduces Serial Camera Control Bus (SCCB) support for
regmap API and convert ov772x and ov9650 drivers to use it.

This patchset was previously submitted as "introduce SCCB helpers"
that provides three functions (sccb_is_available, sccb_read_byte, and
sccb_write_byte). This time, the helpers are replaced by regmap API,
but internal code is not much changed from the previous version.

* v4
- Introduce SCCB regmap instead of helper functions,
suggested by Sebastian Reichel
- Change ov772x driver to use regmap instead of helper functions
- Add register access conversion for ov9650 driver

* v3
- Rewrite the helpers based on the code provided by Wolfram
- Convert ov772x driver to use SCCB helpers

v2
- Convert all helpers into static inline functions, and remove C source
and Kconfig option.
- Acquire i2c adapter lock while issuing two requests for sccb_read_byte

Akinobu Mita (3):
regmap: add SCCB support
media: ov772x: use SCCB regmap
media: ov9650: use SCCB regmap

drivers/base/regmap/Kconfig | 4 +
drivers/base/regmap/Makefile | 1 +
drivers/base/regmap/regmap-sccb.c | 128 +++++++++++++++++++++++++
drivers/media/i2c/Kconfig | 2 +
drivers/media/i2c/ov772x.c | 192 ++++++++++++++++----------------------
drivers/media/i2c/ov9650.c | 157 +++++++++++++++----------------
include/linux/regmap.h | 35 +++++++
7 files changed, 326 insertions(+), 193 deletions(-)
create mode 100644 drivers/base/regmap/regmap-sccb.c

Cc: Mark Brown <broonie@xxxxxxxxxx>
Cc: Peter Rosin <peda@xxxxxxxxxx>
Cc: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxxxx>
Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx>
Cc: Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx>
Cc: Jacopo Mondi <jacopo+renesas@xxxxxxxxxx>
Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
Cc: Hans Verkuil <hans.verkuil@xxxxxxxxx>
Cc: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>
--
2.7.4