Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d09f450 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

ARM: shmobile: Add routine for automatic PM domains initialization



Add a new routine, rmobile_init_domains(), allowing the caller
to initialize all generic PM objects stored in a table in one
operation.

Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarMagnus Damm <damm@opensource.se>
parent 7fcb3047
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -31,10 +31,12 @@ struct rmobile_pm_domain *to_rmobile_pd(struct generic_pm_domain *d)


#ifdef CONFIG_PM
#ifdef CONFIG_PM
extern void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd);
extern void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd);
extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num);
extern void rmobile_add_device_to_domain(const char *domain_name,
extern void rmobile_add_device_to_domain(const char *domain_name,
					struct platform_device *pdev);
					struct platform_device *pdev);
#else
#else
#define rmobile_init_pm_domain(pd) do { } while (0)
#define rmobile_init_pm_domain(pd) do { } while (0)
#define rmobile_init_domains(domains, num) do { } while (0)
#define rmobile_add_device_to_domain(name, pdev) do { } while (0)
#define rmobile_add_device_to_domain(name, pdev) do { } while (0)
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */


+8 −0
Original line number Original line Diff line number Diff line
@@ -149,6 +149,14 @@ void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)
	__rmobile_pd_power_up(rmobile_pd, false);
	__rmobile_pd_power_up(rmobile_pd, false);
}
}


void rmobile_init_domains(struct rmobile_pm_domain domains[], int num)
{
	int j;

	for (j = 0; j < num; j++)
		rmobile_init_pm_domain(&domains[j]);
}

void rmobile_add_device_to_domain(const char *domain_name,
void rmobile_add_device_to_domain(const char *domain_name,
				 struct platform_device *pdev)
				 struct platform_device *pdev)
{
{