]> 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)
commit8a902f81d2e624ca01c864550c2039f65292d7c1
treea74b9e5196e4c460a8d5ddc130011d84e9d9bae4
parentd55e627b08609fa38e8949d83f452256850eb811
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