Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Standard pin control state definitions
0004  */
0005 
0006 #ifndef __LINUX_PINCTRL_PINCTRL_STATE_H
0007 #define __LINUX_PINCTRL_PINCTRL_STATE_H
0008 
0009 /**
0010  * @PINCTRL_STATE_DEFAULT: the state the pinctrl handle shall be put
0011  *  into as default, usually this means the pins are up and ready to
0012  *  be used by the device driver. This state is commonly used by
0013  *  hogs to configure muxing and pins at boot, and also as a state
0014  *  to go into when returning from sleep and idle in
0015  *  .pm_runtime_resume() or ordinary .resume() for example.
0016  * @PINCTRL_STATE_INIT: normally the pinctrl will be set to "default"
0017  *  before the driver's probe() function is called.  There are some
0018  *  drivers where that is not appropriate becausing doing so would
0019  *  glitch the pins.  In those cases you can add an "init" pinctrl
0020  *  which is the state of the pins before drive probe.  After probe
0021  *  if the pins are still in "init" state they'll be moved to
0022  *  "default".
0023  * @PINCTRL_STATE_IDLE: the state the pinctrl handle shall be put into
0024  *  when the pins are idle. This is a state where the system is relaxed
0025  *  but not fully sleeping - some power may be on but clocks gated for
0026  *  example. Could typically be set from a pm_runtime_suspend() or
0027  *  pm_runtime_idle() operation.
0028  * @PINCTRL_STATE_SLEEP: the state the pinctrl handle shall be put into
0029  *  when the pins are sleeping. This is a state where the system is in
0030  *  its lowest sleep state. Could typically be set from an
0031  *  ordinary .suspend() function.
0032  */
0033 #define PINCTRL_STATE_DEFAULT "default"
0034 #define PINCTRL_STATE_INIT "init"
0035 #define PINCTRL_STATE_IDLE "idle"
0036 #define PINCTRL_STATE_SLEEP "sleep"
0037 
0038 #endif /* __LINUX_PINCTRL_PINCTRL_STATE_H */