diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2017-01-19 14:48:41 +0100 |
---|---|---|
committer | Krzysztof Kozlowski <krzk@kernel.org> | 2017-01-20 18:35:36 +0200 |
commit | 76640b84bd7a9d68c70d8bc8ecd02cdc4bd8855e (patch) | |
tree | 92cd140c99d4e55116760f95838b74d07dec30a5 /include/linux/soc | |
parent | 0c744ea4f77d72b3dcebb7a8f2684633ec79be88 (diff) |
soc: samsung: pmu: Provide global function to get PMU regmap
PMU is something like a SoC wide service, so add a helper function to get
PMU regmap. This will be used by other Exynos device drivers. This way it
can be avoided to model this dependency in device tree (as phandles to PMU
node) for almost every device in the SoC.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'include/linux/soc')
-rw-r--r-- | include/linux/soc/samsung/exynos-pmu.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/soc/samsung/exynos-pmu.h b/include/linux/soc/samsung/exynos-pmu.h index e2e9de1acc5b..e57eb4b6cc5a 100644 --- a/include/linux/soc/samsung/exynos-pmu.h +++ b/include/linux/soc/samsung/exynos-pmu.h @@ -12,6 +12,8 @@ #ifndef __LINUX_SOC_EXYNOS_PMU_H #define __LINUX_SOC_EXYNOS_PMU_H +struct regmap; + enum sys_powerdown { SYS_AFTR, SYS_LPA, @@ -20,5 +22,13 @@ enum sys_powerdown { }; extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); +#ifdef CONFIG_EXYNOS_PMU +extern struct regmap *exynos_get_pmu_regmap(void); +#else +static inline struct regmap *exynos_get_pmu_regmap(void) +{ + return ERR_PTR(-ENODEV); +} +#endif #endif /* __LINUX_SOC_EXYNOS_PMU_H */ |