]> git.baikalelectronics.ru Git - kernel.git/commit
PM / devfreq: Use PM QoS for sysfs min/max_freq
authorLeonard Crestez <leonard.crestez@nxp.com>
Thu, 5 Dec 2019 10:05:07 +0000 (12:05 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 9 Dec 2019 03:19:16 +0000 (12:19 +0900)
commitc92b6cf071fc15d533f304a75e05de70345f5f0c
treea74b9e5196e4c460a8d5ddc130011d84e9d9bae4
parent0c6c1a91fbeb0d44823ae0a4d772211954319b3f
PM / devfreq: Use PM QoS for sysfs min/max_freq

Switch the handling of min_freq and max_freq from sysfs to use the
dev_pm_qos_request interface.

Since PM QoS handles frequencies as kHz this change reduces the
precision of min_freq and max_freq. This shouldn't introduce problems
because frequencies which are not an integer number of kHz are likely
not an integer number of Hz either.

Try to ensure compatibility by rounding min values down and rounding
max values up.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
[cw00.choi: Return -EAGAIN instead of -EINVAL if dev_pm_qos is inactive]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/devfreq.c
include/linux/devfreq.h