diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2020-01-30 19:00:52 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-02-03 09:23:24 +0100 |
commit | 5ac25ce6081f39cfb8e9d06a9d0680e2fdb6f706 (patch) | |
tree | 99294a2c597b7d9638e5492d888dab19d3dd7a67 /include | |
parent | 577ff43d1318800118b8b97344ef66340e1a5cb1 (diff) | |
download | barebox-5ac25ce6081f39cfb8e9d06a9d0680e2fdb6f706.tar.gz barebox-5ac25ce6081f39cfb8e9d06a9d0680e2fdb6f706.tar.xz |
regulator: pfuze: add support to other architectures
Currently the pfuze driver is build dependent to ARCH_IMX6. To make it
possible to work with ARCH_IMX8 we move the imx6_poweroff call to an own
poweroff handler.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/mfd/pfuze.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/mfd/pfuze.h b/include/mfd/pfuze.h index 6045ceec0a..8e021680ef 100644 --- a/include/mfd/pfuze.h +++ b/include/mfd/pfuze.h @@ -1,6 +1,22 @@ #ifndef __INCLUDE_PFUZE_H #define __INCLUDE_PFUZE_H +#include <regmap.h> + +#ifdef CONFIG_REGULATOR_PFUZE +/* + * For proper poweroff sequencing, users on imx6 needs to call + * poweroff_handler_register_fn(imx6_pm_stby_poweroff); + * inside of the callback, to ensure a proper poweroff sequence + */ int pfuze_register_init_callback(void(*callback)(struct regmap *map)); +#else + +static inline int pfuze_register_init_callback(void(*callback)(struct regmap *map)) +{ + return -ENODEV; +} +#endif + #endif /* __INCLUDE_PFUZE_H */ |