Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp81819rwb; Fri, 4 Aug 2023 09:27:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwlx2yNLAOY2TG5D4OaIpyWj0OG2ThmzXL2Ts/5Adfg0WpKdGlV5+eY7fngj3sLM+I8Olx X-Received: by 2002:a05:6a00:2d8c:b0:687:1a86:7a78 with SMTP id fb12-20020a056a002d8c00b006871a867a78mr2271132pfb.9.1691166448122; Fri, 04 Aug 2023 09:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691166448; cv=none; d=google.com; s=arc-20160816; b=Y+3sebL//6TPSSJiUm52odkI9+x7BGL0jRShCBxUcn+Ncb6cCOHBIMOJ8sOcChXyMr ci5NCoGUx2ysES5Ye5+VLeYQZ8xDXpa5LTO6eI+ZvuPyl80ZHr2XxzO9cuYNUSfDU1Nm D/siuG5iK3tAvO7ddtPgOwW+KOEew5io8FpOTv/oXvQB7SiIotwyjjwZTVdu+eY19NQa EYx/HwDYF0wQ+6TtZMra38Hq0lguMDdl6YKTKQLMbNO6dp3yxOQ02MWKL2d0N/l+Pgbi sTfURvhN4vqXeX8mYd3UPQL//rgJphE4wRl5SkBzMVEC4RQuDfGmN3RVzhrBvBbuiFAc KcMA== 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=+LZBwIaE+oAAZTAGTeOHXkg3Tm/u3i+LK+Ey4FTfqyE=; fh=qn1uQCgMIld/R6Cfi904jJDZt5KQ9wnnJQuD9lE1nGw=; b=HCXeLxxLCRgFfeX96LHyprW2sGneHBJJC1IUK296LUDYuKHsW6VXGsJg2CZRzi4aP1 YrihIBTyTg/KNKnPxIgq1KHDfkhqOvg26+pJO1huGyeowmBBU70nD6ZvThc9qk8EfSA1 rLRoGz1TNoiWuOJS8LefSxFK+uxxJ4IGEUDHpDB7Gr/xnpb5Ux20Oki5cxbTebA7hxSX u2MHnsq3wUrswhPXfBMChniM7az9knC7xbg85q8V/lbRQl4ZeckAZYaRfF7mb5esPx9L 5/TCNTb73cRL+W+fCwHoW6rGchNeGoQIlxxjlQXcXUwtAjSRaDw9tHNlRTK6MkC1ofkp BQSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=NwnKqGOI; 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 e2-20020a656882000000b00553823e936fsi1883748pgt.135.2023.08.04.09.27.14; Fri, 04 Aug 2023 09:27:28 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=NwnKqGOI; 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 S230165AbjHDPFI (ORCPT + 99 others); Fri, 4 Aug 2023 11:05:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjHDPFG (ORCPT ); Fri, 4 Aug 2023 11:05:06 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDF0846B2; Fri, 4 Aug 2023 08:05:04 -0700 (PDT) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C141012E4; Fri, 4 Aug 2023 17:03:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1691161437; bh=tr+A81mL8nDcTz82HPvWaHO5DYHcvkl8gnXU6YqP/oA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NwnKqGOISSHCoT4g/onIOtdggT3c8VNVe6JntI6V+8rCGpENwgWORyCFsw5KPHQPn z9aUrJ9sF4Ag2/bqkXDyI2JmTZAejBZ21hI2p9CWsqv8wQDHzHf9Ryv+MgK5XnDPal Bm3mUPZxQnzBSY8IvBa5/qa4AO6u5zgCBJbM3K2k= Date: Fri, 4 Aug 2023 18:05:07 +0300 From: Laurent Pinchart To: Julien Stephan Cc: AngeloGioacchino Del Regno , Louis Kuo , Phi-bang Nguyen , Florian Sylvestre , Alexander Gordeev , Andy Hsieh , Conor Dooley , daoyuan huang , devicetree@vger.kernel.org, Hans Verkuil , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-media@vger.kernel.org, Matthias Brugger , Mauro Carvalho Chehab , Moudy Ho , Rob Herring , Vasily Gorbik Subject: Re: [PATCH v2 2/4] media: platform: mediatek: isp_30: add mediatek ISP3.0 sensor interface Message-ID: <20230804150507.GI12951@pendragon.ideasonboard.com> References: <20230630100321.1951138-1-jstephan@baylibre.com> <20230630100321.1951138-3-jstephan@baylibre.com> <72ixohoacq4vgj7nqg4l5gt5bs5e5ewain6a5ovqs3winx3qzz@sbg5lfohq5mq> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <72ixohoacq4vgj7nqg4l5gt5bs5e5ewain6a5ovqs3winx3qzz@sbg5lfohq5mq> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 On Fri, Aug 04, 2023 at 04:50:05PM +0200, Julien Stephan wrote: > On Mon, Jul 03, 2023 at 01:02:02PM +0200, AngeloGioacchino Del Regno wrote: > > Il 30/06/23 12:01, Julien Stephan ha scritto: > ..snip.. > > > + > > > +static const struct mtk_seninf_format_info mtk_seninf_formats[] = { > > > + { > > > + .code = MEDIA_BUS_FMT_SBGGR8_1X8, > > > + .flags = MTK_SENINF_FORMAT_BAYER, > > > > Each entry fits in one line. > > > > { .code = MEDIA_BUS_FMT_SBGGR8_1X8, .flags = MTK_SENINF_FORMAT_BAYER }, > > > > Hi Angelo, > > Actually not all entries fit in one line. The last 4 ones don't: > > { .code = MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, .flags = MTK_SENINF_FORMAT_DPCM | MTK_SENINF_FORMAT_INPUT_ONLY }, > which is 115 chars.. > > so what is the best? put all in one line except the last 4 one? or keep > them all as is? I'd keep them all as is. > > > + }, { > ..snip.. > > > + udelay(1); > > > + mtk_seninf_input_update(input, SENINF_CTRL, CSI2_SW_RST, 0); > > > > Is there any way to check if the CSI port did reset, or is it *guaranteed* to get > > out of reset in a microsecond after deasserting SW_RST? > > I will double check this > > > > +} > > > + > ..snip.. > > > + > > > + val = mtk_seninf_mux_read(mux, SENINF_MUX_CTRL); > > > > rst_mask = SENINF_MUX_CTRL_SENINF_IRQ_SW_RST | SENINF_MUX_CTRL_SENINF_MUX_SW_RST; > > > > writel(mux->base + SENINF_MUX_CTRL, val | rst_mask); > > writel(mux->base + SENINFMUX_CTRL, val & ~rst_mask); > > > > that's better, right? :-) With mtk_seninf_mux_write() instead of writel(), yes :-) > right :) > > > > + mtk_seninf_mux_write(mux, SENINF_MUX_CTRL, val | > > > + SENINF_MUX_CTRL_SENINF_IRQ_SW_RST | > > > + SENINF_MUX_CTRL_SENINF_MUX_SW_RST); -- Regards, Laurent Pinchart