Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26282460rwd; Mon, 3 Jul 2023 07:43:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlEjrGoW3nUT9bUsssDROZx+46u55NgVU8fWBWqxc0LSqbMDHgpAZ0VAhysY1oJSyWDic/rN X-Received: by 2002:a05:6a21:3381:b0:12d:10b6:98f9 with SMTP id yy1-20020a056a21338100b0012d10b698f9mr13485174pzb.56.1688395400101; Mon, 03 Jul 2023 07:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688395400; cv=none; d=google.com; s=arc-20160816; b=vdyM4h+wiIysI78tnu7CzJNwOeXQtKU1/CrxBzlFPCn9YYlg42VaRB0T6BKgHsOBCB x9Fh+1hhg8cjpwaQLccm+IPdBaUtcg1uVv6s4AiAW5y7jJusL4308sqzkygHBuVkEiob kXSrZlzBQ3Uxsr3kNP9opZ4gmKe57zoOvZpg8Bt1ctjs+83bZ1jyt30e8WK/j1bHrvIJ DycBUwyl81DVZSJdrmvTLd6W/cIW8nMNUHtG591RVH0QU5m2apDpzAfGVIPQveA9A7N5 1FCpzLid1fGrOeAX6QY6qcG4fX63PndClNS27GoK4bDGzepodLK2HkbDT03pBTmsmSGA dTKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=L9EGFOki3xiHnF+7FGAAtZBB7mQbs7Eeh4q/1Vj38Fc=; fh=l5lS8oAs5t8Y5N/RfkQUYDZHkqUIY8CJyPLENkzHRvA=; b=qc8DHJyshncWPpY8F4seXoOrC2kqOQpdw3SbsHyhfA2iFrY29qKf6XnlQpo3nt9VIW AckQG/D7fl8HYV8D1GW9F2brLBfaPkMp6ZCyYTTOMRwp+306EVIRl77urhJZNQZVkpwt WJZTuXkSQccBmE7MmjgBEeAomljyslenTBU2RzR/gwvL7kiyhI4zuYDB/58W6pIkNqz5 GGGS3Ys1yCJuMsD+G9xIpzQQ3osIycQtkx7IgXrqkSyP3ZrOJJ/n1uS1Z9gs4Rx52aWZ Rj7anFOd9g74vX6/CdPgrBbKyuXOxE9htxBzgMzuI7Qsg7o+Qn/HwaXodkftZUCa2JvZ hWew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gNYhxNbF; 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 li11-20020a170903294b00b001b886d36bf6si4279108plb.226.2023.07.03.07.43.07; Mon, 03 Jul 2023 07:43:20 -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=gNYhxNbF; 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 S230102AbjGCObp (ORCPT + 99 others); Mon, 3 Jul 2023 10:31:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230004AbjGCObn (ORCPT ); Mon, 3 Jul 2023 10:31:43 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0D53E5E for ; Mon, 3 Jul 2023 07:31:41 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4faaaa476a9so7184291e87.2 for ; Mon, 03 Jul 2023 07:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688394700; x=1690986700; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=L9EGFOki3xiHnF+7FGAAtZBB7mQbs7Eeh4q/1Vj38Fc=; b=gNYhxNbFP8IzfoJRIxeCaMSWWFNO1JHLT/5dtrYJHDBQIJ/1LXVs3YQWM7JwEDVQND XEdM0av8oed2tWaU76NQGdE4P3fmzdp5Mb6qpQX9bQRymPE7gmK861NL7nhg5z1JpxeF bZw7i353l6g88e9qdxwijj7Ocb5qzRU4ayw+sZKk1dzzV+U3Y6mIYi7ux0jyb2OmOntb Hqu6MW19sQT83/ryim69UdtMc11F7kvp96RwYMRbNdnMgRQjiIyoyOr0sGHVw63TK+MT 9Fhz6gOfc9TcImcO9GcIGJo74/jkGwS/xCqTEb3cJzXjeAk/WTK4w1+rUNuqu332p5/e LVCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688394700; x=1690986700; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=L9EGFOki3xiHnF+7FGAAtZBB7mQbs7Eeh4q/1Vj38Fc=; b=D/3m50dECyLkHmccN5KmKV5u8lCOX1Ou4WG765uwz5XECsb5zGLApBM0d2gVl7jNCX lxk+ZhzCsmUah4dd9PjpxpZVsicrsk27hqNPtQ3KDM9zD+7Nl874DsZPR//ilFOdHnoh 6q1eo4pj8EvLNPDuvhixdJBhM5GgOvn2r6axHu5h7oPLfoyr76eNc4/79pkjnbjgLdam PHC9nyu0Z7n8K6ZkP6EF3R0iNsJxrbQJh+n8sqlCr2+cZNk6q00MwbqeUCc/XqiWZdVq WQzTPhEJ8F2QZ1sPKQbEWF5wviHSoZko+GhMNlfpnt5PBwc0vTxF1UtaZqF97O/alLx3 k3xQ== X-Gm-Message-State: ABy/qLapxc0D3Hk0Yk9xN2pDBNrVpfafdpkPKqt/2BgVHItFWL/ATifz qwp3TkAuNVQQ+6cLe8qbBmutLw== X-Received: by 2002:a05:6512:3e0a:b0:4f9:72a5:2b76 with SMTP id i10-20020a0565123e0a00b004f972a52b76mr7876617lfv.65.1688394700107; Mon, 03 Jul 2023 07:31:40 -0700 (PDT) Received: from ?IPV6:2001:14ba:a0db:1f00::8a5? (dzdqv0yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::8a5]) by smtp.gmail.com with ESMTPSA id d20-20020ac24c94000000b004fbab80ecefsm1557245lfl.145.2023.07.03.07.31.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Jul 2023 07:31:39 -0700 (PDT) Message-ID: <29f6e66d-d093-8d65-bf88-046dca5f0dcf@linaro.org> Date: Mon, 3 Jul 2023 17:31:38 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 4/5] soc: qcom: geni-se: Allow any combination of icc paths Content-Language: en-GB To: Konrad Dybcio , Andy Gross , Bjorn Andersson , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Andi Shyti Cc: Marijn Suijten , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-i2c@vger.kernel.org References: <20230703-topic-8250_qup_icc-v1-0-fea39aa07525@linaro.org> <20230703-topic-8250_qup_icc-v1-4-fea39aa07525@linaro.org> From: Dmitry Baryshkov In-Reply-To: <20230703-topic-8250_qup_icc-v1-4-fea39aa07525@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 03/07/2023 16:31, Konrad Dybcio wrote: > Not all SoCs provide all the usual paths. By the looks of it, at least > SM8150 and SM8250 don't have one that would resemble "qup-core". > > Check for the error that icc_get throws and assign a NULL value to each > path that can't be found to effectively allow any combination of icc paths > (which, like previously, includes no icc paths). The ICC APIs gracefully > handle a NULL path by exiting early. > > Signed-off-by: Konrad Dybcio > --- > drivers/soc/qcom/qcom-geni-se.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c > index ba788762835f..a5e2e8925c8e 100644 > --- a/drivers/soc/qcom/qcom-geni-se.c > +++ b/drivers/soc/qcom/qcom-geni-se.c > @@ -813,8 +813,13 @@ int geni_icc_get(struct geni_se *se, const char *icc_ddr) > continue; > > se->icc_paths[i].path = devm_of_icc_get(se->dev, icc_names[i]); Would it make sense to add (devm_)of_icc_get_optional instead? I think we already have several usecases for such API call For this patch: Reviewed-by: Dmitry Baryshkov > - if (IS_ERR(se->icc_paths[i].path)) > - goto err; > + if (IS_ERR(se->icc_paths[i].path)) { > + /* Not all SoCs implement all the paths */ > + if (PTR_ERR(se->icc_paths[i].path) == -ENODATA) > + se->icc_paths[i].path = NULL; > + else > + goto err; > + } > } > > return 0; > -- With best wishes Dmitry