From 8502d4c52d191a03e866411044e34b1f02183b99 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 22 Dec 2020 15:40:08 +0100 Subject: libcamera: camera_sensor: Validate driver support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CameraSensor class requires the sensor driver to report information through V4L2 controls and through the V4L2 selection API, and uses that information to register Camera properties and to construct CameraSensorInfo class instances to provide them to the IPA. Currently, validation of the kernel support happens each time a feature is requested, with slighly similar debug/error messages output to the user in case a feature is not supported. Rationalize this by validating the sensor driver requirements in a single function Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder Signed-off-by: Jacopo Mondi --- include/libcamera/internal/camera_sensor.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index f80d8361..aee10aa6 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -69,6 +69,7 @@ protected: private: int generateId(); + int validateSensorDriver(); int initProperties(); const MediaEntity *entity_; -- cgit v1.2.1