Interface for pin controller drivers.
More...
Interface for pin controller drivers.
A driver embeds a struct pbl_pinctrl_controller in its instance, sets it up with PBL_PINCTRL_CONTROLLER_INIT(), and implements the struct pbl_pinctrl_controller_ops the class calls.
◆ pbl_pinctrl_controller
| struct pbl_pinctrl_controller |
◆ PBL_PINCTRL_CONTROLLER_INIT
| #define PBL_PINCTRL_CONTROLLER_INIT |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_parent, |
|
|
|
_ops, |
|
|
|
_num_pads, |
|
|
|
_hog |
|
) |
| |
Value: { \
.ops = (_ops), \
.num_pads = (_num_pads), \
.hog = (_hog), \
}
#define PBL_DEVICE_INIT_CLASS(sym, _name, _init, _parent, _cls)
Initializer for the struct pbl_device of device instance sym, in class _cls.
Definition device.h:153
const struct pbl_device_class pbl_pinctrl_class
Class of the pin controllers.
Initializer for the struct pbl_pinctrl_controller of controller sym.
- Parameters
-
| sym | Symbol of the controller instance, with its state defined by PBL_DEVICE_STATE_DEFINE(). |
| _name | Name. |
| _parent | Parent device, or NULL. |
| _ops | Driver operations. |
| _num_pads | Number of pads. |
| _hog | State of the controller's own, selected at init, or NULL. |
◆ pbl_pinctrl_class
Class of the pin controllers.