diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-06-27 14:51:04 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-08-10 07:58:38 +0200 |
commit | 613cbb91e9cee7cf5a61f0816d2acab7bc117407 (patch) | |
tree | de481e364ad1423b739965e2deca0b3c97491ad5 /Documentation/driver-api/media/v4l2-cci.rst | |
parent | 35a2991856ec3035ea3bd5dac3b199bb5a0ec9cb (diff) | |
download | linux-613cbb91e9cee7cf5a61f0816d2acab7bc117407.tar.gz linux-613cbb91e9cee7cf5a61f0816d2acab7bc117407.tar.bz2 linux-613cbb91e9cee7cf5a61f0816d2acab7bc117407.zip |
media: Add MIPI CCI register access helper functions
The CSI2 specification specifies a standard method to access camera sensor
registers called "Camera Control Interface (CCI)".
This uses either 8 or 16 bit (big-endian wire order) register addresses
and supports 8, 16, 24 or 32 bit (big-endian wire order) register widths.
Currently a lot of Linux camera sensor drivers all have their own custom
helpers for this, often copy and pasted from other drivers.
Add a set of generic helpers for this so that all sensor drivers can
switch to a single common implementation.
These helpers take an extra optional "int *err" function parameter,
this can be used to chain a bunch of register accesses together with
only a single error check at the end, rather than needing to error
check each individual register access. The first failing call will
set the contents of err to a non 0 value and all other calls will
then become no-ops.
Link: https://lore.kernel.org/linux-media/59aefa7f-7bf9-6736-6040-39551329cd0a@redhat.com/
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Tommaso Merciai <tomm.merciai@gmail.com>
Reviewed-by: Tommaso Merciai <tomm.merciai@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'Documentation/driver-api/media/v4l2-cci.rst')
-rw-r--r-- | Documentation/driver-api/media/v4l2-cci.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/driver-api/media/v4l2-cci.rst b/Documentation/driver-api/media/v4l2-cci.rst new file mode 100644 index 000000000000..dd297a40ed20 --- /dev/null +++ b/Documentation/driver-api/media/v4l2-cci.rst @@ -0,0 +1,5 @@ +.. SPDX-License-Identifier: GPL-2.0 + +V4L2 CCI kAPI +^^^^^^^^^^^^^ +.. kernel-doc:: include/media/v4l2-cci.h |