Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp76642rdb; Mon, 14 Aug 2023 09:56:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHhrzn7ow0lubeyquvSNzsys6CoSqyQY1xeRqRTNC+rsZ2n0OWGQVQw2IWxISRbygiEwQKT X-Received: by 2002:a05:6a00:3a0b:b0:687:1706:e8bf with SMTP id fj11-20020a056a003a0b00b006871706e8bfmr12703220pfb.10.1692032192087; Mon, 14 Aug 2023 09:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692032192; cv=none; d=google.com; s=arc-20160816; b=vDSzlLLaWf1WRMJ24kMq0uFYJ/RtLuJoJqokcCGaIwkIvdgr89OAxUPpYLGg+MwnIR IBYvYETzVw6lmthqMan38blHkIRHPeugxf3L8Czlcp2vkXn0yHoVo6lbfX3PWbyA08Le YER46XH3VN60R9oNEWhdg9f5fln4o3aQYL9htHUudolI30Ces+zywfzT7hItSQgG5p3f 1XLaSsNcO/KnDcD/z3Fv/pEoPFSv6tot26M643Ol/eatEdCTx6C8YzUqFYYsqg5WaZd9 L0FmrM+JHcjwZLnM+j19gKiR8QL8mahO1AGO8C9Z7n83lKqXkT5QmMGDCpg5kRCLpRJP OEyw== 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=5CilnvTYr96ahQ3O2WrOgBxIJx4YDnh0XI4B0xmqb0M=; fh=zUAAL0oq2+kA0nMRT5WSj9jrme2MlEZTDW5RK2mes1s=; b=r9Gwf40J1+U/+h2Ojs0aVBESvjUOTHK40ovG33ltxXytAZd4t8ZQEaYEqY/7RRwdWD syA8+5jDx5cOiocNJX14QPKWCb1iSA1wSp2aPTClmQ9msVk8YuJJcOvuJ4MqHSRzxshY XMSP+4R7zAiNuC1Ujm2cJYgtZX1ExCxMLn+Q/GrpPjooeVz7+UGwslmhFToZklB4BnsO y/8TnFtfxecJCCPtxcakTnDZa77cASmVpAnkkLsiaB4+PDF4Bw+2fmAQrJ0Z0XG5BOJp bYz1lHxQjxN0TCRFDnGqAfpeK9ufFbOtsDhHmI5CZL7vrjaQ6jBbCRjY4dNX1pHAmTxX 8New== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BFvmf1AH; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a056a00085600b0066e608447d4si8721319pfk.102.2023.08.14.09.56.19; Mon, 14 Aug 2023 09:56:32 -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=@linaro.org header.s=google header.b=BFvmf1AH; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233032AbjHNPNg (ORCPT + 99 others); Mon, 14 Aug 2023 11:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232856AbjHNPNG (ORCPT ); Mon, 14 Aug 2023 11:13:06 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE1B71B5 for ; Mon, 14 Aug 2023 08:13:04 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3fe2048c910so40825865e9.1 for ; Mon, 14 Aug 2023 08:13:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692025983; x=1692630783; 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=5CilnvTYr96ahQ3O2WrOgBxIJx4YDnh0XI4B0xmqb0M=; b=BFvmf1AHI5Aq8gzxukHQqOLdavI/MlU/TWd29OnFQgc7zEfL5xyaQ22w5xrfdPTlGZ DplE5xmYHqAXMIPzS60HIAHJtiQVW2eGv/9EZHqwHpscHdcYx82K+YbyxzEPNKW0qSOk WBA9qQNuzVkeBEWHyS2fwlyNjPWMVkc7M8owuLhLMXp/4BW+V3245BVWp0H+pvgoq0Yo awgWb5Ej+ZtE2eJELwELhS2IPUh6sSPQu6kh36mRMm9D8irwkIbF8b8d7gO1jUx3trdV K1zDTnkqt/RoxJeQntrRkj+IT8o7A8g27skabyDv3rZig7GczqFy9pEvicwDtATIrEMb y2pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692025983; x=1692630783; 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=5CilnvTYr96ahQ3O2WrOgBxIJx4YDnh0XI4B0xmqb0M=; b=IZMcuxgLdi5rZBn3s47a6UrVLksLho96xJLJo213SyyUkFiyPuervjkrZtAgA5e3bT 9LZGiAW3fXds4wwXmDpceGmDZKibAFsKXv1YOzgVDDMiJGpAhMAG9a+xN4ddumBXPAsU Ga2zW+07s+ft6seWVaVqK/JAluz+AnqOclfNDyDqOtaLRH/Bi7BTZBw7feDTkWSY7nHr ABPjk5EGUYqmfQhUMfhwRtkd1aoY5iTk2yvvCw1JUcsV2h8WeW0n68W97UdlP7fkBhT/ XWll348rswdsHLAqv2oUNcOoYIrgQJCXrY9tlYhnpggMLLaBz2qrQEjCKjZmEflP4D6t nhew== X-Gm-Message-State: AOJu0YydxZWHQTKFgXz6hYunTUVeSw4f7wJssJ6Qvu9lJI4G3jA0k5Cr W5q8ppypLyn0qojBUpdsHVgraw== X-Received: by 2002:a1c:750f:0:b0:3fe:2624:484e with SMTP id o15-20020a1c750f000000b003fe2624484emr7929347wmc.38.1692025983526; Mon, 14 Aug 2023 08:13:03 -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 17-20020a05600c021100b003fe1c332810sm17644572wmi.33.2023.08.14.08.13.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 08:13:02 -0700 (PDT) From: Bryan O'Donoghue To: rfoss@kernel.org, todor.too@gmail.com, bryan.odonoghue@linaro.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com, andrey.konovalov@linaro.org Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v0 13/13] media: qcom: camss: Add support for setting CSIPHY clock name csiphyX Date: Mon, 14 Aug 2023 16:12:43 +0100 Message-ID: <20230814151243.3801456-14-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230814151243.3801456-1-bryan.odonoghue@linaro.org> References: <20230814151243.3801456-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_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Several of our upstream and soon-to-be upstream SoC CAMSS dtsi declare csiphyX as opposed to the older clock name csiX_phy. For newer SoCs csiphyX turns out to be a clock you really need to set. On sc8280xp for example we will encounter difficult to track down and root-cause RX CRC errors without setting the csiX_phy clock. On sdm845 and sm8250 we declare the csiXphy clock but seem to get away with not setting it. 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. Signed-off-by: Bryan O'Donoghue --- 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 baf78c525fbfc..d9c751f457703 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c @@ -687,6 +687,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; } } -- 2.41.0