Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26211971rwd; Mon, 3 Jul 2023 06:55:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6EXhRvjHUkhf1YvZsI6VqDOP8Em0+87qB4UEqfdCwjOtJl83W5DFBUSd7ldSblrUjuTtbx X-Received: by 2002:a05:6808:30a2:b0:3a1:ec14:cd7e with SMTP id bl34-20020a05680830a200b003a1ec14cd7emr10397724oib.36.1688392546755; Mon, 03 Jul 2023 06:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688392546; cv=none; d=google.com; s=arc-20160816; b=drDOjhGnOxLdh/XgbqR8QZaLCOKjF5SbRfHTHtKiIN+7gzZbC8we58QgB8B3Sn5SF8 d505y5XWkrS5Dj46YivDH6wOER6jQLgMuR8+xN5/e8mp7MPRrU+7GG1Zc4W3h2G3gweC QvOpLzowSBkR2aUttQbitzWH+pxrboCYMm/PYR2hpcOLQAyu3dqrbJ+UCJJN6XTfjEmn e0BLjPAM+2XoPiRGz0lLn9Qp3S2lmEnGkVixG/lSyqPprVqxDCvLFqrkiIur+tqbC+1c 9YQRfGweuVmxIbOXBtghk2AuU/IddK1xDngKHsp7SURGHcd/RtIgShvfRjNI8ISJLe6r Z/7g== 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=U0Tw3K884EqPljezRBvFH8q3oj/FtWnGBPlC6pRuCDw=; fh=EV+5bRVCKNG17q531vPQpoKiuN4tfzBrxhdEOIK2W5o=; b=p66lJOylp76veeLxvSE8xJSwzxuqTeFh//G0OPC90Bb40vGOaiGtvyCaPKHB8mqW/m f9tAOeu+6NYxXmLKkVLzIkqTe8+p5WohBV1d9bfKXCTsfpNGZ4mnCDVpbpvsoXY81BMO JZ+nkSIDTq61rol5NoHdofHA2XWsyBg8vzu92AjOWYcoRr7YBFuBNTGME3omDtMqycuD fcRMOmMXQOm6XHNtXvpFLPyVMdGUoHRqGwLER9+G0FMEaMfvbkFdqNRlMAJJ5G6uB1+a qiiDqGAQ6ygKNqWleV/HjCEBeYhIvAlwaXE7H78UkyUevjqClkdF0qZSZSakiqpL0tDa NA2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qW3/NAVc"; 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 26-20020a63115a000000b0055b037b55ecsi13331379pgr.147.2023.07.03.06.55.32; Mon, 03 Jul 2023 06:55:46 -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="qW3/NAVc"; 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 S231587AbjGCNba (ORCPT + 99 others); Mon, 3 Jul 2023 09:31:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231623AbjGCNbX (ORCPT ); Mon, 3 Jul 2023 09:31:23 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A862E6A for ; Mon, 3 Jul 2023 06:31:21 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4fb5bcb9a28so6855832e87.3 for ; Mon, 03 Jul 2023 06:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688391079; x=1690983079; 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=U0Tw3K884EqPljezRBvFH8q3oj/FtWnGBPlC6pRuCDw=; b=qW3/NAVcPirJqJtbsyH+kRmHKIvIUgTk/AzW93yk8n28IMpfwy1cuLTyLConHraNgl 4uf84sfG2b8Xp/SDX/h3gnP3OhZj4hdDuRc335s4naLazI3i9wOfhxEU/zraW3/K9MJs aXqhZfHsKeZOMinT5nsmYYKXU4h9UnVdybQY5VOWEZc+DRJcPPvXCMDFYQfgZAzUPSjn K4NtELU6FwE1q9I1H7jmSGC1UT6SrbrCZM5jpmVC4LV7nXUl/f+Y1opJCZl/Y/RmCyl/ LvwYlFA36QDaGkNCS5eRMbcMQjwuWXGAnG0c/Y0yERirIg6s5uL96ZnoE3lbrmVPUfw6 25Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688391079; x=1690983079; 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=U0Tw3K884EqPljezRBvFH8q3oj/FtWnGBPlC6pRuCDw=; b=BnslGKzGDRwnPJuDNUESv6KYqr6P6izMMvcarUGdcnjyCKxslRufw0b3XmEstXB2cy 5Y3vgElH7BJ1v1R+dvUCOVdzpODlJ3OTJIPyfnanVfdkWDyxH1C3Xzy0xWHpOeIoTFlY lOAH3fRjNFyCIJ9ny2qSa489SDYFDhV7AMxbkWB+91lFmmbvMMN/aANImgR82/S+Ph8l 09VYF7WGgDbLBiK4TPHwiuIZ8TmKxXaikZ9hHfb+MAuNqd4lL9zz0SGU16pUb9hUv+BU rhC6p2kW6tjmwvR2R4zyZv/HfDchwgFSvvPowN2FiItF9/omNptc09iQfuOliiXQf36h r5EQ== X-Gm-Message-State: ABy/qLZSrjRlXU4N9xo1GiT/86DQdr+GWatk5DQDY00E3npWMfUbHmUR 0DN1uF6RA7uAUqBI8HSfCYPhYg== X-Received: by 2002:a05:6512:36d1:b0:4fb:9d61:db4d with SMTP id e17-20020a05651236d100b004fb9d61db4dmr6401322lfs.18.1688391079411; Mon, 03 Jul 2023 06:31:19 -0700 (PDT) Received: from [192.168.1.101] (abyj26.neoplus.adsl.tpnet.pl. [83.9.29.26]) by smtp.gmail.com with ESMTPSA id ep7-20020a056512484700b004fbb1f70ceesm833417lfb.227.2023.07.03.06.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 06:31:19 -0700 (PDT) From: Konrad Dybcio Date: Mon, 03 Jul 2023 15:31:13 +0200 Subject: [PATCH 4/5] soc: qcom: geni-se: Allow any combination of icc paths MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230703-topic-8250_qup_icc-v1-4-fea39aa07525@linaro.org> References: <20230703-topic-8250_qup_icc-v1-0-fea39aa07525@linaro.org> In-Reply-To: <20230703-topic-8250_qup_icc-v1-0-fea39aa07525@linaro.org> To: 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, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1688391072; l=1230; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=co9BdW2nWkUZOcUTizkeFw8YjDRYAbLHFxUe7vw2Hi8=; b=Ujk0LJDy05oagsVI8a6ZmnNEpYOuoJq5uyL6lqwIgDGgLZ20MpLNP89MZUyPsBsmv07eQPoRN Ej8VC4qyRHWCZhU8eSpTrxsn3vV2PM+Q5TalSz6YgYzA2YdP3bIRV8v X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= 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,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 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]); - 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; -- 2.41.0