On Mon, Jan 22, 2024, at 23:57, Peter Griffin wrote: > --- a/include/linux/soc/samsung/exynos-pmu.h > +++ b/include/linux/soc/samsung/exynos-pmu.h > @@ -21,11 +21,39 @@ 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); > +extern int exynos_pmu_update_bits(unsigned int offset, unsigned int > mask, > + unsigned int val); > +extern int exynos_pmu_update(unsigned int offset, unsigned int mask, > + unsigned int val); > +extern int exynos_pmu_write(unsigned int offset, unsigned int val); > +extern int exynos_pmu_read(unsigned int offset, unsigned int *val); > #else > static inline struct regmap *exynos_get_pmu_regmap(void) > { > return ERR_PTR(-ENODEV); > } > + > +static inline int exynos_pmu_update_bits(unsigned int offset, unsigned > int mask, > + unsigned int val); > +{ > + return ERR_PTR(-ENODEV); > +} > + > +static inline int exynos_pmu_update(unsigned int offset, unsigned int > mask, > + unsigned int val); > +{ > + return ERR_PTR(-ENODEV); > +} This won't build since you have the wrong return type. I would suggest you just remove the #ifdef check entirely and instead require drivers using this to have correct dependencies. Arnd