Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp796669ybt; Wed, 1 Jul 2020 10:11:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBBC+x+iAk/LaABaKOzCxuynI2WR/1CKtkd36OIO0gxEG03kO+NHuxbwzWg44WXnaXuMdl X-Received: by 2002:a50:e04e:: with SMTP id g14mr25409988edl.352.1593623465526; Wed, 01 Jul 2020 10:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593623465; cv=none; d=google.com; s=arc-20160816; b=v0PQnzTK4C3GOD9ptEPtdf/Blj03BrbTbm8Pv46+dtzzBBG33ikzj6WO/53QUwpGc4 wu6ijNnIwjTNIx2XxzKTXfaqFldxnP7Z1qM/LObTxG64Ts5xYKZqBaQ5sae8k5vXwdyh UNEn4wKCNBCpLIlIyHJmkagcBGHPo+GngGH18vrtOticP4+UYVlcxPONCubAc4aAkpTt 9oFQSu0V8UWQeTPEq4YDetlHm30loJsPkTcyLhyBMFs9nclSzpRbOkbZVcIioAwJ30KT NCWyEYOkODmlPr/oEXiLTcNxhgH4bDrRYGKddH0u1eO8ZqwBuHEcg/DmfuCc/T8ai/zF OoSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:autocrypt :from:references:cc:to:subject:dkim-signature; bh=iAmyBjucUvreoEWUkZI20ibgdJNiBgFXx30xaPRx/xA=; b=ye3CKyr1PfbuYkE6p9xs5Uq3oS/zrlt1HrFcGt2NHg9dYwRXLZKziSDBZ2Z/yAGmXw j0SOm9Ir3VUa0IGDsajP8ehfOnIVLC6lk0dG517Y8sD5NBY5RfIZF/3ub1ctbObJtxT6 GlGRSkov9QXi2RUEjL8SSX1rjb4dZ9XRYDCm5bZNaygx1ZUGpTC5pHmsvPnwH0DauqBr j0LjBpFtUETv9tJK2VrGCVzgKT7yh1oeI4TvCr403jAOmrDseenpZAukRniQpp/sgE9t Lz63cLCEuxHNhBYMChW8uA/R/EKRmVtGz6TPXA7Eob0fPtV6ax+tc+60wNPcp+xbloP5 LzlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XQeaH6yI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i5si4125452edn.258.2020.07.01.10.10.41; Wed, 01 Jul 2020 10:11:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XQeaH6yI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1732694AbgGARKO (ORCPT + 99 others); Wed, 1 Jul 2020 13:10:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732633AbgGARKN (ORCPT ); Wed, 1 Jul 2020 13:10:13 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 572C8C08C5DB for ; Wed, 1 Jul 2020 10:10:13 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id f18so24045976wml.3 for ; Wed, 01 Jul 2020 10:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:autocrypt:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=iAmyBjucUvreoEWUkZI20ibgdJNiBgFXx30xaPRx/xA=; b=XQeaH6yImlrDYYtsz2DYYzhZxlJeHDLUCXIQgmDtV4cDt+Vg9j1u7dzc3i0Ztyu2eK pENtT9q/u4vBspnrp0m79+afEEjVjqFE77KyHErg4GkdaDme6bkBkSogsJLMqqhZZ6I8 kZ/iymGAY/Mpas6XlQpSdNn40Q+x13ItoIe8EV/ZURuiBFBSiPucrjg3empJwZlUAS3m nH5QPfqfZqrXJvMriu7434qy9r3qdezjm+c4LqNHZJqXyeMmXmtSctd5NyMznTOAtHCP X1/8AYdfLP4YSw3kPCaqutzuIDdWEIRuMcodEFPJBssvk8PBCHpp0iZJZj1GDXZaOjFF jzlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iAmyBjucUvreoEWUkZI20ibgdJNiBgFXx30xaPRx/xA=; b=kPQ6GYekAUPYIGwI+kL3iBwbpiZXtJAdjwTA1ly8qN4U1pqb64nWtnSsQ82cV55jkk Xe2F0QAyuVGJCzpvAHPwsyj4bU6IfqNUiTAAUBXUzl/Wj/ysNmLb23++LIm4zLchdpaQ /PIXOttZxRpf54VX/PSGZNvNmcC6shvs7001OEn9Hl1rdsIXdxczNUPWRJ5urCppCkrR h7X2nodxfNBlE2r983RhOIjAk2IrW7szZX9uIiIdAaCzanrTDk9O2dZJXWta3VKppIbN AuySRTsPr/A91eg9uAKb5Fl4uZTBcoY/aL+NMhlgoCoMWm81H/MKV9rExEaAINDvLLH4 yGaQ== X-Gm-Message-State: AOAM533EAHpn7PGE+pULf3n9gaw8S5jOeMPIir//3cA1ELNF8Y3ipVUi E4NQAwesLsVmCAdiFPt1/iyrXA== X-Received: by 2002:a1c:5986:: with SMTP id n128mr15892330wmb.112.1593623412008; Wed, 01 Jul 2020 10:10:12 -0700 (PDT) Received: from [10.44.66.8] ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id a15sm9444906wrh.54.2020.07.01.10.10.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jul 2020 10:10:11 -0700 (PDT) Subject: Re: [PATCH v4 27/37] interconnect: Relax requirement in of_icc_get_from_provider() To: Dmitry Osipenko Cc: Thierry Reding , Jonathan Hunter , Rob Herring , Michael Turquette , Stephen Boyd , Peter De Schrijver , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Mikko Perttunen , =?UTF-8?B?QXJ0dXIgxZp3aWdvxYQ=?= , linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org References: <20200609131404.17523-1-digetx@gmail.com> <20200609131404.17523-28-digetx@gmail.com> From: Georgi Djakov Autocrypt: addr=georgi.djakov@linaro.org; prefer-encrypt=mutual; keydata= xsFNBFjTuRcBEACyAOVzghvyN19Sa/Nit4LPBWkICi5W20p6bwiZvdjhtuh50H5q4ktyxJtp 1+s8dMSa/j58hAWhrc2SNL3fttOCo+MM1bQWwe8uMBQJP4swgXf5ZUYkSssQlXxGKqBSbWLB uFHOOBTzaQBaNgsdXo+mQ1h8UCgM0zQOmbs2ort8aHnH2i65oLs5/Xgv/Qivde/FcFtvEFaL 0TZ7odM67u+M32VetH5nBVPESmnEDjRBPw/DOPhFBPXtal53ZFiiRr6Bm1qKVu3dOEYXHHDt nF13gB+vBZ6x5pjl02NUEucSHQiuCc2Aaavo6xnuBc3lnd4z/xk6GLBqFP3P/eJ56eJv4d0B 0LLgQ7c1T3fU4/5NDRRCnyk6HJ5+HSxD4KVuluj0jnXW4CKzFkKaTxOp7jE6ZD/9Sh74DM8v etN8uwDjtYsM07I3Szlh/I+iThxe/4zVtUQsvgXjwuoOOBWWc4m4K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IQc4+FlDX2Ot6T/4tGUDr9MAHaBKFtVyIqXBO xOf0vQEokkUGRKWBE0uA3zFVRfLiT6NUjDQ0vdphTnsdA7h01MliZLQ2lLL2Mt5lsqU+6sup Tfql1omgEpjnFsPsyFebzcKGbdEr6vySGa3Cof+miX06hQXKe99a5+eHNhtZJcMAIO89wZmj 7ayYJIXFqjl/X0KBcCbiAl4vbdBw1bqFnO4zd1lMXKVoa29UHqby4MPbQhjWNVv9kqp8A39+ E9xw890l1xdERkjVKX6IEJu2hf7X3MMl9tOjBK6MvdOUxvh1bNNmXh7OlBL1MpJYY/ydIm3B KEmKjLDvB0pePJkdTw== Message-ID: <3b410ea3-26d3-6f7a-213c-40dbabbde8d1@linaro.org> Date: Wed, 1 Jul 2020 20:10:09 +0300 MIME-Version: 1.0 In-Reply-To: <20200609131404.17523-28-digetx@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On 6/9/20 16:13, Dmitry Osipenko wrote: > From: Artur Świgoń > > This patch relaxes the condition in of_icc_get_from_provider() so that it > is no longer required to set #interconnect-cells = <1> in the DT. In case > of the devfreq driver for exynos-bus, #interconnect-cells is always zero. > > Signed-off-by: Artur Świgoń > [digetx@gmail.com: added cells_num checking for of_icc_xlate_onecell()] > Signed-off-by: Dmitry Osipenko I have already applied the original patch by Artur, so please make the cells_num check a separate patch. Thanks, Georgi > --- > drivers/interconnect/core.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c > index e5f998744501..cb143421ca67 100644 > --- a/drivers/interconnect/core.c > +++ b/drivers/interconnect/core.c > @@ -339,7 +339,7 @@ static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec) > struct icc_node *node = ERR_PTR(-EPROBE_DEFER); > struct icc_provider *provider; > > - if (!spec || spec->args_count != 1) > + if (!spec) > return ERR_PTR(-EINVAL); > > mutex_lock(&icc_lock); > @@ -967,6 +967,15 @@ EXPORT_SYMBOL_GPL(icc_nodes_remove); > */ > int icc_provider_add(struct icc_provider *provider) > { > + struct device_node *np = provider->dev->of_node; > + u32 cells_num; > + int err; > + > + err = of_property_read_u32(np, "#interconnect-cells", &cells_num); > + if (WARN_ON(err)) > + return err; > + if (WARN_ON(provider->xlate == of_icc_xlate_onecell && cells_num != 1)) > + return -EINVAL; > if (WARN_ON(!provider->set)) > return -EINVAL; > if (WARN_ON(!provider->xlate)) >