1. pinctrl在device tree中的定义和使用
2. pinctrl driver init
3. 常用数据结构
pinctrl驱动的注册主要实现函数
struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
struct device *dev, void *driver_data)
从设备树中获取pinctrl_desc,然后将pinctrl_desc注册到pinctrl_dev
3.1 pinctrl driver
3.1.1 pinctrl_dev
3.1.2 pintctrl_desc
3.2 pinctrl device
device中如何使用pinctrl中定义的引脚
3.2.1 dev_pin_info
- dev_pin_info中存储device_tree中获取到的引脚配置,对于默认的配置常见的配置存放于对应的default_state、sleep_state、init_state、idle_state中
- 对于自定义的pinctrl_state存放于 p中。而p中同时会存放外部使用的default、sleep、之类的状态
- 数据的数据储存在pinctrl_state的setting中
4. pinctrl driver与pinctrl device之间的pin config传递
pinctrl_map转化为pinctrl_setting写入device
标签:driver,37,pinctrl,dev,state,device,数据结构,desc From: https://www.cnblogs.com/burnk/p/17591377.html