Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3611938rwb; Tue, 20 Sep 2022 02:04:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4NsGobpFKYG0+9q16NFjPfNL+j+9zEj6f7u/U1rk9fNTvLUztldhfWwfSjh2vvlKLishNJ X-Received: by 2002:a17:907:7f04:b0:77d:5bad:46d7 with SMTP id qf4-20020a1709077f0400b0077d5bad46d7mr15541363ejc.663.1663664647788; Tue, 20 Sep 2022 02:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663664647; cv=none; d=google.com; s=arc-20160816; b=O5s9e9DESjuinZyQeknJ+I1I2kM1Ruqted2ZkFaduN66+IRGYXyTwMwSm30CyEffXK W96FDWd39NxRl5ZZ6O7xsTZSC6c5vWyjZ7+dgZACiKrCBYDvl7Mu7mdQb3Tg+t9GWuZ6 20vedHY3PSL+kPc3/oX9t7qeFnso4S9ckByBTiIL5VJLDZ8n45RDFIMsYmLHxlLDGDBY d6x7kBjhdUSc00uvAiZKhcLbmJSRD39eTyGRJbPWbfbH3A51dhCZaR7QRhFkA3CuPBl9 Z6nJtyK+0WxOdlIAmJtjPNCQwtBwrWLE2R4bbn7cp4v9l944Jfn2bBEIz593qiblZj+E zbGg== 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=0XR8emLVG+MjTQBnAamxtSFF0ryvTzZoD+9b6kxituQ=; b=Ma1KF8j+9rSXcBqUR+h8l57rJt+c03hV/NBXzauaPcoOn/RuoUcDy+Od2eapJPjcUI G2LhpGDcfQc30p9UsqYiZr9tvOX/kWM9gxQslLLASdup66LwuHZvJo/BUouHLwHfZCwD xEfu5/eEoSs+rkoAJQq61fV3Wu9k0MZ2GupoHWPlCsY6JGwXpHTMGdf2bdlJLf0+Pk/i YvWg83kRTeURR5yCWNFIrnhPtH564pkX+DGgDCzq849b7HQ+i2owS3+8zaciXnfZ1csU TU00z3qIjCbl4gvWa/Ho4B8oaxhHoNawixqO5Pg0u1Q109keo7CaDuHgh+ot8B2YXjVW hI/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HrnEPjJ6; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb10-20020a1709077e8a00b00769d94690fesi1088041ejc.326.2022.09.20.02.03.39; Tue, 20 Sep 2022 02:04:07 -0700 (PDT) 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=@intel.com header.s=Intel header.b=HrnEPjJ6; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230344AbiITIyJ (ORCPT + 99 others); Tue, 20 Sep 2022 04:54:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbiITIyF (ORCPT ); Tue, 20 Sep 2022 04:54:05 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 196686B64E; Tue, 20 Sep 2022 01:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663664045; x=1695200045; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=bE7Qmiy6NhKs0sdl809v9zg8SKzJzql0subSBeUamVk=; b=HrnEPjJ677FoXIU2d3z9K6U++X6aXVrotmUMGtyr+CdQSETZ5bpOHKjY G42WF9iXRgJ8ypbCmlHJytvJk7hZPnrlWoIW0fFF/yWH1g8r6qIsjU0G5 mTpNlSJbcaFgQJMuq3TmcD3WphIbWnQ/f3r90mbTTOi4RQbIqdpHrYp6Y kpwX3T5l7eyXqESQ8BjR7RGjRvgT9UsKZcBT4MJGKyF1d0JW/YV3N73no I7w6ai0UhFVEgr9HOLn3dlgNpTSm5CwsFgCuCMgNTvqNR9kbwD8F6Fn0l 1AmsOnG3XVhqDMh1YAt8A1icmLU50GxVamNVBUeYDDYdR9Jo7xT+iGaOf w==; X-IronPort-AV: E=McAfee;i="6500,9779,10475"; a="298364557" X-IronPort-AV: E=Sophos;i="5.93,330,1654585200"; d="scan'208";a="298364557" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 01:54:00 -0700 X-IronPort-AV: E=Sophos;i="5.93,330,1654585200"; d="scan'208";a="614317268" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 01:53:56 -0700 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id A54D1200DA; Tue, 20 Sep 2022 11:53:54 +0300 (EEST) Date: Tue, 20 Sep 2022 08:53:54 +0000 From: Sakari Ailus To: Marco Felsch Cc: Laurent Pinchart , mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, kishon@ti.com, vkoul@kernel.org, hverkuil@xs4all.nl, jacopo@jmondi.org, kieran.bingham+renesas@ideasonboard.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, kernel@pengutronix.de Subject: Re: [PATCH v2 4/4] media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver Message-ID: References: <20220916134535.128131-1-m.felsch@pengutronix.de> <20220916134535.128131-5-m.felsch@pengutronix.de> <20220919171142.6av6ap5gwweldado@pengutronix.de> <20220920083908.st4h3pb6usn4zavu@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220920083908.st4h3pb6usn4zavu@pengutronix.de> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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 Marco, On Tue, Sep 20, 2022 at 10:39:08AM +0200, Marco Felsch wrote: > Hi Sakari, > > On 22-09-19, Sakari Ailus wrote: > > On Mon, Sep 19, 2022 at 08:37:23PM +0300, Laurent Pinchart wrote: > > > > > > + ctrl = v4l2_ctrl_new_int_menu(&tc358746->ctrl_hdl, NULL, > > > > > > + V4L2_CID_LINK_FREQ, 0, 0, > > > > > > > > > > Shouldn't the max argument be set to the number of items minus 1 ? > > > > > > > > Right now I would keep it that way since the driver only supports one > > > > link-frequencies setting. So the ctrl don't let the userspace assume > > > > that there are more than one link-frequency. > > > > > > Good point. Can you add a short comment above the call to explain this ? > > > > Wouldn't it be just easier to do what Laurent suggested originally? The end > > result is the same, isn't it, and no comment needed? > > The end result depends on the device-tree given "link-frequencies" > property. The driver currently takes only one frequency but the > system-integrator of course can specify many more. In such case the 1st > is used. If I go with Laurent's comment, all frequencies would be shown > to the user-space but IMHO this shouldn't be the case since the driver > supports only 1 frequency. Yes, indeed. The driver can later be amended to support this. > > > > > > > > > > + link_frequencies); > > > > > > + if (ctrl) > > > > > > + ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; > > > > Now that this is a bridge, this value presumably doesn't need to change. > > The value can change, e.g. if you have a few freq. to allow a wide range > of frame sizes. This can be the case to conform the emv tests. So there > can be a freq. for smaller frame sizes and one for larger frame sizes. Ack. -- Regards, Sakari Ailus