pinctrl-state.h 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Standard pin control state definitions
  3. */
  4. /**
  5. * @PINCTRL_STATE_DEFAULT: the state the pinctrl handle shall be put
  6. * into as default, usually this means the pins are up and ready to
  7. * be used by the device driver. This state is commonly used by
  8. * hogs to configure muxing and pins at boot, and also as a state
  9. * to go into when returning from sleep and idle in
  10. * .pm_runtime_resume() or ordinary .resume() for example.
  11. * @PINCTRL_STATE_INIT: normally the pinctrl will be set to "default"
  12. * before the driver's probe() function is called. There are some
  13. * drivers where that is not appropriate becausing doing so would
  14. * glitch the pins. In those cases you can add an "init" pinctrl
  15. * which is the state of the pins before drive probe. After probe
  16. * if the pins are still in "init" state they'll be moved to
  17. * "default".
  18. * @PINCTRL_STATE_IDLE: the state the pinctrl handle shall be put into
  19. * when the pins are idle. This is a state where the system is relaxed
  20. * but not fully sleeping - some power may be on but clocks gated for
  21. * example. Could typically be set from a pm_runtime_suspend() or
  22. * pm_runtime_idle() operation.
  23. * @PINCTRL_STATE_SLEEP: the state the pinctrl handle shall be put into
  24. * when the pins are sleeping. This is a state where the system is in
  25. * its lowest sleep state. Could typically be set from an
  26. * ordinary .suspend() function.
  27. */
  28. #define PINCTRL_STATE_DEFAULT "default"
  29. #define PINCTRL_STATE_INIT "init"
  30. #define PINCTRL_STATE_IDLE "idle"
  31. #define PINCTRL_STATE_SLEEP "sleep"