Re: [RFC 3/4] PM / devfreq: exynos-bus: add support for suspend OPP

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

 



Hi Tobias,

On 2016년 11월 23일 22:51, Tobias Jakobi wrote:
> TODO: write desc
> Signed-off-by: Tobias Jakobi <tjakobi@xxxxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/devfreq/exynos-bus.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 29866f7..8a91970 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -335,6 +335,7 @@ static int exynos_bus_parse_of(struct device_node *np,
>  			      struct exynos_bus *bus)
>  {
>  	struct device *dev = bus->dev;
> +	struct dev_pm_opp *suspend_opp;
>  	unsigned long rate;
>  	int ret;
>  
> @@ -368,6 +369,13 @@ static int exynos_bus_parse_of(struct device_node *np,
>  		ret = PTR_ERR(bus->curr_opp);
>  		goto err_opp;
>  	}
> +
> +	suspend_opp = dev_pm_opp_get_suspend_opp(dev);
> +	if (suspend_opp) {
> +		bus->devfreq->suspend_freq = dev_pm_opp_get_freq(suspend_opp);
> +		printk("DEBUG: suspend opp found!\n");
> +	}

Looks good to me. But, you have to move this code
in the exynos_bus_parent_parse_of() because the passive devfreq
don't need to get the suspend_opp. The suspend_opp is necessary
only for parent devfreq device.

If parent devfreq device change the frequency/voltage,
the passive devfreq device will change the their frequency/voltage
according to parent devfreq.

> +
>  	rcu_read_unlock();
>  
>  	return 0;
> 

-- 
Best Regards,
Chanwoo Choi
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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