UPSTREAM: PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier
authorChanwoo Choi <cw00.choi@samsung.com>
Tue, 26 Jan 2016 04:21:26 +0000 (13:21 +0900)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 10 Aug 2016 10:31:08 +0000 (18:31 +0800)
commit9b59fc0d76d495c0bbef6f781b9fd02e82e59050
tree7bb8d0cb8cb9cb234b8fb00e57dc35ae6f83f442
parentee847a5bdf53aee4d2d65bec8bc3a92feeaf47f3
UPSTREAM: PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier

This patch adds the new DEVFREQ_TRANSITION_NOTIFIER notifier to send
the notification when the frequency of device is changed.
This notifier has two state as following:
- DEVFREQ_PRECHANGE  : Notify it before chaning the frequency of device
- DEVFREQ_POSTCHANGE : Notify it after changed the frequency of device

And this patch adds the resourced-managed function to release the resource
automatically when error happen.

Change-Id: Id92ce7b9b2fba0e8776b1bc6980996b16a2902f3
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
(cherry picked from commit 0fe3a66410a3ba96679be903f1e287d7a0a264a9)
drivers/devfreq/devfreq.c
include/linux/devfreq.h