Message ID | 20230919-fp5-initial-v2-2-14bb7cedadf5@fairphone.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3409803vqi; Tue, 19 Sep 2023 07:02:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFn5KLmMvIoaUG5BE+DTKoyqmmpJqwxz0fPaXFNZmFfvv0jbTGc9jDZPrsvTJ840apPdXb9 X-Received: by 2002:a05:6a20:1442:b0:14d:fefd:a2eb with SMTP id a2-20020a056a20144200b0014dfefda2ebmr11870261pzi.22.1695132160065; Tue, 19 Sep 2023 07:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695132160; cv=none; d=google.com; s=arc-20160816; b=lalziSGNOgLg/Vcov+497Sq6TPM5uhDwYDW4e4Kd+lzxFpxXU62xp9c2lAPIiLNr3o mNUvJgjGg6tEe2kBKjvS2xgtj3hiW+/Sy/ptguIq9mKj3PYCdsgrwuJYiNX3G+mLbuIX 41hvrvYvKLeLY5BV1SbRYOVe9KeEsA7OoCtb2bzFoCqLnncs8f8/dvXFHRgA7rkneBQv by0D6mjITrWQTUXpHM/9O6tLlNqKx3/wdfsa+0FhfPk3mY792JRzNBd0PdBnMbzVnFt+ inzd1g6y/vsecaGre8BRZH1gG6oBmWYTyLoEoW8SIzS8Cg/9E0ueqZHRPFT56nUNPdzW Nu7g== 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=kA0NToIbWuR6d6alRKXkP3KfjrWVM/I6SsyvDthzTxU=; fh=57Ku0CTLA12Md3K6sQXAemFuM2rYfMcgUlRGEKAlkzM=; b=eSpD5u1InF8uea5bB317YSx83VO9JHtp8xC6mWAVCAebkxa6SsdfueM0ABlFIGTFqg zwqGDCyAdDy8y/77bqgddJ8dpAa364b35eWc5AGPSygagw50CRRkm7N0N7tIsH8Sez7t vzV3oVpwJz1qGyyup3+U698lOo9GniX8rlnObAmTNgB/ODSthWlFnHacylgehOmsx7Mk mqCApoBkvppftcD6lPy2r5zrtBJcTXWm7e0bKldnEQUBYZsE2jALcbuPuZK+vDrhB1VG pBrM4DX+S0mb6EngdQcM+fsf2fJWi3m3wOgQGQC+/qlI1dIwlM1YPZsMJe4TtXOjRW8q Veug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b="CwS/cyRE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id cw2-20020a056a00450200b00690d42e334fsi164188pfb.181.2023.09.19.07.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 07:02:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b="CwS/cyRE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 632C581C806D; Tue, 19 Sep 2023 05:47:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232192AbjISMqY (ORCPT <rfc822;toshivichauhan@gmail.com> + 26 others); Tue, 19 Sep 2023 08:46:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232110AbjISMqQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 19 Sep 2023 08:46:16 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8AF9128 for <linux-kernel@vger.kernel.org>; Tue, 19 Sep 2023 05:46:07 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-532addba879so2073627a12.0 for <linux-kernel@vger.kernel.org>; Tue, 19 Sep 2023 05:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1695127565; x=1695732365; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=kA0NToIbWuR6d6alRKXkP3KfjrWVM/I6SsyvDthzTxU=; b=CwS/cyREVeEVLjvlCgp1qJoyrdqn3ckGQeuCVT7k803ktVJdi99D8nGB4rCroWlSH6 Z8VEdaVRvV/2JjQ+d8twp+AoEZfAzUMOMoSbq5FXjhkeIyMRYPKRQfUo6zwQ/EcjaMJd 5lbL4f5MQvC9fo0IpzWO3Fs+K6rlyUQg2acbjEuiTAv+hSrT56vYc/9hzb5nUXPjItae SY3sKi+zVCnO5oPtRDC9zHBBPUZMVIutka6hlo1TyaMGzQQGth0WxF50pOVvf6ATNTOF N5JpqylEJnqXK5oAlZFGIwEQS/bfjwgDK/jsn3y5f1Ih+4RE0CXRIdHwIlvjMitcfDTb CG9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695127565; x=1695732365; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kA0NToIbWuR6d6alRKXkP3KfjrWVM/I6SsyvDthzTxU=; b=MsRGp4crvs79w4yifS2QsHXUGUUtPSzJS9cTnAKcjUcKm6jO/eLyjxi710tOo6MOgU jyfud/DYl/l2Q7RdrAavArr0PM/SJojrtruIoOmuMg0hC63v5DEAXHA7T1ef0DO5q5cc e0IQv67yRIwGWj7wgdTuZLHxpymDXfqph6ULP5q+50I+OyQiFv6MqRa34Jwcy/xvtcfs t+6lhnnjU0waKTJIMCgqXLDRQ/WJW3VjfeooSpZ97+8cyN3S6yq09wB3Rnb07U19c0+N x2SLAxCWsrHWbZobw8uATUk8WgAFBIKHLtkcSjFyV7XC1UHkS3HHXjoguJWdU5q5eQXf qfWA== X-Gm-Message-State: AOJu0YyNkEOM9tbyXzQoWvNy4qRj6UbBOL2Retx0bM5HKA7tin7jLTF9 FIU/tyodR7iLNoYcLEr3Fhmjtn8ST1TNQa9kLc8fyaGK X-Received: by 2002:a05:6402:43c3:b0:531:157d:ba2d with SMTP id p3-20020a05640243c300b00531157dba2dmr3611058edc.4.1695127565674; Tue, 19 Sep 2023 05:46:05 -0700 (PDT) Received: from otso.luca.vpn.lucaweiss.eu (static-212-193-78-212.thenetworkfactory.nl. [212.78.193.212]) by smtp.gmail.com with ESMTPSA id dn22-20020a05640222f600b00532c1dfe8ecsm635878edb.66.2023.09.19.05.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 05:46:05 -0700 (PDT) From: Luca Weiss <luca.weiss@fairphone.com> Date: Tue, 19 Sep 2023 14:45:56 +0200 Subject: [PATCH v2 2/7] nvmem: qfprom: Mark core clk as optional MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230919-fp5-initial-v2-2-14bb7cedadf5@fairphone.com> References: <20230919-fp5-initial-v2-0-14bb7cedadf5@fairphone.com> In-Reply-To: <20230919-fp5-initial-v2-0-14bb7cedadf5@fairphone.com> To: cros-qcom-dts-watchers@chromium.org, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Linus Walleij <linus.walleij@linaro.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Viresh Kumar <viresh.kumar@linaro.org> Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, Luca Weiss <luca.weiss@fairphone.com> X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 pete.vger.email 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 (pete.vger.email [0.0.0.0]); Tue, 19 Sep 2023 05:47:11 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777474899965052757 X-GMAIL-MSGID: 1777474899965052757 |
Series |
Initial support for the Fairphone 5 smartphone
|
|
Commit Message
Luca Weiss
Sept. 19, 2023, 12:45 p.m. UTC
On some platforms like sc7280 on non-ChromeOS devices the core clock
cannot be touched by Linux so we cannot provide it. Mark it as optional
as accessing qfprom for reading works without it but we still prohibit
writing if we cannot provide the clock.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/nvmem/qfprom.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
Hi, On Tue, Sep 19, 2023 at 5:46 AM Luca Weiss <luca.weiss@fairphone.com> wrote: > > On some platforms like sc7280 on non-ChromeOS devices the core clock > cannot be touched by Linux so we cannot provide it. Mark it as optional > as accessing qfprom for reading works without it but we still prohibit > writing if we cannot provide the clock. > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> > --- > drivers/nvmem/qfprom.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Douglas Anderson <dianders@chromium.org>
diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c index 14814cba2dd6..525be03b7bba 100644 --- a/drivers/nvmem/qfprom.c +++ b/drivers/nvmem/qfprom.c @@ -423,12 +423,12 @@ static int qfprom_probe(struct platform_device *pdev) if (IS_ERR(priv->vcc)) return PTR_ERR(priv->vcc); - priv->secclk = devm_clk_get(dev, "core"); + priv->secclk = devm_clk_get_optional(dev, "core"); if (IS_ERR(priv->secclk)) return dev_err_probe(dev, PTR_ERR(priv->secclk), "Error getting clock\n"); - /* Only enable writing if we have SoC data. */ - if (priv->soc_data) + /* Only enable writing if we have SoC data and a valid clock */ + if (priv->soc_data && priv->secclk) econfig.reg_write = qfprom_reg_write; }