Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp140788rwb; Thu, 12 Jan 2023 17:20:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXvNyTdnlh4oJ/k6BSQtxVVK4wveRPAQW1S8tm6E/9rCgHs8OeULc7XicEhvepppdpd6HG9w X-Received: by 2002:a17:907:8e93:b0:7c1:7226:c936 with SMTP id tx19-20020a1709078e9300b007c17226c936mr70821289ejc.64.1673572827758; Thu, 12 Jan 2023 17:20:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673572827; cv=none; d=google.com; s=arc-20160816; b=ItEyKYupGD0kSzMKvfUzzJuZ4N9lj+jl4WMTIepKT01RaknQyrlxPcuq6aqZ40+M3A m35UE4CqiOrjUnz4KG7vczddDRk7SpEKvD/DgXtaR3nCmrwXcs+wLiJICE+M8kLY0IpN U9P2bZkf5VECIS1Cnb4cr3rIZyxzRebxZJna+EJ26ndF9PFbZupH9+1POi8xE6+vWYvS Cmsupt3erEv74uFaZseCsIjUT+3zdEjebJXFXZAahF6WsIRMm1ueec/eWejXPMiZfvDn YgzecwCJpu5XIwQxcTcg6CWe+SUmygpIgYpL7Snzsft279LKIuWeVlA9OgfwJTyIWrFP V6wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cmP0J538ixr6ciNhT4HdZE3g1noWmkVi3KCVQkMuYac=; b=AwAHx3DHLmnlfVi+0RYiaVjTzSecveoXwM8ov/raj/NG8b0LF9dxmCaOb7bLxKW6n5 cQLgV0Y4mKcziZXUtbDsfYHMebggo7h/lhJ/xm8hRjLe8Txlc4cLDY/a2PWCy/HWprqh awrpxcLTJQGkkFmso0zb3yoWfYg/lmTowhGIZJNaDthRO2jX5M+/519szM/M04dDzg4s haBrF8xOoo/R62GwBoRrk2EfYakUYxhV+5rvYG0nsN0yyz60tPNH2V84u00SRSCk69kG ZgGqdAfFKP3+8bqywfiU1x9lGmFfB0SnJD+BINPjGQmS1k4GjfY0YEFnIcgdOUlCgx98 5cZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="L+jT/1yz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020aa7cb01000000b0046cb7a3d894si17071326edt.410.2023.01.12.17.20.12; Thu, 12 Jan 2023 17:20:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="L+jT/1yz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240194AbjAMBBx (ORCPT + 52 others); Thu, 12 Jan 2023 20:01:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232555AbjAMBBv (ORCPT ); Thu, 12 Jan 2023 20:01:51 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CBF2E1C; Thu, 12 Jan 2023 17:01:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1673571710; x=1705107710; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GLXh+f0a72t6lGjD1FpAhiA+PzmF9uom00zJlSDPvwc=; b=L+jT/1yzCowUIxN8jbvZeRv0rv1oWKHe/eJp/eMYDLbExeuzj1ne/479 GamvGEqNrviE/u/uP35zIo1GJMmimdrDNgCgFpKZA0YhTifKa9oar7gQL C0ZJqSGypKpEmxyB0ALY5xXS0Q7KOXlnfHBfzZCcquUprnlzQ9LG0mxkI 1wNbiFqPybkwdQSuWikvxqBa8sTVa0uTLtZbqfc7A949j9lcINHBQhhnb ZxwCjoFOiOOTcOnFbfmvtjAhFeDItQjpDkMMmorXea406F2F4xABFrzkT WyhOP86lcL8Dn+EOAetgpiky5GtvVj6fM/SWZwZ+wV5vMkiP0441h82cd g==; X-IronPort-AV: E=Sophos;i="5.97,212,1669100400"; d="scan'208";a="207577061" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 12 Jan 2023 18:01:49 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 12 Jan 2023 18:01:49 -0700 Received: from microchip1-OptiPlex-9020.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Thu, 12 Jan 2023 18:01:46 -0700 From: shravan kumar To: , , CC: , , "shravan kumar" , Jacopo Mondi Subject: [PATCH v9 1/4] media: i2c: imx334: replace __v4l2_ctrl_s_ctrl to __v4l2_ctrl_modify_range Date: Fri, 13 Jan 2023 06:31:32 +0530 Message-ID: <20230113010135.2620818-2-shravan.chippa@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230113010135.2620818-1-shravan.chippa@microchip.com> References: <20230113010135.2620818-1-shravan.chippa@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shravan Chippa For evry mode we will get new set of values for hbalnk so use __v4l2_ctrl_modify_range() to support multi modes for hblank. The hblank value is readonly in the driver. because of this the function returns error if we try to change. so added dumy return case in imx334_set_ctrl function Suggested-by: Jacopo Mondi Signed-off-by: Shravan Chippa --- drivers/media/i2c/imx334.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c index 7b0a9086447d..ebacba3059b3 100644 --- a/drivers/media/i2c/imx334.c +++ b/drivers/media/i2c/imx334.c @@ -382,7 +382,8 @@ static int imx334_update_controls(struct imx334 *imx334, if (ret) return ret; - ret = __v4l2_ctrl_s_ctrl(imx334->hblank_ctrl, mode->hblank); + ret = __v4l2_ctrl_modify_range(imx334->hblank_ctrl, mode->hblank, + mode->hblank, 1, mode->hblank); if (ret) return ret; @@ -480,6 +481,9 @@ static int imx334_set_ctrl(struct v4l2_ctrl *ctrl) pm_runtime_put(imx334->dev); + break; + case V4L2_CID_HBLANK: + ret = 0; break; default: dev_err(imx334->dev, "Invalid control %d", ctrl->id); -- 2.34.1