reboot-mode-gpio.h 671 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (c) Vaisala Oyj.
  4. */
  5. #ifndef REBOOT_MODE_REBOOT_MODE_GPIO_H_
  6. #define REBOOT_MODE_REBOOT_MODE_GPIO_H_
  7. #include <asm/gpio.h>
  8. /*
  9. * In case of initializing the driver statically (using U_BOOT_DEVICE macro),
  10. * we can use this struct to declare the pins used.
  11. */
  12. #if !CONFIG_IS_ENABLED(OF_CONTROL)
  13. struct reboot_mode_gpio_config {
  14. int gpio_dev_offset;
  15. int gpio_offset;
  16. int flags;
  17. };
  18. #endif
  19. struct reboot_mode_gpio_platdata {
  20. struct gpio_desc *gpio_desc;
  21. #if !CONFIG_IS_ENABLED(OF_CONTROL)
  22. struct reboot_mode_gpio_config *gpios_config;
  23. #endif
  24. int gpio_count;
  25. };
  26. #endif /* REBOOT_MODE_REBOOT_MODE_GPIO_H_ */