regulator_common.h 796 B

1234567891011121314151617181920212223242526
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2019 Disruptive Technologies Research AS
  4. * Sven Schwermer <sven.svenschwermer@disruptive-technologies.com>
  5. */
  6. #ifndef _REGULATOR_COMMON_H
  7. #define _REGULATOR_COMMON_H
  8. #include <asm/gpio.h>
  9. struct regulator_common_plat {
  10. struct gpio_desc gpio; /* GPIO for regulator enable control */
  11. unsigned int startup_delay_us;
  12. unsigned int off_on_delay_us;
  13. };
  14. int regulator_common_of_to_plat(struct udevice *dev,
  15. struct regulator_common_plat *dev_pdata, const
  16. char *enable_gpio_name);
  17. int regulator_common_get_enable(const struct udevice *dev,
  18. struct regulator_common_plat *dev_pdata);
  19. int regulator_common_set_enable(const struct udevice *dev,
  20. struct regulator_common_plat *dev_pdata, bool enable);
  21. #endif /* _REGULATOR_COMMON_H */