logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

tps6594_pfsm.h (1160B)


  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * Userspace ABI for TPS6594 PMIC Pre-configurable Finite State Machine
  4. *
  5. * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/
  6. */
  7. #ifndef __TPS6594_PFSM_H
  8. #define __TPS6594_PFSM_H
  9. #include <linux/const.h>
  10. #include <linux/ioctl.h>
  11. #include <linux/types.h>
  12. /**
  13. * struct pmic_state_opt - PMIC state options
  14. * @gpio_retention: if enabled, power rails associated with GPIO retention remain active
  15. * @ddr_retention: if enabled, power rails associated with DDR retention remain active
  16. * @mcu_only_startup_dest: if enabled, startup destination state is MCU_ONLY
  17. */
  18. struct pmic_state_opt {
  19. __u8 gpio_retention;
  20. __u8 ddr_retention;
  21. __u8 mcu_only_startup_dest;
  22. };
  23. /* Commands */
  24. #define PMIC_BASE 'P'
  25. #define PMIC_GOTO_STANDBY _IO(PMIC_BASE, 0)
  26. #define PMIC_GOTO_LP_STANDBY _IO(PMIC_BASE, 1)
  27. #define PMIC_UPDATE_PGM _IO(PMIC_BASE, 2)
  28. #define PMIC_SET_ACTIVE_STATE _IO(PMIC_BASE, 3)
  29. #define PMIC_SET_MCU_ONLY_STATE _IOW(PMIC_BASE, 4, struct pmic_state_opt)
  30. #define PMIC_SET_RETENTION_STATE _IOW(PMIC_BASE, 5, struct pmic_state_opt)
  31. #endif /* __TPS6594_PFSM_H */