[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7bd0cbc4131f597a1fb68af1cfd1a67@codeaurora.org>
Date: Thu, 02 Aug 2018 12:07:07 -0700
From: skannan@...eaurora.org
To: myungjoo.ham@...sung.com
Cc: Kyungmin Park <kyungmin.park@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>, georgi.djakov@...aro.org,
vincent.guittot@...aro.org, daidavid1@...eaurora.org,
bjorn.andersson@...aro.org, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] PM / devfreq: Add devfreq driver for interconnect
bandwidth voting
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 <linux/kernel.h>
>> +#include <linux/module.h>
>> +#include <linux/init.h>
>> +#include <linux/err.h>
>> +#include <linux/errno.h>
>> +#include <linux/mutex.h>
>> +#include <linux/devfreq.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/of.h>
>> +#include <linux/interconnect.h>
>
> 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
Powered by blists - more mailing lists