Go to the documentation of this file.
13 #ifndef __PINCTRL_MVEBU_H__
14 #define __PINCTRL_MVEBU_H__
76 #define MVEBU_SETTING_GPO (1 << 0)
77 #define MVEBU_SETTING_GPI (1 << 1)
117 #define MPP_REG_CTRL(_idl, _idh) \
121 .npins = _idh - _idl + 1, \
122 .pins = (unsigned[_idh - _idl + 1]) { }, \
125 .mpp_gpio_req = NULL, \
126 .mpp_gpio_dir = NULL, \
129 #define MPP_FUNC_CTRL(_idl, _idh, _name, _func) \
133 .npins = _idh - _idl + 1, \
134 .pins = (unsigned[_idh - _idl + 1]) { }, \
135 .mpp_get = _func ## _get, \
136 .mpp_set = _func ## _set, \
137 .mpp_gpio_req = NULL, \
138 .mpp_gpio_dir = NULL, \
141 #define MPP_FUNC_GPIO_CTRL(_idl, _idh, _name, _func) \
145 .npins = _idh - _idl + 1, \
146 .pins = (unsigned[_idh - _idl + 1]) { }, \
147 .mpp_get = _func ## _get, \
148 .mpp_set = _func ## _set, \
149 .mpp_gpio_req = _func ## _gpio_req, \
150 .mpp_gpio_dir = _func ## _gpio_dir, \
153 #define _MPP_VAR_FUNCTION(_val, _name, _subname, _mask) \
157 .subname = _subname, \
162 #if defined(CONFIG_DEBUG_FS)
163 #define MPP_VAR_FUNCTION(_val, _name, _subname, _mask) \
164 _MPP_VAR_FUNCTION(_val, _name, _subname, _mask)
166 #define MPP_VAR_FUNCTION(_val, _name, _subname, _mask) \
167 _MPP_VAR_FUNCTION(_val, _name, NULL, _mask)
170 #define MPP_FUNCTION(_val, _name, _subname) \
171 MPP_VAR_FUNCTION(_val, _name, _subname, (u8)-1)
173 #define MPP_MODE(_id, ...) \
176 .settings = (struct mvebu_mpp_ctrl_setting[]){ \
177 __VA_ARGS__, { } }, \
180 #define MPP_GPIO_RANGE(_id, _pinbase, _gpiobase, _npins) \
182 .name = "mvebu-gpio", \
184 .pin_base = _pinbase, \