Message ID | 20230720-fpdlink-additions-v2-4-b91b1eca2ad3@ideasonboard.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp3042067vqt; Thu, 20 Jul 2023 04:16:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdhC3zfd2GAh06lApok6NPlBZ980lxXSvlqOo9YxD+9+IY23UXKkDQA+I6I90HUguFEAST X-Received: by 2002:a17:902:bb89:b0:1b8:1b79:a76d with SMTP id m9-20020a170902bb8900b001b81b79a76dmr16860539pls.44.1689851805146; Thu, 20 Jul 2023 04:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689851805; cv=none; d=google.com; s=arc-20160816; b=e6rnAvjp8Kt0Be0qxmtKUYPrv7fmVKKpCocG34AwCGMARw0gQJeKYcCatyqOVr5tqW L0VN3iSg2zJQc0zGiww2p8nDW9rZucCL+vn4en2usseUrOdb5ZE3jjMhPFYEA5tkyoY7 Qdyk7O3GRhkG21x14dm8woHYeXAruQT9bePDbJFRDWrbqN+e1wK/pVqax5Ygi8Cqs6YG qBeoyaDo4E13Vgcan7HhsoqE3zXNES2FKyT0FYd3+aTcCcg+F5A6pbOh3BwcfJSORNF4 XMKTfDKK1u4E1TVeyzFN4u5hPW3yEmBkrF7qzSvwAh5zl3o+PkrabnUbMgOIHZiys4j9 IB9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=oc4axegdAh7K62niS8I5wRO/sgWWa30gMoagLORzAwk=; fh=cL8V8cgQpxlbGU1a/BFb9J43s+fdNyaB+cfzJFyBZIE=; b=L4fv6tMg109Ztmhw3RPLb90mDaXyd7sqN4RnBIiynRzsOBSRdpv1MDFaIM4bKirAKM P94llBoDeMzEPj628djcebvxcq5cULelxCDgNXCYD3encBFFgj3bHjWHHP94ZnEZsLqR XquL7NWHkVCAWv89kfRSEiW6Tyc1uvPqMxNgLqCzxsDA+g6VGzygJMCleQzT3NecaA70 HIsU8oUzk8u7ykjYp4Pd3XHV+5KFpbuiSPTJcBcf+H3K/q68aIn5Pctpzf/9OiRgivgn cSEhljuyetwqbmIRS9vCFTeq5MP0mxdP9Swvt7JIera7XDMo7gGOLm8UOTnd2jdTrVR9 lHfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=kpfxg6FZ; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kz7-20020a170902f9c700b001b9ca3550c0si746872plb.52.2023.07.20.04.16.31; Thu, 20 Jul 2023 04:16:45 -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=kpfxg6FZ; 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 S231407AbjGTKb5 (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Thu, 20 Jul 2023 06:31:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231377AbjGTKbp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Jul 2023 06:31:45 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5945310F1; Thu, 20 Jul 2023 03:31:44 -0700 (PDT) Received: from [127.0.1.1] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BA0483697; Thu, 20 Jul 2023 12:30:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1689849045; bh=3zg0TxkVcXHwj80fcueaquBqUvRn/uJahEbl2HWcRHo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kpfxg6FZprwwUtPx9ietn1V4s0lFbbWhlMEwizaf+z1blPmYtbwBJT3DnkbVK0Ss/ Qd0lTD3yCP6aGS3HJnRaQqytNZKDkZfWXd2Ynul8b69Y5XIb7lUxLYLSiWDow4//5N rPBWN77RwyJmCIVCxDTA+48fnZT/uayuNmKtwFfo= From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Thu, 20 Jul 2023 13:30:35 +0300 Subject: [PATCH v2 4/8] media: i2c: ds90ub953: Handle V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230720-fpdlink-additions-v2-4-b91b1eca2ad3@ideasonboard.com> References: <20230720-fpdlink-additions-v2-0-b91b1eca2ad3@ideasonboard.com> In-Reply-To: <20230720-fpdlink-additions-v2-0-b91b1eca2ad3@ideasonboard.com> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Luca Ceresoli <luca.ceresoli@bootlin.com>, Andy Shevchenko <andriy.shevchenko@intel.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Sakari Ailus <sakari.ailus@linux.intel.com>, Hans Verkuil <hverkuil@xs4all.nl>, Satish Nagireddy <satish.nagireddy@getcruise.com>, Matti Vaittinen <mazziesaccount@gmail.com> Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1301; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=3zg0TxkVcXHwj80fcueaquBqUvRn/uJahEbl2HWcRHo=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBkuQ0FWYffPp2nMhTi2liX/2xEN899/vyaYUJJX yU9efkuiHyJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZLkNBQAKCRD6PaqMvJYe 9RPAD/47epS1smq6O8YL2r+cKuMGUA+uCmzry2xhn4N/I7X51aKRcgpq22drWpksdA8nKP81kCH WASbwl9eJnahZX37OWbDsAvLFJsU9oryaAkDooOp4lizGw/c8AjXlLrjsIt+3mjK+6EFKvmAMjP b+lulfsxM08Dbx7vivjtMVR72qed3+YoD/CS11CPK+Miq7FYqMzwWRivgyoPjAcqD5VXqd0uG43 cSpfrpx0N85dnvpjBwZ4V6cIdyaW61FCjsIPWX2CQsvcVrR5Rkf3xdy1b+s8SHfeuChe818j0Zj 9yB/QBDVO4ne9sGJHQ3Ke6PFGbcqM/4BQMGrUMqxz+H11WCNGbdsEb/swjUqHriec/fWuzlcVOO PKqAIdKWJBgMxINgkMB82cGxLnOLXV9cu3ZkOePqGu6mUMO+k1VKiLHZygPQe30MrdAm3qJblux ru3TGTn9ahKlgm7JkqVA+F/ENu3ESZvN3TsTyxCMf/My8CkCk0PUkxkVYR2O00/DxNn1sAnKaPi jwJfWbgiEbdxhQ+rpyK2WPwuW9f1eQlHrgaOTMYoVuLtmfFhaaCjJaPnYXPkqbsd2Vrc4rbLlJN dJsY6l42GtQ8jF2qXSxWVGMLyM50ErM0xU2KVhhqIyOzajwmLa1RV2Wfw1+JfGU9T94xv1t3K7Z qTS8JbfVtaLKXSw== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 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,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771938046185582643 X-GMAIL-MSGID: 1771938046185582643 |
Series |
media: i2c: ds90ub9xx: Misc improvements
|
|
Commit Message
Tomi Valkeinen
July 20, 2023, 10:30 a.m. UTC
Handle V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK flag to configure the CSI-2 RX
continuous/non-continuous clock register.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
drivers/media/i2c/ds90ub953.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Comments
Hi Tomi, Thank you for the patch. On Thu, Jul 20, 2023 at 01:30:35PM +0300, Tomi Valkeinen wrote: > Handle V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK flag to configure the CSI-2 RX > continuous/non-continuous clock register. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> > --- > drivers/media/i2c/ds90ub953.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c > index ad964bd6c7eb..ad479923d2b4 100644 > --- a/drivers/media/i2c/ds90ub953.c > +++ b/drivers/media/i2c/ds90ub953.c > @@ -138,6 +138,7 @@ struct ub953_data { > struct regmap *regmap; > > u32 num_data_lanes; > + bool non_cont_clk; Maybe non_continous_clk for consistency with 1/8 ? Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > struct gpio_chip gpio_chip; > > @@ -1139,6 +1140,9 @@ static int ub953_parse_dt(struct ub953_data *priv) > > priv->num_data_lanes = nlanes; > > + priv->non_cont_clk = vep.bus.mipi_csi2.flags & > + V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK; > + > return 0; > } > > @@ -1201,7 +1205,7 @@ static int ub953_hw_init(struct ub953_data *priv) > return dev_err_probe(dev, ret, "i2c init failed\n"); > > ub953_write(priv, UB953_REG_GENERAL_CFG, > - UB953_REG_GENERAL_CFG_CONT_CLK | > + (priv->non_cont_clk ? 0 : UB953_REG_GENERAL_CFG_CONT_CLK) | > ((priv->num_data_lanes - 1) << UB953_REG_GENERAL_CFG_CSI_LANE_SEL_SHIFT) | > UB953_REG_GENERAL_CFG_CRC_TX_GEN_ENABLE); > >
diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c index ad964bd6c7eb..ad479923d2b4 100644 --- a/drivers/media/i2c/ds90ub953.c +++ b/drivers/media/i2c/ds90ub953.c @@ -138,6 +138,7 @@ struct ub953_data { struct regmap *regmap; u32 num_data_lanes; + bool non_cont_clk; struct gpio_chip gpio_chip; @@ -1139,6 +1140,9 @@ static int ub953_parse_dt(struct ub953_data *priv) priv->num_data_lanes = nlanes; + priv->non_cont_clk = vep.bus.mipi_csi2.flags & + V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK; + return 0; } @@ -1201,7 +1205,7 @@ static int ub953_hw_init(struct ub953_data *priv) return dev_err_probe(dev, ret, "i2c init failed\n"); ub953_write(priv, UB953_REG_GENERAL_CFG, - UB953_REG_GENERAL_CFG_CONT_CLK | + (priv->non_cont_clk ? 0 : UB953_REG_GENERAL_CFG_CONT_CLK) | ((priv->num_data_lanes - 1) << UB953_REG_GENERAL_CFG_CSI_LANE_SEL_SHIFT) | UB953_REG_GENERAL_CFG_CRC_TX_GEN_ENABLE);