gmsl/rdacm20/v9
media: i2c: Add RDACM20 driver

The RDACM20 is a GMSL camera supporting 1280x800 resolution images
developed by IMI based on an Omnivision 10635 sensor and a Maxim MAX9271
GMSL serializer.

The GMSL link carries power, control (I2C) and video data over a
single coax cable.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Rob Herring <robh@kernel.org>

---
v2:
 - Fix MAINTAINERS entry

v3:
 - Use new V4L2_MBUS_CSI2_DPHY bus type
 - Remove 'always zero' error print
 - Fix module description

v5:
 - use sleep rather than busy loops for 10 ms delays
 - Return ov10635_set_regs directly
 - Use devm_kzalloc instead of kzalloc in probe()
 - Or in the flags: dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE
 - Ensure v4l2_ctrl_handler_free() is called
 - rdacm20_probe converted to use .probe_new and drop i2c device id
   tables
 - Remove rdacm20_g_mbus_config

v7:
 - Use new i2c_new_dummy_device API

v8:
 - Almost a new version, main changes are:
   - Split max9271 out
   - Rework bindings to yaml format and include forthcoming RDACM21
   - Remove unecessary header file
   - Add pixel rate calculation
   - Drop unused fields and dead code
   - Rebase on media-master v5.7-rc1
   - A detailed list of changes provided as fixup patches is avilable at
     git://jmondi.org/linux #gmsl/jmondi/media-master/max9286-v8+old-rdacm20+split

     which includes the following list of patches:
    	 squash!: rdacm20: Report pixel rate
	 squash!: rdacm20: Force sensor ID re-read
	 squash!: rdamc20: Check register programming result
	 squash!: rdacm20: Update to use the new max9271 APIs
	 squash!: rdacm20: Start with serial link disabled
	 squash!: rdacm20: Hard reset the sensor
	 squash!: rdacm20: Cache i2c addresses
	 squash!: rdacm20: Adjust to use new max9271 API
	 squash!: rdacm20: Drop unused format definition
	 squash!: rdacm20: Refresh file header
	 squash!: max9271: Add two functions to control addresses
	 squash!: max9271: Do not rewrite i2c address
	 squash!: max9271: Improve gpio handling
	 squash!: max9271: Rework core functions
	 squash!: max9271 refresh
	 squash!: rdacm20: Update maintainers file
	 squash!: rdacm20: Remove unsued/duplicated defines
	 squash!: rdacm20: Remove header file
	 squash!: rdacm20: Move content of  header into C file
	 squash!: rdacm20: Reorganize register table
	 squash!: rdacm20: Fix subdevice flag creation
	 squash!: rdacm20: Drop i2c id table
	 squash!: rdacm20: Release control handler
	 squash!: rdacm20: Better handle i2c dummy error
	 squash!: rdacm20: Use devm_kzalloc
	 squash!: rdacm20: Use probe_new()
	 squash!: rdacm20: Drop deprecated g_mbus_config
	 media: i2c: rdacm20: Break max9271 out from rdacm20
	 squash!: rdacm20: Rebase on latest media/maste
	 media: i2c: Add RDACM20 driver
	 dt-bindings: media: i2c: Add bindings for IMI RDACM2x

v9:
- Drop OV10635_FORMAT and use MEDIA_BUS_FMT_UYVY8_2X8 as suggested by
  Hans
6 files changed