Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v2 0/5] media: Add MIPI CCI register access helper functions
@ 2023-06-14 19:23 Hans de Goede
  2023-06-14 19:23 ` [PATCH v2 1/5] " Hans de Goede
                   ` (4 more replies)
  0 siblings, 5 replies; 53+ messages in thread
From: Hans de Goede @ 2023-06-14 19:23 UTC (permalink / raw)
  To: Sakari Ailus, Laurent Pinchart
  Cc: Hans de Goede, Mauro Carvalho Chehab, Andy Shevchenko, Kate Hsuan,
	linux-media

Hi Laurent, Sakari, et al.,

Here is v2 of my MIPI CCI register access helper patches.

New in the CCI register access helpers in v2:
- Drop cci_reg_type enum
- Make having an encoded reg-width mandatory rather then using 0 to encode
  8 bit width making reg-addresses without an encoded width default to
  a width of 8
- Add support for 64 bit wide registers
- Introduce a new cci_reg_sequence struct with 64 bit reg values for 64 bit
  support and without the delay_us field
- Various kerneldoc updates
- Stop supporting delays in cci_multi_reg_write()
- Some includes cleanups
- Disable regmap locking

Other changes:
- Add a patch to convert the ov5693 driver (tested on Surface Go)
- Add a patch to convert the imx290 driver (untested)

Original (v1) cover-letter:

The CSI2 specification specifies a standard method to access camera sensor
registers called "Camera Control Interface (CCI)".

Currently a lot of Linux camera sensor drivers all have their own custom
helpers for this, often copy and pasted from other drivers.

This adds a set of generic helpers for this so that all sensor drivers can
switch to a single common implementation.

This is based on / the result of our previous discussion on this here:
Link: https://lore.kernel.org/linux-media/59aefa7f-7bf9-6736-6040-39551329cd0a@redhat.com/

Patches 2-4 are examples of how these helpers can be used and patch 5
removes the now no longer necessary ov_16bit_addr_reg_helpers.h which was
the previous attempt to add common CCI access helpers.

Regards,

Hans


Hans de Goede (5):
  media: Add MIPI CCI register access helper functions
  media: ov5693: Convert to new CCI register access helpers
  media: imx290: Convert to new CCI register access helpers
  media: atomisp: ov2680: Convert to new CCI register access helpers
  media: Remove ov_16bit_addr_reg_helpers.h

 Documentation/driver-api/media/v4l2-cci.rst   |   5 +
 Documentation/driver-api/media/v4l2-core.rst  |   1 +
 drivers/media/i2c/Kconfig                     |   2 +
 drivers/media/i2c/imx290.c                    | 350 +++++------
 drivers/media/i2c/ov5693.c                    | 574 +++++++-----------
 drivers/media/v4l2-core/Kconfig               |   5 +
 drivers/media/v4l2-core/Makefile              |   1 +
 drivers/media/v4l2-core/v4l2-cci.c            | 157 +++++
 drivers/staging/media/atomisp/i2c/Kconfig     |   1 +
 .../media/atomisp/i2c/atomisp-ov2680.c        | 237 +++-----
 drivers/staging/media/atomisp/i2c/ov2680.h    |  86 +--
 include/media/ov_16bit_addr_reg_helpers.h     |  92 ---
 include/media/v4l2-cci.h                      | 121 ++++
 13 files changed, 763 insertions(+), 869 deletions(-)
 create mode 100644 Documentation/driver-api/media/v4l2-cci.rst
 create mode 100644 drivers/media/v4l2-core/v4l2-cci.c
 delete mode 100644 include/media/ov_16bit_addr_reg_helpers.h
 create mode 100644 include/media/v4l2-cci.h

-- 
2.40.1


^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2023-06-19  8:49 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-14 19:23 [PATCH v2 0/5] media: Add MIPI CCI register access helper functions Hans de Goede
2023-06-14 19:23 ` [PATCH v2 1/5] " Hans de Goede
2023-06-14 20:09   ` Andy Shevchenko
2023-06-14 20:39   ` Sakari Ailus
2023-06-14 21:34     ` Laurent Pinchart
2023-06-14 21:48       ` Sakari Ailus
2023-06-14 22:11         ` Laurent Pinchart
2023-06-15  9:11         ` Hans de Goede
2023-06-15  9:21           ` Laurent Pinchart
2023-06-15 10:05             ` Tommaso Merciai
2023-06-15 11:10               ` Hans de Goede
2023-06-15 11:26                 ` Tommaso Merciai
2023-06-15 11:54                   ` Tommaso Merciai
2023-06-15 12:00                     ` Hans de Goede
2023-06-15 16:15                       ` Tommaso Merciai
2023-06-15 16:52                         ` Laurent Pinchart
2023-06-15 22:20                           ` Tommaso Merciai
2023-06-16 13:41                             ` Laurent Pinchart
2023-06-16 14:08                               ` Tommaso Merciai
2023-06-16 14:15                               ` Tommaso Merciai
2023-06-16 14:17                                 ` Laurent Pinchart
2023-06-16 14:56                                   ` Tommaso Merciai
2023-06-16 15:07                                     ` Laurent Pinchart
2023-06-16 16:34                                       ` Tommaso Merciai
2023-06-16 16:54                         ` Hans de Goede
2023-06-19  8:13                           ` Tommaso Merciai
2023-06-19  8:46                             ` Hans de Goede
2023-06-15 10:08           ` Sakari Ailus
2023-06-15  8:56       ` Hans de Goede
2023-06-14 22:21     ` Andy Shevchenko
2023-06-14 22:24       ` Andy Shevchenko
2023-06-15  8:45     ` Hans de Goede
2023-06-15  9:54       ` Sakari Ailus
2023-06-15 10:15         ` Hans de Goede
2023-06-15 10:35           ` Andy Shevchenko
2023-06-15 11:41           ` Sakari Ailus
2023-06-15 12:05             ` Hans de Goede
2023-06-15 13:19               ` Sakari Ailus
2023-06-15 13:28                 ` Sakari Ailus
2023-06-15 13:52                 ` Hans de Goede
2023-06-15 13:23             ` Andy Shevchenko
2023-06-14 19:23 ` [PATCH v2 2/5] media: ov5693: Convert to new CCI register access helpers Hans de Goede
2023-06-14 20:13   ` Andy Shevchenko
2023-06-15  9:16     ` Hans de Goede
2023-06-14 21:54   ` Laurent Pinchart
2023-06-14 19:23 ` [PATCH v2 3/5] media: imx290: " Hans de Goede
2023-06-14 22:04   ` Laurent Pinchart
2023-06-14 19:23 ` [PATCH v2 4/5] media: atomisp: ov2680: " Hans de Goede
2023-06-14 20:15   ` Andy Shevchenko
2023-06-15  9:02     ` Hans de Goede
2023-06-15 10:16       ` Andy Shevchenko
2023-06-14 19:23 ` [PATCH v2 5/5] media: Remove ov_16bit_addr_reg_helpers.h Hans de Goede
2023-06-14 20:17   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox