Re: [PATCH v5 4/8] soc: qcom: rpmpd: Add support for get/set performance state

2018-12-05 Thread Stephen Boyd
Quoting Rajendra Nayak (2018-12-05 02:11:22) > > On 12/5/2018 12:33 PM, Rajendra Nayak wrote: > >> > >>> +   return 0; > >>> +   } > >>> + > >>> +   of_node_put(np); > >> > >> This same code exists twice. Perhaps a helper needs to exist for > >> qcom_rpm_get_performance() to 

Re: [PATCH v5 4/8] soc: qcom: rpmpd: Add support for get/set performance state

2018-12-05 Thread Stephen Boyd
Quoting Rajendra Nayak (2018-12-05 02:11:22) > > On 12/5/2018 12:33 PM, Rajendra Nayak wrote: > >> > >>> +   return 0; > >>> +   } > >>> + > >>> +   of_node_put(np); > >> > >> This same code exists twice. Perhaps a helper needs to exist for > >> qcom_rpm_get_performance() to 

Re: [PATCH v5 4/8] soc: qcom: rpmpd: Add support for get/set performance state

2018-12-05 Thread Rajendra Nayak
On 12/5/2018 12:33 PM, Rajendra Nayak wrote: +   return 0; +   } + +   of_node_put(np); This same code exists twice. Perhaps a helper needs to exist for qcom_rpm_get_performance() to pull the number out of the DT. Sure I can make both drivers use a common helper 

Re: [PATCH v5 4/8] soc: qcom: rpmpd: Add support for get/set performance state

2018-12-05 Thread Rajendra Nayak
On 12/5/2018 12:33 PM, Rajendra Nayak wrote: +   return 0; +   } + +   of_node_put(np); This same code exists twice. Perhaps a helper needs to exist for qcom_rpm_get_performance() to pull the number out of the DT. Sure I can make both drivers use a common helper 

Re: [PATCH v5 4/8] soc: qcom: rpmpd: Add support for get/set performance state

2018-12-04 Thread Rajendra Nayak
On 12/5/2018 4:44 AM, Stephen Boyd wrote: Quoting Rajendra Nayak (2018-12-03 21:21:15) @@ -221,6 +224,47 @@ static int rpmpd_power_off(struct generic_pm_domain *domain) return ret; } +static int rpmpd_set_performance(struct generic_pm_domain *domain, +

Re: [PATCH v5 4/8] soc: qcom: rpmpd: Add support for get/set performance state

2018-12-04 Thread Rajendra Nayak
On 12/5/2018 4:44 AM, Stephen Boyd wrote: Quoting Rajendra Nayak (2018-12-03 21:21:15) @@ -221,6 +224,47 @@ static int rpmpd_power_off(struct generic_pm_domain *domain) return ret; } +static int rpmpd_set_performance(struct generic_pm_domain *domain, +

Re: [PATCH v5 4/8] soc: qcom: rpmpd: Add support for get/set performance state

2018-12-04 Thread Stephen Boyd
Quoting Rajendra Nayak (2018-12-03 21:21:15) > @@ -221,6 +224,47 @@ static int rpmpd_power_off(struct generic_pm_domain > *domain) > return ret; > } > > +static int rpmpd_set_performance(struct generic_pm_domain *domain, > +unsigned int state) > +{ > +

Re: [PATCH v5 4/8] soc: qcom: rpmpd: Add support for get/set performance state

2018-12-04 Thread Stephen Boyd
Quoting Rajendra Nayak (2018-12-03 21:21:15) > @@ -221,6 +224,47 @@ static int rpmpd_power_off(struct generic_pm_domain > *domain) > return ret; > } > > +static int rpmpd_set_performance(struct generic_pm_domain *domain, > +unsigned int state) > +{ > +

[PATCH v5 4/8] soc: qcom: rpmpd: Add support for get/set performance state

2018-12-03 Thread Rajendra Nayak
Add support for the .set_performace_state() and .opp_to_performance_state() callbacks in the rpmpd driver. Signed-off-by: Rajendra Nayak Signed-off-by: Viresh Kumar Reviewed-by: Ulf Hansson --- drivers/soc/qcom/rpmpd.c | 46 1 file changed, 46

[PATCH v5 4/8] soc: qcom: rpmpd: Add support for get/set performance state

2018-12-03 Thread Rajendra Nayak
Add support for the .set_performace_state() and .opp_to_performance_state() callbacks in the rpmpd driver. Signed-off-by: Rajendra Nayak Signed-off-by: Viresh Kumar Reviewed-by: Ulf Hansson --- drivers/soc/qcom/rpmpd.c | 46 1 file changed, 46