From patchwork Thu Jul 22 20:34:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 484165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F126C4338F for ; Thu, 22 Jul 2021 20:35:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06AAA60EB8 for ; Thu, 22 Jul 2021 20:35:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231272AbhGVTyN (ORCPT ); Thu, 22 Jul 2021 15:54:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231135AbhGVTx7 (ORCPT ); Thu, 22 Jul 2021 15:53:59 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FB41C06175F; Thu, 22 Jul 2021 13:34:33 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id j2so30599wrx.9; Thu, 22 Jul 2021 13:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pPYPamu3BTSvC4xDyNwMS1rZ00+Vamo+vGwg9BlQGtg=; b=QU64f1ey246ueY7K6FvQaR+tNFW7/c2ASWKR7EbrVG8mHVYrWdttwIfkiTuXn6WySv EQ4tlcU0qfG8G9OY8tJfcPowVYwtXs2rGlF9opDSKHClD076pik9LwAxbXPjKiLmf2uy hRuveWJGiMDZax4GPRPscX1uL4J4b1gHOex18wSRYNhrHhSCI5LkKyk1hYvzrAUmpfRv j26ddwvFEc1IxxfaWJoWoRwUSmePz04LnRBGNMeBfAuQWt0yj4xrPD3MaD3XUa4B1vXt 8Gr8szSFzGDEM4/Qv6M/Y1Df4DKJTeVRevVrlG+Pt0X4cwprQjC9CKcENBAWyEg5rGDb yAMg== 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=pPYPamu3BTSvC4xDyNwMS1rZ00+Vamo+vGwg9BlQGtg=; b=SJRvFiEXFGMBy3WE1ULwx46gapyJQEpMg4xm8DMhK0ZhupvJPiZgjtIYRWa3BgwZbb 1opzNl0nuffEzXbPcEIrcdFdReF/IsE9oYA5CjvxEE3fHxxHX+gsgQDozi/1MpeWKMTg Y2XS5qmEN0BxnhQu4XNyfE5t3Gkiod3pLiRAHE+YHhFUtFYYQjg5JOuSrPePNYqIL0Uc yrFzNA1oL0mTa7ZjG7VJvdR8IFw/7miAzIp1cYymRh3htRYw7PdgRT9Idin4HFSwhlaY V4otLuwd2QpDh8YpOhpvVJjaMheh6eKrbbHAPqb1rHtP0CGX9p3HLbpGh/XlKiXhuU4T bu5g== X-Gm-Message-State: AOAM5314GLDEqGs0dK4MikXwBRhMdMrmUljY3eYI+JAtJKSYyrAKY6Ey NEzqyt4A/K45liDod0LAej0= X-Google-Smtp-Source: ABdhPJwuQtSj3WdwEsIQAuebOcWSO4nxHjoXKk5zgWs2KV9+vs5ewXxHifizW3b6wheZ3rAIXQ6CxQ== X-Received: by 2002:adf:f74f:: with SMTP id z15mr1788475wrp.54.1626986072117; Thu, 22 Jul 2021 13:34:32 -0700 (PDT) Received: from valhalla.home ([2.29.20.106]) by smtp.gmail.com with ESMTPSA id b16sm31036455wrw.46.2021.07.22.13.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 13:34:31 -0700 (PDT) From: Daniel Scally To: Daniel Scally , Mauro Carvalho Chehab , Sakari Ailus , Paul Kocialkowski , Ezequiel Garcia , Hans Verkuil , Yang Li , linux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)), linux-kernel@vger.kernel.org (open list) Cc: Yong Zhi , Bingbu Cao , Tianshu Qiu , Colin Ian King , laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com Subject: [PATCH 06/13] media: i2c: Switch control to V4L2_CID_ANALOGUE_GAIN Date: Thu, 22 Jul 2021 21:34:00 +0100 Message-Id: <20210722203407.3588046-7-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210722203407.3588046-1-djrscally@gmail.com> References: <20210722203407.3588046-1-djrscally@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The V4L2_CID_GAIN control for this driver configures registers that the datasheet specifies as analogue gain. Switch the control's ID to V4L2_CID_ANALOGUE_GAIN. Signed-off-by: Daniel Scally Reviewed-by: Paul Kocialkowski --- drivers/media/i2c/ov8865.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c index c012f5cb11ab..09558a3342dd 100644 --- a/drivers/media/i2c/ov8865.c +++ b/drivers/media/i2c/ov8865.c @@ -2137,7 +2137,7 @@ static int ov8865_exposure_configure(struct ov8865_sensor *sensor, u32 exposure) /* Gain */ -static int ov8865_gain_configure(struct ov8865_sensor *sensor, u32 gain) +static int ov8865_analog_gain_configure(struct ov8865_sensor *sensor, u32 gain) { int ret; @@ -2447,8 +2447,8 @@ static int ov8865_s_ctrl(struct v4l2_ctrl *ctrl) if (ret) return ret; break; - case V4L2_CID_GAIN: - ret = ov8865_gain_configure(sensor, ctrl->val); + case V4L2_CID_ANALOGUE_GAIN: + ret = ov8865_analog_gain_configure(sensor, ctrl->val); if (ret) return ret; break; @@ -2493,7 +2493,7 @@ static int ov8865_ctrls_init(struct ov8865_sensor *sensor) /* Gain */ - v4l2_ctrl_new_std(handler, ops, V4L2_CID_GAIN, 128, 8191, 128, 128); + v4l2_ctrl_new_std(handler, ops, V4L2_CID_ANALOGUE_GAIN, 128, 8191, 128, 128); /* White Balance */