[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6d9cae4-6674-9426-183d-d9d810c6335b@linaro.org>
Date: Tue, 28 Apr 2020 18:50:00 +0300
From: Georgi Djakov <georgi.djakov@...aro.org>
To: Matthias Kaehlcke <mka@...omium.org>
Cc: linux-pm@...r.kernel.org, evgreen@...omium.org,
bjorn.andersson@...aro.org, akashast@...eaurora.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] interconnect: Add helpers for enabling/disabling a path
Hi Matthias,
On 4/28/20 18:28, Matthias Kaehlcke wrote:
> Hi Georgi,
>
> On Tue, Apr 28, 2020 at 12:16:50PM +0300, Georgi Djakov wrote:
>> There is a repeated pattern in multiple drivers where they want to switch
>> the bandwidth between zero and some other value. This is happening often
>> in the suspend/resume callbacks. Let's add helper functions to enable and
>> disable the path, so that callers don't have to take care of remembering
>> the bandwidth values and handle this in the framework instead.
>>
>> With this patch the users can call icc_disable() and icc_enable() to lower
>> their bandwidth request to zero and then restore it back to it's previous
>> value.
>>
>> Suggested-by: Evan Green <evgreen@...omium.org>
>> Suggested-by: Bjorn Andersson <bjorn.andersson@...aro.org>
>> Signed-off-by: Georgi Djakov <georgi.djakov@...aro.org>
[..]
>> +
>> + return icc_set_bw(path, path->reqs[0].avg_bw,
>> + path->reqs[0].peak_bw);
>> +}
>
> The two functions are identical except for the assignment of the 'enabled'
> flags. You could add a helper _icc_enable(struct icc_path *path, bool enable)
> and call it from icc_enable/disable().
>
Yes, indeed! Will send a v2. Thank you!
BR,
Georgi
Powered by blists - more mailing lists