From patchwork Mon Aug 19 12:17:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 11100787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC14E174A for ; Mon, 19 Aug 2019 12:17:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABCD327FAC for ; Mon, 19 Aug 2019 12:17:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A00C82879C; Mon, 19 Aug 2019 12:17:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20BF727FAC for ; Mon, 19 Aug 2019 12:17:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727445AbfHSMR1 (ORCPT ); Mon, 19 Aug 2019 08:17:27 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:37581 "EHLO mail-ed1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727259AbfHSMR1 (ORCPT ); Mon, 19 Aug 2019 08:17:27 -0400 Received: by mail-ed1-f49.google.com with SMTP id f22so1465966edt.4; Mon, 19 Aug 2019 05:17:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9HJOjJNc72EsAZqvVA1iMykBVheTMlViqU0Dls5uHTA=; b=Hkw8bnvN5/t2PjcLRhvmEftZE2He1Sax3SQmB0eOVUQCNiJPymZdrIlhFJd0xXebgJ 2vebuvIfH9D6gk52HtZWN1khZr+eOr1saWSG5q746lOgOzwIHl/v2Z1dY3/QCBVgMhen rG5dCvHhVmmXP9ghg8S91PnMjY90ba2udICRk0B66x/4dO23kJH7FjDBtS/lUYZchltI f0W/ZUYRB7la9TOjee9LgZ7SHKVcZX9JIl4blIjxdp8xO0SBnV9q1XuMxsP+18nhUsiW 6UjbOFEJJhnzCCc7R1Z1mlnC+en0LfhBTI3VDbMChHY/rYQ/dQ733n2qUZHF/tHG1R55 rR8A== X-Gm-Message-State: APjAAAVGjNhNXFuydOP64War11VrK34rSZ7kf0K70R809VCowqAHg+IB Ek1bGJGPyoqJcNH6ufWPK6E= X-Google-Smtp-Source: APXvYqysIg9wn42RUSFN/zCY4ej2oMd+LFZE9Uw3GoqmOE6gMVBiyToZTnB0EaVuo9oAT2zyh55yVA== X-Received: by 2002:a50:8858:: with SMTP id c24mr24503654edc.253.1566217045039; Mon, 19 Aug 2019 05:17:25 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id b31sm2753639edf.33.2019.08.19.05.17.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 05:17:24 -0700 (PDT) From: Ricardo Ribalda Delgado To: Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH 1/3] media: add pixel_size control Date: Mon, 19 Aug 2019 14:17:18 +0200 Message-Id: <20190819121720.31345-1-ribalda@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This control returns the pixel size in nanometres. The struct provides the width and the height in separated fields to take into consideration asymmetric pixels and/or hardware binning. This control is required for automatic calibration of the sensor. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/v4l2-ctrls.c | 11 +++++++++++ include/media/v4l2-ctrls.h | 2 ++ include/uapi/linux/v4l2-controls.h | 3 +++ include/uapi/linux/videodev2.h | 11 +++++++++++ 4 files changed, 27 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index cd1ae016706f..a3a0086c96ff 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -978,6 +978,7 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_AUTO_FOCUS_RANGE: return "Auto Focus, Range"; case V4L2_CID_PAN_SPEED: return "Pan, Speed"; case V4L2_CID_TILT_SPEED: return "Tilt, Speed"; + case V4L2_CID_PIXEL_SIZE: return "Pixel Size"; /* FM Radio Modulator controls */ /* Keep the order of the 'case's the same as in v4l2-controls.h! */ @@ -1357,6 +1358,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER: *type = V4L2_CTRL_TYPE_VP8_FRAME_HEADER; break; + case V4L2_CID_PIXEL_SIZE: + *type = V4L2_CTRL_TYPE_PIXEL_SIZE; + break; default: *type = V4L2_CTRL_TYPE_INTEGER; break; @@ -1423,6 +1427,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT: case V4L2_CID_RDS_RX_TRAFFIC_PROGRAM: case V4L2_CID_RDS_RX_MUSIC_SPEECH: + case V4L2_CID_PIXEL_SIZE: *flags |= V4L2_CTRL_FLAG_READ_ONLY; break; case V4L2_CID_RF_TUNER_PLL_LOCK: @@ -1705,6 +1710,9 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx, case V4L2_CTRL_TYPE_FWHT_PARAMS: break; + case V4L2_CTRL_TYPE_PIXEL_SIZE: + break; + case V4L2_CTRL_TYPE_H264_SPS: case V4L2_CTRL_TYPE_H264_PPS: case V4L2_CTRL_TYPE_H264_SCALING_MATRIX: @@ -2403,6 +2411,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, case V4L2_CTRL_TYPE_VP8_FRAME_HEADER: elem_size = sizeof(struct v4l2_ctrl_vp8_frame_header); break; + case V4L2_CTRL_TYPE_PIXEL_SIZE: + elem_size = sizeof(struct v4l2_pixel_size); + break; default: if (type < V4L2_CTRL_COMPOUND_TYPES) elem_size = sizeof(s32); diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index 570ff4b0205a..63de780398b8 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h @@ -50,6 +50,7 @@ struct poll_table_struct; * @p_h264_slice_params: Pointer to a struct v4l2_ctrl_h264_slice_params. * @p_h264_decode_params: Pointer to a struct v4l2_ctrl_h264_decode_params. * @p_vp8_frame_header: Pointer to a VP8 frame header structure. + * @p_pixel_size: Pointer to a pixel_size value. * @p: Pointer to a compound value. */ union v4l2_ctrl_ptr { @@ -68,6 +69,7 @@ union v4l2_ctrl_ptr { struct v4l2_ctrl_h264_slice_params *p_h264_slice_params; struct v4l2_ctrl_h264_decode_params *p_h264_decode_params; struct v4l2_ctrl_vp8_frame_header *p_vp8_frame_header; + struct v4l2_pixel_size *p_pixel_size; void *p; }; diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index a2669b79b294..13f0410df4c6 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -912,6 +912,9 @@ enum v4l2_auto_focus_range { #define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE+32) #define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE+33) +#define V4L2_CID_PIXEL_SIZE (V4L2_CID_CAMERA_CLASS_BASE+34) + + /* FM Modulator class control IDs */ #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 2427bc4d8eba..21f4846dca0b 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -422,6 +422,11 @@ struct v4l2_fract { __u32 denominator; }; +struct v4l2_pixel_size { + __u32 width; + __u32 height; +}; + /** * struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP * @@ -1718,6 +1723,12 @@ enum v4l2_ctrl_type { V4L2_CTRL_TYPE_U8 = 0x0100, V4L2_CTRL_TYPE_U16 = 0x0101, V4L2_CTRL_TYPE_U32 = 0x0102, + /* + * V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS = 0x0103, + * V4L2_CTRL_TYPE_MPEG2_QUANTIZATION = 0x0104, + * V4L2_CTRL_TYPE_FWHT_PARAMS = 0x0105, + */ + V4L2_CTRL_TYPE_PIXEL_SIZE = 0x0106, }; /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ From patchwork Mon Aug 19 12:17:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 11100785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7852414F7 for ; Mon, 19 Aug 2019 12:17:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 687DB283C3 for ; Mon, 19 Aug 2019 12:17:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CE5F287A1; Mon, 19 Aug 2019 12:17:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F17BD283C3 for ; Mon, 19 Aug 2019 12:17:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727577AbfHSMR2 (ORCPT ); Mon, 19 Aug 2019 08:17:28 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:37411 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727301AbfHSMR1 (ORCPT ); Mon, 19 Aug 2019 08:17:27 -0400 Received: by mail-ed1-f67.google.com with SMTP id f22so1466013edt.4; Mon, 19 Aug 2019 05:17:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9RBGVrQg7lODbDWBtsawmxQ4QY4IjEpFAoyu7OAy/io=; b=GVtPfk1W6K28lXmCPbPEgQp14s1d67JLD4IpU4RIJybJvSIm0TJIXIa00bbOGTrYdn PjES4ITObpOcfjpXqlpxVq4Url+5ZQ+ZCRggamHiyd+7MELdv11TZQ8ghMgknasFs0gv UvI93m2RDwEuAAByidvTAwdnpgUoznXMQAp/LP19COk2gJpR8ugOZ6psceVAGJ5NOjqY tRKoYiUnOQiBVIqeoGZcYT8BhI1To0vCHyXQ8J2QOsb1pGT4/KHW2/o0kO9BpSFJGO4B D/7Vude9pglDWVkDj5eD/YSb+2EyfJYu+DDYjeji2x6sRS5INyPWyftJd+1lMiYqmp+c zlHw== X-Gm-Message-State: APjAAAWyVcXLNBojXbIZcSNkG2BTiw6y2EqsexTWEpbXIS39QeipgF8v YRSYXxaiYZeIRNgWPkiLY7M= X-Google-Smtp-Source: APXvYqzm6xvitSWj6OBDxjx0kHDaIWwA1oLt8w4SCBv2mR44HNwcKoq7XlYOLIhQoVZ1rlZ1Xs5knA== X-Received: by 2002:a50:ba81:: with SMTP id x1mr24456369ede.257.1566217046233; Mon, 19 Aug 2019 05:17:26 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id b31sm2753639edf.33.2019.08.19.05.17.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 05:17:25 -0700 (PDT) From: Ricardo Ribalda Delgado To: Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH 2/3] Documentation: Describe V4L2_CID_PIXEL_SIZE Date: Mon, 19 Aug 2019 14:17:19 +0200 Message-Id: <20190819121720.31345-2-ribalda@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190819121720.31345-1-ribalda@kernel.org> References: <20190819121720.31345-1-ribalda@kernel.org> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP New control to pass to userspace the width/height of a pixel. Which is needed for 3D calibration and lens selection. Signed-off-by: Ricardo Ribalda Delgado --- Documentation/media/uapi/v4l/ext-ctrls-camera.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst index 51c1d5c9eb00..670c57a6f622 100644 --- a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst +++ b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst @@ -510,6 +510,12 @@ enum v4l2_scene_mode - value down. A value of zero stops the motion if one is in progress and has no effect otherwise. +``V4L2_CID_PIXEL_SIZE (struct)`` + This control returns the pixel size in nanometres. The struct provides + the width and the height in separated fields to take into consideration + asymmetric pixels and/or hardware binning. + This control is required for automatic calibration of the sensor. + .. [#f1] This control may be changed to a menu control in the future, if more options are required. From patchwork Mon Aug 19 12:17:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 11100783 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6E86C14F7 for ; Mon, 19 Aug 2019 12:17:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E951286E3 for ; Mon, 19 Aug 2019 12:17:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52A9F2879C; Mon, 19 Aug 2019 12:17:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE2B0286E3 for ; Mon, 19 Aug 2019 12:17:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727613AbfHSMRa (ORCPT ); Mon, 19 Aug 2019 08:17:30 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:44271 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727259AbfHSMR3 (ORCPT ); Mon, 19 Aug 2019 08:17:29 -0400 Received: by mail-ed1-f65.google.com with SMTP id a21so1450220edt.11; Mon, 19 Aug 2019 05:17:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FE4bYWxIaccoeXNLB30tqGs+7lXszx/GYxEDp2iGn3E=; b=Rhzjiln60dyXIljUbTnq34nbmC0pbIxMiixmZqyYb/3D4RIn44fUeY6Ax5Jul2mDPc f5zSUGEm0c4QkSKqvO9GehM1xCocF+hD89W8AUWWSQ0899ZJ+3Mrhx6VnFhKU51XZS7F WZoCqDjmosISNlJhR/FHrmggC5HNslBnC/i27r5hKMY+2Wglh9X6Lq8GnkC+t8NgIwr0 fpoiLS9JCt1yg4FxJjpR7705zwIBg53WDwcbh+6pEwfpLJexQ1DlNfYcw53ipD76wrTy t1Jg88kQQLMi+8Xl38/n3fcs32JJQB9SQyW9iKt+9Q8Jz0tfGgniOlkbKvn7kJqQ6bd7 On4Q== X-Gm-Message-State: APjAAAX3hNyRgq+hhJ0I5Oscal/n9lSE3rGsxnbdiT6kI7j7NNvCQp/i ykNgUYhnI3pIBb9NJ+bAw9A= X-Google-Smtp-Source: APXvYqyl7hoy839fM1/yFk/TjaVwWLeYmdbCgvpCwlgGLS8LH/9pKQz50H8LQyyW6hvpjdyQT+/35g== X-Received: by 2002:aa7:d606:: with SMTP id c6mr24579348edr.185.1566217047383; Mon, 19 Aug 2019 05:17:27 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id b31sm2753639edf.33.2019.08.19.05.17.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 05:17:26 -0700 (PDT) From: Ricardo Ribalda Delgado To: Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH 3/3] media: imx214: Add new control with V4L2_CID_PIXEL_SIZE Date: Mon, 19 Aug 2019 14:17:20 +0200 Message-Id: <20190819121720.31345-3-ribalda@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190819121720.31345-1-ribalda@kernel.org> References: <20190819121720.31345-1-ribalda@kernel.org> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According to the product brief, the unit cell size is 1120 nanometers^2. https://www.sony-semicon.co.jp/products_en/IS/sensor1/img/products/ProductBrief_IMX214_20150428.pdf Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/i2c/imx214.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c index 159a3a604f0e..b2f6bd2d8d7d 100644 --- a/drivers/media/i2c/imx214.c +++ b/drivers/media/i2c/imx214.c @@ -47,6 +47,7 @@ struct imx214 { struct v4l2_ctrl *pixel_rate; struct v4l2_ctrl *link_freq; struct v4l2_ctrl *exposure; + struct v4l2_ctrl *pixel_size; struct regulator_bulk_data supplies[IMX214_NUM_SUPPLIES]; @@ -941,6 +942,26 @@ static int __maybe_unused imx214_resume(struct device *dev) return ret; } +static void pixel_size_init(const struct v4l2_ctrl *ctrl, u32 idx, + union v4l2_ctrl_ptr ptr) +{ + ptr.p_pixel_size->width = 1120; + ptr.p_pixel_size->height = 1120; +} + +static const struct v4l2_ctrl_type_ops pixel_size_ops = { + .init = pixel_size_init, +}; + +static struct v4l2_ctrl *new_pixel_size_ctrl(struct v4l2_ctrl_handler *handler) +{ + static struct v4l2_ctrl_config ctrl = { + .id = V4L2_CID_PIXEL_SIZE, + .type_ops = &pixel_size_ops, + }; + + return v4l2_ctrl_new_custom(handler, &ctrl, NULL); +} static int imx214_probe(struct i2c_client *client) { struct device *dev = &client->dev; @@ -1029,6 +1050,8 @@ static int imx214_probe(struct i2c_client *client) V4L2_CID_EXPOSURE, 0, 3184, 1, 0x0c70); + imx214->pixel_size = new_pixel_size_ctrl(&imx214->ctrls); + ret = imx214->ctrls.error; if (ret) { dev_err(&client->dev, "%s control init failed (%d)\n",