Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: uapi: Add controls for the THP7312 ISP

The THP7312 is an external ISP from THine. As such, it implements a
large number of parameters to control all aspects of the image
processing. Many of those controls are already standard in V4L2, but
some are fairly device-specific.

Reserve a range of 32 controls for the device. The driver will implement
4 device-specific controls to start with, define and document them. 28
additional device-specific controls should be enough for future
development.

Co-developed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Laurent Pinchart and committed by
Hans Verkuil
0d9e32a8 cba1ec57

+67
+1
Documentation/userspace-api/media/drivers/index.rst
··· 41 41 npcm-video 42 42 omap3isp-uapi 43 43 st-vgxy61 44 + thp7312 44 45 uvcvideo
+39
Documentation/userspace-api/media/drivers/thp7312.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0-only 2 + 3 + THine THP7312 ISP driver 4 + ======================== 5 + 6 + The THP7312 driver implements the following driver-specific controls: 7 + 8 + ``V4L2_CID_THP7312_LOW_LIGHT_COMPENSATION`` 9 + Enable/Disable auto-adjustment, based on lighting conditions, of the frame 10 + rate when auto-exposure is enabled. 11 + 12 + ``V4L2_CID_THP7312_AUTO_FOCUS_METHOD`` 13 + Set method of auto-focus. Only takes effect when auto-focus is enabled. 14 + 15 + .. flat-table:: 16 + :header-rows: 0 17 + :stub-columns: 0 18 + :widths: 1 4 19 + 20 + * - ``0`` 21 + - Contrast-based auto-focus 22 + * - ``1`` 23 + - PDAF 24 + * - ``2`` 25 + - Hybrid of contrast-based and PDAF 26 + 27 + Supported values for the control depend on the camera sensor module 28 + connected to the THP7312. If the module doesn't have a focus lens actuator, 29 + this control will not be exposed by the THP7312 driver. If the module has a 30 + controllable focus lens but the sensor doesn't support PDAF, only the 31 + contrast-based auto-focus value will be valid. Otherwise all values for the 32 + controls will be supported. 33 + 34 + ``V4L2_CID_THP7312_NOISE_REDUCTION_AUTO`` 35 + Enable/Disable auto noise reduction. 36 + 37 + ``V4L2_CID_THP7312_NOISE_REDUCTION_ABSOLUTE`` 38 + Set the noise reduction strength, where 0 is the weakest and 10 is the 39 + strongest.
+2
MAINTAINERS
··· 21670 21670 S: Maintained 21671 21671 T: git git://linuxtv.org/media_tree.git 21672 21672 F: Documentation/devicetree/bindings/media/i2c/thine,thp7312.yaml 21673 + F: Documentation/userspace-api/media/drivers/thp7312.rst 21674 + F: include/uapi/linux/thp7312.h 21673 21675 21674 21676 THUNDERBOLT DMA TRAFFIC TEST DRIVER 21675 21677 M: Isaac Hazan <isaac.hazan@intel.com>
+19
include/uapi/linux/thp7312.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 + /* 3 + * THine THP7312 user space header file. 4 + * 5 + * Copyright (C) 2021 THine Electronics, Inc. 6 + * Copyright (C) 2023 Ideas on Board Oy 7 + */ 8 + 9 + #ifndef __UAPI_THP7312_H_ 10 + #define __UAPI_THP7312_H_ 11 + 12 + #include <linux/v4l2-controls.h> 13 + 14 + #define V4L2_CID_THP7312_LOW_LIGHT_COMPENSATION (V4L2_CID_USER_THP7312_BASE + 0x01) 15 + #define V4L2_CID_THP7312_AUTO_FOCUS_METHOD (V4L2_CID_USER_THP7312_BASE + 0x02) 16 + #define V4L2_CID_THP7312_NOISE_REDUCTION_AUTO (V4L2_CID_USER_THP7312_BASE + 0x03) 17 + #define V4L2_CID_THP7312_NOISE_REDUCTION_ABSOLUTE (V4L2_CID_USER_THP7312_BASE + 0x04) 18 + 19 + #endif /* __UAPI_THP7312_H_ */
+6
include/uapi/linux/v4l2-controls.h
··· 209 209 */ 210 210 #define V4L2_CID_USER_NPCM_BASE (V4L2_CID_USER_BASE + 0x11b0) 211 211 212 + /* 213 + * The base for THine THP7312 driver controls. 214 + * We reserve 32 controls for this driver. 215 + */ 216 + #define V4L2_CID_USER_THP7312_BASE (V4L2_CID_USER_BASE + 0x11c0) 217 + 212 218 /* MPEG-class control IDs */ 213 219 /* The MPEG controls are applicable to all codec controls 214 220 * and the 'MPEG' part of the define is historical */