]> git.baikalelectronics.ru Git - kernel.git/commit
interconnect: Add helpers for enabling/disabling a path
authorGeorgi Djakov <georgi.djakov@linaro.org>
Sun, 10 May 2020 15:30:37 +0000 (18:30 +0300)
committerGeorgi Djakov <georgi.djakov@linaro.org>
Sun, 10 May 2020 15:30:37 +0000 (18:30 +0300)
commit218126827decd30f0c71a14a85644f3191f40a36
tree158aedc76c869348cdf39f429ebb0f308bd0d1f1
parentee8ffa0a14de0e6bef5bd47b922720f3af7568c1
interconnect: Add helpers for enabling/disabling a path

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@chromium.org>
Suggested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Link: https://lore.kernel.org/r/20200507120846.8354-1-georgi.djakov@linaro.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
drivers/interconnect/core.c
drivers/interconnect/internal.h
include/linux/interconnect.h