Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp551904rwb; Fri, 13 Jan 2023 00:54:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXtxoFUD4FpXCTCV130b2mC2oIBcBRjdWC2BPLqC0tiOmc9Ak2TEJNjCzNHbGaAQbJ00B6oi X-Received: by 2002:a05:6a00:2a9:b0:588:89bc:7f75 with SMTP id q9-20020a056a0002a900b0058889bc7f75mr17484630pfs.1.1673600073871; Fri, 13 Jan 2023 00:54:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673600073; cv=none; d=google.com; s=arc-20160816; b=Sns/VRhZCM5pO63eR9YFBCH2gQrx/jE5JAVWQzvQ6wva2vH9sLehvZlrk1yHUgNtfQ Dtzv/fhAqArHh/VoygeMJb+VNK0WFLTM0VlymYGeWVYjrO5/Tng5VoZy04FSM5Pp64xi 9vIhYM7LgRmV8/mcEcsXgo/7pjfXEgvNwURRq/vmkZ76nqZ79TKKfBqAwqhravgOELLS Ug7ZNQnbr8VvO7wVmyEUbl9V+jxTunzg2vWJIoXkUYnLK/IUf8e+UlNgc/71HcMpvz+2 Vd9Bi1Gr7evPP7hhO+Tjw9UVfsQ0b2cY/YWs864nKPBH7DoGfISpYMhEBjiVfk1me4ka +Wjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ddc9pe9wquHqvDjlI48CrOH1tchA6PXxgrC7Oe588cw=; b=ZIBbhxbdMJSZqYdibSH2IwdQjB7LNSujU3DslE5vwyCLlZr59U82SXJu/WwpcJN34t VeCgtui8RHG3zUedvIjqzW+0mGBgA4yBJL0EZ8p337cfbh4FhzFEfixpxHbJCaln4zMa r1SCmq6sA0cy2B5P8cc6RxdtH94K2+UUHBXI8UNnngcyjc69rpIdAldT9KzbbZLzg57I kY29gxTMfsn4i5Lltg77wix/Qkifol7qWKPiTWJyBHoXaiFk0bs+pM9hXUUiFZE4UWuO rDT66KG/0ypeZcY94wCGG/6C8IFhbdKQaalYfzNovVXtWlVI5Ul8Y5523zs5ObPLlL1V XvMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="kGLf5/5m"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k4-20020a056a00134400b005766cd2128dsi1543989pfu.269.2023.01.13.00.54.27; Fri, 13 Jan 2023 00:54:33 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b="kGLf5/5m"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240969AbjAMIei (ORCPT + 50 others); Fri, 13 Jan 2023 03:34:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241200AbjAMIeD (ORCPT ); Fri, 13 Jan 2023 03:34:03 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6FE0559F9; Fri, 13 Jan 2023 00:34:02 -0800 (PST) Received: from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 206F04D4; Fri, 13 Jan 2023 09:34:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1673598841; bh=VP81boZNAULBig0pX/5Ej4adNCPEe27XN6cdfqVNgnU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kGLf5/5m47IFuh8UeLj+XpcdCSsohaE9DAuWqklfh+1eBEhANhgFCJroUdC77MzAY f0l8htJSunhTpr0ytTCZqJDOF5uxQq2aS0ie64hg381wozZt/23TaQ1XIcNDsC17FI Ty8jq7ZMZP8Z/kQFi7q8dOxy7wvkf5TkI2LyflgQ= Date: Fri, 13 Jan 2023 09:33:58 +0100 From: Jacopo Mondi To: shravan kumar Cc: paul.j.murphy@intel.com, daniele.alessandrelli@intel.com, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 1/4] media: i2c: imx334: replace __v4l2_ctrl_s_ctrl to __v4l2_ctrl_modify_range Message-ID: <20230113083358.yreo42dmnrwjlvak@uno.localdomain> References: <20230113010135.2620818-1-shravan.chippa@microchip.com> <20230113010135.2620818-2-shravan.chippa@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230113010135.2620818-2-shravan.chippa@microchip.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Hi Shravan On Fri, Jan 13, 2023 at 06:31:32AM +0530, shravan kumar wrote: > 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 Reviewed-by: Jacopo Mondi Thanks j > --- > 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 >