[RESEND,v6,13/17] media: qcom: camss: Fix support for setting CSIPHY clock name csiphyX
Message ID | 20230925154707.837542-14-bryan.odonoghue@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp1581518vqu; Mon, 25 Sep 2023 17:31:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGIXF53k62uUukIAX/k8j0wciR7qcf/1mxnbuOSWqATLd0fuEKUyrL8Dj6o9+HXXD9dY+BQ X-Received: by 2002:a25:c093:0:b0:d89:41ef:4cf7 with SMTP id c141-20020a25c093000000b00d8941ef4cf7mr2282734ybf.34.1695688265143; Mon, 25 Sep 2023 17:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695688265; cv=none; d=google.com; s=arc-20160816; b=p8O7L4g1dF59AqLl0lPCnMh2JOvQIY7t+8G5/4he7kGhFoCDkEjp0OKHxurTDo+/XR u3Wlvkm4161f6LH3LhGRyR5ka3koBeHaYadO12l3J5a8ehjZk70/Xt4cgq5ap0y3/h8G 0oQeVum/3U0/4laIe/JB0MXgc9Ut0y2YQCPFnQAqIUZxgvPKy0wceMRc+oKMw9cdYOqY EVwWc5dXpa1q0NwEMaUT26VOV5G1zkpAJzZ1Os/O6zDXPB+8u+Aty+Va4iBrwPJzVN+r R4oGhN0Tc+gQqSDfjO6c8MgONqUJcW6gXf7DjYN7IzHMGHVILl7EBqZ0PEt2KBby440Y QXjA== 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=5xDdHYwLfg0JHODBOnX5/PYY4PGuDuMNIjsuATRv640=; fh=YrDxnoZE2zu1w4A5O/pMyb6W2NB5EAkKDOR3m7KPwy0=; b=RE4rR8G1PF133M+AruTaQo9aLWhNbNCA6TVrw4XSAgqYQUxkbTbDGuWdHzrKFiWEkt chz4KAJ52Sconq9qnJss9uFxYPmWNnBIOgav1C/K7g/cajrVN8K1+eXSNEummGz7O+D9 5ca+aw58YEK0ftlG0pksID4ATp/7qO3cihZr20IWFORi87qrFO5ihwHfaflcUPWxE6ee uQroGYXsFm63FZjAW+uNaIoTp89xPnAXzdaGhxc/fLD0rUZ21T+JgnmL3Uep7HVDDFaA jXc1ghWNFtgAldUeIlCK1fmnJ5F9BGDGojHvu2BKoQZ62Gdly8adVnHfl4/mMNRwYGuu DhlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yi39ZKbw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id c5-20020a6566c5000000b00565e6a5b065si488138pgw.107.2023.09.25.17.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 17:31:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yi39ZKbw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6F391801B492; Mon, 25 Sep 2023 08:48:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233293AbjIYPr7 (ORCPT <rfc822;pusanteemu@gmail.com> + 29 others); Mon, 25 Sep 2023 11:47:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233035AbjIYPrg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 25 Sep 2023 11:47:36 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3C9E109 for <linux-kernel@vger.kernel.org>; Mon, 25 Sep 2023 08:47:26 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-307d58b3efbso5658960f8f.0 for <linux-kernel@vger.kernel.org>; Mon, 25 Sep 2023 08:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695656845; x=1696261645; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5xDdHYwLfg0JHODBOnX5/PYY4PGuDuMNIjsuATRv640=; b=yi39ZKbwvkkRU1QBDvj6QMHYmLSVA/E1dXe57UugoqF6n9nqJWeWweRdaDtvQnylV7 Ci0GeN8jZ4VtWa0xZIHNHmDwEuLzjogNfdtmqiQ0ldcFFhToFg07oRQs+mn0HlgStrcw fJ4KXwtr2TIpCjACpRJmeQglXFjbIhyTpGR5ObEpqrUxUOr6nEqnbcGpbeZjfs70B9a5 BhqSatkKdmOr9+8tiwr535JvLWRmkjVJ+pffC5CvibPTEznDXVd9WnhRDryOqTYexHkT 8oa6rsrVR1ftDyW66PH+3T6zXGIcFHGC6JFrBYXY6MTd47qWvyWxiVyhSBU0jmt97OPB sKSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695656845; x=1696261645; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5xDdHYwLfg0JHODBOnX5/PYY4PGuDuMNIjsuATRv640=; b=Pk4mxtqlbSEytgEXPFdTxjb4wwLHtncZXQY+kLTYY/Y6Pvu//vCUKpjR9KZodiSHf0 390+6cuHEFw3vroBTbkZ66pJlBwcDxJOoTr2UI+bS0IcytE8ZyoXN7FKbQUyDsClQtoA Kilbtp7SJVH5eP4zVYFDpr9I+R1h/bg9GpFEicvdnPYWXcRt5KW6y9vS8M4KDMypY43r gKHQzx4qnWdEuujHs/MDcSw/8fYOQY4Ibd2vdeOPLT4HDcqWahPBEF3PDICVIcUxi1W4 4R9Px3BtxyFh2quVzrNCPdfrxHpUGow/yfWPoveIEE6+UO+QJMXCvJDl4OCX7BMWXtQE WbUg== X-Gm-Message-State: AOJu0YzLep0Mr/f5uBHNJ1RkcbYYpPy4be4qQmbwTasAYaA6TQq/gOaE x/05kynvRDkGdbPN9gY9bZGTKg== X-Received: by 2002:adf:f485:0:b0:317:f046:25ef with SMTP id l5-20020adff485000000b00317f04625efmr6665188wro.44.1695656845402; Mon, 25 Sep 2023 08:47:25 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id d4-20020adffd84000000b0031f34a395e7sm12077536wrr.45.2023.09.25.08.47.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 08:47:25 -0700 (PDT) From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com, rfoss@kernel.org, todor.too@gmail.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org, sakari.ailus@linux.intel.com, andrey.konovalov@linaro.org Cc: linux-kernel@vger.kernel.org, Bryan O'Donoghue <bryan.odonoghue@linaro.org> Subject: [RESEND PATCH v6 13/17] media: qcom: camss: Fix support for setting CSIPHY clock name csiphyX Date: Mon, 25 Sep 2023 16:47:03 +0100 Message-ID: <20230925154707.837542-14-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230925154707.837542-1-bryan.odonoghue@linaro.org> References: <20230925154707.837542-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 25 Sep 2023 08:48:11 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778058018212915576 X-GMAIL-MSGID: 1778058018212915576 |
Series |
None
|
|
Commit Message
Bryan O'Donoghue
Sept. 25, 2023, 3:47 p.m. UTC
Several of our upstream and soon-to-be upstream SoC CAMSS dtsi declare
csiphyX as opposed to the older clock name csiX_phy.
Right now the CAMSS code will fail to set the csiphyX clock even if we have
declared it in our list of clocks. For sdm845 and sm8250 we appear to "get
away" with this error, however on sc8280xp we don't.
The right approach here is to set the clock when it is declared. If a SoC
doesn't require or a SoC driver implementer doesn't think we need, then the
clock ought to simply be omitted from the clock list.
Include csiphyX in the set of permissible strings which will subsequently
lead to the csiphyX clock being set during csiphy_set_clock_rates() phase.
sdm845 and sm8250 will work with the code as-is so I've omitted this from a
suggested Fixes list.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/media/platform/qcom/camss/camss-csiphy.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c index 20bb361e9ad05..edd573606a6ae 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c @@ -677,6 +677,10 @@ int msm_csiphy_subdev_init(struct camss *camss, if (csiphy->rate_set[i]) break; } + + csiphy->rate_set[i] = csiphy_match_clock_name(clock->name, "csiphy%d", k); + if (csiphy->rate_set[i]) + break; } }