Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2471070imm; Thu, 2 Aug 2018 12:08:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeS8+Z4tyXyrTmYLw6Jt4HcIgSW9QUvZqlWI2kF4YCDqao3sAKDBGUpEFLjLS0n7Mib9hpk X-Received: by 2002:a63:c44a:: with SMTP id m10-v6mr685092pgg.416.1533236938038; Thu, 02 Aug 2018 12:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533236938; cv=none; d=google.com; s=arc-20160816; b=pDIXhh6sFRn0VMUDlea83wn+T+NbpRE61ZLG3VXiHj3urqSNxyxd6fUaVYsnZoMrmb wO8KvRBokiLLI/kl/ey3MySWQAGePhCi9mxalodHScfb0/LPyhwSMb3FIgXbpChyS0x+ aKjDCWJhgNZFKTm1H4M+P8u+FR6yCr29MzhN4Ox6sMKN0HYtU/+wc72orDS1gv6iwkpe P2m5pwJL6Te0nA2sd+s1voL8DNd8E6/v7Ye7xcdWYZVnRiJC6/VF5nJnjuQAg7YmRk06 hBzCmDKNbk/WuHttaemR3QXhyZc1FGC3nQKDKHDIaQXumwLrqonQts2j2K4RTdhb/lcd gE/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=3AxLar2RNqLOXIYAQxRWsm8ijp4fXKnISJID3zzGhVk=; b=FKaszLFopi0oqxj/GyGuIIqVZWmJSetXxYpOaBKyrpBp9Nw60dnBm1ldejumoWhxil wcSbq9XgVuhVDEadTEicykajkaiI3wgSdbCyIYmcQINmt6BdtnP5/PpnNJsQZci2fyGg Jt18FZeliFblOz3Mx/4/erR0qVk485abs5Kp05+XnF//ggAcbYanuOXmii+cbe/g432V S2iao1E5y2WpyyiDgxhinpX5WgxTVisXhAQQxg3j4EtYrKt5lnIbhX60fufQmIdtcOAd sTDfpg8PYFxXvIMvQOoq3R14pDxnDRna3XQt4aLtSrYcJV+HkITlTpNKMl40XY7/8F1o stVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fubUGFY3; dkim=pass header.i=@codeaurora.org header.s=default header.b=TCFlWNIC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9-v6si2170987pgp.503.2018.08.02.12.08.42; Thu, 02 Aug 2018 12:08:58 -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=@codeaurora.org header.s=default header.b=fubUGFY3; dkim=pass header.i=@codeaurora.org header.s=default header.b=TCFlWNIC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727153AbeHBU7f (ORCPT + 99 others); Thu, 2 Aug 2018 16:59:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:40764 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726177AbeHBU7e (ORCPT ); Thu, 2 Aug 2018 16:59:34 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 50EDA60AFF; Thu, 2 Aug 2018 19:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533236828; bh=VArxtrapZOKxMGM7BQqMAckucFRHf6zVKZHq/vgEL1g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fubUGFY3lMPnd5UHbPKZr36/hBX29QuFk+RTbik1P+ABkOHnmsfzFRoAlOxolboim jQ398fW9hwX3VPxi0BEt8CyEDQcjO3OIxe/WxGYdqOLl2zNVLp+mCiJ7MdTHLsOZoP oqL/6Nkby+/9QriCtbE0x0raUnD+cmLxyAjibaqw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 74554602B7; Thu, 2 Aug 2018 19:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533236827; bh=VArxtrapZOKxMGM7BQqMAckucFRHf6zVKZHq/vgEL1g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TCFlWNIC5fxLjZf4fjr/Ux4oyb/b4AoYEJl76aq340lq6kFUPRcv+uaRymim+WOU4 Qh0oJEYJeGKZ+qGlee7/hiYy2bdfADhQuKJS2j8qaEnZAzK7uRiR78OhWE0FcY2/qd e5LfTNX/UliVXC14rz5CkF7c/kpW5vTPskloqCfI= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 02 Aug 2018 12:07:07 -0700 From: skannan@codeaurora.org To: myungjoo.ham@samsung.com Cc: Kyungmin Park , Chanwoo Choi , Rob Herring , Mark Rutland , georgi.djakov@linaro.org, vincent.guittot@linaro.org, daidavid1@codeaurora.org, bjorn.andersson@linaro.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] PM / devfreq: Add devfreq driver for interconnect bandwidth voting In-Reply-To: <20180802101341epcms1p53ee79776dbcbeaf6f1e7910b20095220@epcms1p5> References: <1533171465-25508-2-git-send-email-skannan@codeaurora.org> <20180802101341epcms1p53ee79776dbcbeaf6f1e7910b20095220@epcms1p5> Message-ID: X-Sender: skannan@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-08-02 03:13, MyungJoo Ham wrote: >> This driver registers itself as a devfreq device that allows devfreq >> governors to make bandwidth votes for an interconnect path. This >> allows >> applying various policies for different interconnect paths using >> devfreq >> governors. >> > > First of all, the name, "devfreq_icbw", is not appropriate for a > devfreq device driver. It confuses; it looks like a part of the > framework itself. > >> diff --git a/drivers/devfreq/devfreq_icbw.c >> b/drivers/devfreq/devfreq_icbw.c >> new file mode 100644 >> index 0000000..231fb21 >> --- /dev/null >> +++ b/drivers/devfreq/devfreq_icbw.c >> @@ -0,0 +1,116 @@ >> +// SPDX-License-Identifier: GPL-2.0 >> +/* >> + * Copyright (c) 2013-2014, 2018, The Linux Foundation. All rights >> reserved. >> + */ >> + >> +#define pr_fmt(fmt) "icbw: " fmt >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include > > Where can I find this file? Sorry, meant to mention this in the email specific portion of the commit text. This is on top of the interconnect framework series that Georgi has been working on. linux-pm should have those patches. >> + >> +struct dev_data { >> + struct icc_path *path; >> + u32 cur_ab; >> + u32 cur_pb; >> + unsigned long gov_ab; >> + struct devfreq *df; >> + struct devfreq_dev_profile dp; >> +}; >> + >> +static int icbw_target(struct device *dev, unsigned long *freq, u32 >> flags) >> +{ >> + struct dev_data *d = dev_get_drvdata(dev); >> + int ret; >> + u32 new_pb = *freq, new_ab = d->gov_ab; >> + >> + if (d->cur_pb == new_pb && d->cur_ab == new_ab) >> + return 0; >> + >> + dev_dbg(dev, "BW KBps: AB: %u PB: %u\n", new_ab, new_pb); >> + >> + ret = icc_set(d->path, new_ab, new_pb); > > I'm not sure if icc_set is available. Yeah, it's available on that patch series. -Saravana