RE: [PATCH] drivers: genpd: let platform code to register devices into disabled domains

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

 



Hi Rafeal,

On Friday, April 06, 2012 10:03 AM Marek Szyprowski wrote:

> Some bootloaders disable power domains on boot and the platform startup
> code registers them in the 'disabled' state. Current gen_pd code assumed
> that the devices can be registered only to the power domain which is in
> 'enabled' state and these devices are active at the time of the
> registration. This is not correct in our case. This patch lets drivers
> to be registered into 'disabled' power domains and finally solves
> mysterious freezes and lack of resume/suspend calls on Samsung Exynos4
> NURI and UniversalC210 platforms.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>

Could you comment on this patch? It is really annoying issue and I would like to have it
finally solved.

> ---
>  drivers/base/power/domain.c |    7 +------
>  1 files changed, 1 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 73ce9fb..05f5799f 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -1211,11 +1211,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct
> device *dev,
> 
>  	genpd_acquire_lock(genpd);
> 
> -	if (genpd->status == GPD_STATE_POWER_OFF) {
> -		ret = -EINVAL;
> -		goto out;
> -	}
> -
>  	if (genpd->prepared_count > 0) {
>  		ret = -EAGAIN;
>  		goto out;
> @@ -1239,7 +1234,7 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device
> *dev,
>  	dev_pm_get_subsys_data(dev);
>  	dev->power.subsys_data->domain_data = &gpd_data->base;
>  	gpd_data->base.dev = dev;
> -	gpd_data->need_restore = false;
> +	gpd_data->need_restore = true;
>  	list_add_tail(&gpd_data->base.list_node, &genpd->dev_list);
>  	if (td)
>  		gpd_data->td = *td;
> --
> 1.7.1.569.g6f426

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center


--
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