Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4476424yba; Tue, 9 Apr 2019 20:55:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfhZUdDa3YHXtU0rXRibZIBUFCVMpMo+faDweQDUa75XTjwsudTNYCgVD96rQq8iELEmbS X-Received: by 2002:a17:902:d24:: with SMTP id 33mr42248841plu.246.1554868539936; Tue, 09 Apr 2019 20:55:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554868539; cv=none; d=google.com; s=arc-20160816; b=xRYUXZw+vzNxUTWNoU2gYLdPk0+fTSNEQC0+mB7Hw041Gi+LzHlupCT9HrQyWvkPLp PWRmN4fMrHEjsT0dGq7NdIsAvHsj1NOw/zjDvwpnEv0xAySr/1tN9ezj2uBDVRQIWqdn vs+sSMJnB+ZKCFX36UWG+61rg1n4vxdxgk+UlCalUftWRhiZnkgrxs35oAes0eKdTOZO 2Oo1SsyO4LfR1AuPXLKBpzboqT1igjmHE2FwJfYPtnyMq2aU/URWPSMHMvVltQZ+D/0U PaPcWk3BYYDL106lw6IO/JQOUmffSjrDssJ1q2JpNh3ue0zG3PJ+NlWSQHzUF8X6xGAJ MVBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+p6WtM7TMz0AFrDPtlDt/keNDoiZYMcADTq7mOxaojY=; b=ina2doANgjX/Vaa5ECkp3b6jQtke2rZfTq0MhVhiqvgEh9q2GfO3/ub5g6TTSOtcHh yY7cL2kG19FqIBB0/ChYVzr5Bnelq+nsbTugwtDqhCS7pwMV4FE+pfOKsXJP/qFjZcWL mrpPv+qfb98HlKNoC3vjcWr9TBuc++gbWpmL0RNAn5Tw8uZNRSfaB1YW2x1nCadJwD24 8KxTCFSTl9hwSZBWs0uHm/h4S8W8KAVwciPPInpNCPEcvavKoAdY/oeUnbkNwEEjI/jZ /a4RKNRn7kbB9WoRIXF6wYZ51B+VEdbUOjt40la9rW1NMhYjUBIoTk8PT1ZKgKfkzHQE o/HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ulCKW46I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id b7si33222052pfp.156.2019.04.09.20.55.23; Tue, 09 Apr 2019 20:55:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ulCKW46I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727149AbfDJDyE (ORCPT + 99 others); Tue, 9 Apr 2019 23:54:04 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:46560 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726837AbfDJDyE (ORCPT ); Tue, 9 Apr 2019 23:54:04 -0400 Received: by mail-pf1-f196.google.com with SMTP id 9so549329pfj.13 for ; Tue, 09 Apr 2019 20:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+p6WtM7TMz0AFrDPtlDt/keNDoiZYMcADTq7mOxaojY=; b=ulCKW46IiZ0zdLV59onv+1VMMBMcPPo5eYsplQtnqti7gUPo9tdzr76pckGBxdhTPg E7t4T7u7HczlIRB//Y5izsEnD9d6osadENsNNNHjRhBkAAG72GNA6z1NKuuhKzkVxwwt AQuIstltcKV9fMs9VDxawIQb4r2FkmeWFUhTbjxo46mX5sJlV5MoMtIanNK6ILdutdWY 2v4Ze0lxrDE1B2M7Un3p7NiiUUsyQJHO92xE9UsplBS5SEJtaoFRvUaywlTXn/tb56uq u1oViTBLN9trPjk31b7naB1H4QZl+O0TaJKWVOlnuyB6qAGewctmGcoxl2BIJiMehQZK 63aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+p6WtM7TMz0AFrDPtlDt/keNDoiZYMcADTq7mOxaojY=; b=euEmuo3nBVhVVZNDrDhFpGiy5OoxmXzSf44FQYKBxYdDdwTKQ2EUp6yh4srdyTXQ9j NWkv3iKPUILFOWwdm8h1h1bgx5pwWF79KdTxLwmujMR9y0xELKAh+kx66xv2UhNf6yX8 NiYoU6s7ZXLXQFe1G9iRrbvYV2+pqlnJFxip4Bs1hpBZfBqR9k6HaJdftxAG+X+PLOnV Sjyw7446t6rUG+MVl2OE1W6iSphJCeyXR3rVKfhaeFQKTrtexSdCxwUrjV5bnGB+KfYS 5kAFPalCuzQUP/WP8AO3K4zmD9BLPKUdh/k57gG2kPa2cDDNRSBSN8ZPD9yLzUwxtJSd KlZA== X-Gm-Message-State: APjAAAVoBGX8tbwZrIxoAiqFsM6vzvG7RPeEVf/rVu1OoiR8vXDb/fq5 Md3jjJGiBqZdvXl3A9WmUYAa2g== X-Received: by 2002:a62:e10e:: with SMTP id q14mr40110907pfh.161.1554868443751; Tue, 09 Apr 2019 20:54:03 -0700 (PDT) Received: from localhost ([122.166.139.136]) by smtp.gmail.com with ESMTPSA id k6sm35702599pfj.173.2019.04.09.20.53.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Apr 2019 20:53:58 -0700 (PDT) Date: Wed, 10 Apr 2019 09:23:56 +0530 From: Viresh Kumar To: Georgi Djakov Cc: vireshk@kernel.org, sboyd@kernel.org, nm@ti.com, robh+dt@kernel.org, mark.rutland@arm.com, rjw@rjwysocki.net, jcrouse@codeaurora.org, vincent.guittot@linaro.org, bjorn.andersson@linaro.org, amit.kucheria@linaro.org, seansw@qti.qualcomm.com, daidavid1@codeaurora.org, evgreen@chromium.org, sibis@codeaurora.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH 2/4] OPP: Add support for parsing the interconnect bandwidth Message-ID: <20190410035356.up3qxkc6az5lpjyt@vireshk-i7> References: <20190313090010.20534-1-georgi.djakov@linaro.org> <20190313090010.20534-3-georgi.djakov@linaro.org> <20190314063047.urmzez52bdyrkdsu@vireshk-i7> <0cb2d777-4d05-2b06-e458-755d171b3436@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0cb2d777-4d05-2b06-e458-755d171b3436@linaro.org> User-Agent: NeoMutt/20180323-120-3dd1ac Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09-04-19, 17:37, Georgi Djakov wrote: > Hi Viresh, > > On 3/14/19 08:30, Viresh Kumar wrote: > > On 13-03-19, 11:00, Georgi Djakov wrote: > >> The OPP bindings now support bandwidth values, so add support to parse it > >> from device tree and store it into the new dev_pm_opp_icc_bw struct, which > >> is part of the dev_pm_opp. > >> > >> Also add and export the dev_pm_opp_set_path() and dev_pm_opp_put_path() > >> helpers, to set (and release) an interconnect path to a device. The > >> bandwidth of this path will be updated when the OPPs are switched. > >> > >> Signed-off-by: Georgi Djakov > >> --- > >> drivers/opp/core.c | 67 ++++++++++++++++++++++++++++++++++++++++++ > >> drivers/opp/of.c | 44 +++++++++++++++++++++++++++ > >> drivers/opp/opp.h | 6 ++++ > >> include/linux/pm_opp.h | 14 +++++++++ > >> 4 files changed, 131 insertions(+) > >> > >> diff --git a/drivers/opp/core.c b/drivers/opp/core.c > >> index e06a0ab05ad6..4b019cecaa07 100644 > >> --- a/drivers/opp/core.c > >> +++ b/drivers/opp/core.c > >> @@ -19,6 +19,7 @@ > >> #include > >> #include > >> #include > >> +#include > >> #include > >> #include > >> > >> @@ -1645,6 +1646,72 @@ void dev_pm_opp_put_clkname(struct opp_table *opp_table) > >> } > >> EXPORT_SYMBOL_GPL(dev_pm_opp_put_clkname); > >> > >> +/** > >> + * dev_pm_opp_set_path() - Set interconnect path for a device > >> + * @dev: Device for which interconnect path is being set. > >> + * @name: Interconnect path name or NULL. > >> + * > >> + * This must be called before any OPPs are initialized for the device. > >> + */ > >> +struct opp_table *dev_pm_opp_set_path(struct device *dev, const char *name) > > > > Maybe the OPP core can do it itself in a similar way to how we do > > clk_get() today ? It took me a decade to understand my own comment ;) > Do you mean to directly call of_icc_get() in _allocate_opp_table()? I believe I wanted to say s/clk_get()/clk_set_rate()/ . i.e. if someone calls set-opp-rate, then the path should get set as well accordingly automagically. -- viresh