PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier
Quoted 10 lines
This patch adds the new
DEVFREQ_TRANSITION_NOTIFIERnotifier 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 deviceAnd this patch adds the resourced-managed function to release the resource automatically when error happen.
Quoted 8 lines
Signed-off-by Chanwoo Choi <[email protected]>[m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]Tested-by Markus Reichl <[email protected]>Tested-by Anand Moon <[email protected]>--- drivers/devfreq/devfreq.c | 163 +++++++++++++++++++++++++++++++++++++++++++++- include/linux/devfreq.h | 58 ++++++++++++++++- 2 files changed, 219 insertions(+), 2 deletions(-)
[]
Quoted 19 lines
include/linux/devfreq.h +7
-0@@ -19,6 +19,13 @@#define DEVFREQ_NAME_LEN 16 +/* DEVFREQ notifier interface */ +#define DEVFREQ_TRANSITION_NOTIFIER (0) + +/* Transition notifiers of DEVFREQ_TRANSITION_NOTIFIER */ +#define DEVFREQ_PRECHANGE (0) +#define DEVFREQ_POSTCHANGE (1) +struct devfreq ;/**
include/linux/devfreq.h struct devfreq { · line 189
Quoted 6 lines
include/linux/devfreq.h +3
-0@@ -177,6 +184,13 @@ struct devfreq {unsigned int *trans_table;unsigned long *time_in_state;unsigned long last_stat_updated; + +struct srcu_notifier_head transition_notifier_list; +};
Like other properties of struct devfreq, please add descriptions above. Other than that, it looks good.
Quoted 38 lines · MyungJoo Ham
Quoted 10 lines
This patch adds the new
DEVFREQ_TRANSITION_NOTIFIERnotifier 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 deviceAnd this patch adds the resourced-managed function to release the resource automatically when error happen.
Quoted 8 lines
Signed-off-by Chanwoo Choi <[email protected]>[m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]Tested-by Markus Reichl <[email protected]>Tested-by Anand Moon <[email protected]>--- drivers/devfreq/devfreq.c | 163 +++++++++++++++++++++++++++++++++++++++++++++- include/linux/devfreq.h | 58 ++++++++++++++++- 2 files changed, 219 insertions(+), 2 deletions(-)[]
Quoted 17 lines
include/linux/devfreq.h +7
-0@@ -19,6 +19,13 @@#define DEVFREQ_NAME_LEN 16 +/* DEVFREQ notifier interface */ +#define DEVFREQ_TRANSITION_NOTIFIER (0) + +/* Transition notifiers of DEVFREQ_TRANSITION_NOTIFIER */ +#define DEVFREQ_PRECHANGE (0) +#define DEVFREQ_POSTCHANGE (1) +struct devfreq ;
Quoted 11 lines
include/linux/devfreq.h struct devfreq { · line 189
Quoted 8 lines
include/linux/devfreq.h +3
-0/** @@ -177,6 +184,13 @@ struct devfreq {unsigned int *trans_table;unsigned long *time_in_state;unsigned long last_stat_updated; + +struct srcu_notifier_head transition_notifier_list; +};Like other properties of struct devfreq, please add descriptions above. Other than that, it looks good.
OK. I was missing the description. I'll add it.
Best Regards,
Chanwoo Choi