Re: [PATCH v6 04/21] PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>   
>  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.
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>
> [m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
> Tested-by: Markus Reichl <m.reichl@xxxxxxxxxxxxx>
> Tested-by: Anand Moon <linux.amoon@xxxxxxxxx>
> ---
>  drivers/devfreq/devfreq.c | 163 +++++++++++++++++++++++++++++++++++++++++++++-
>  include/linux/devfreq.h   |  58 ++++++++++++++++-
>  2 files changed, 219 insertions(+), 2 deletions(-)

[]

> diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
> index aa0b8424ebc3..152ea342529c 100644
> --- a/include/linux/devfreq.h
> +++ b/include/linux/devfreq.h
> @@ -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;
>  
>  /**
> @@ -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.



��.n��������+%������w��{.n�����{��Ʀ����)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux