博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Linux 内核设备驱动之GPIO驱动之GPIO 框架初始化
阅读量:4153 次
发布时间:2019-05-25

本文共 555 字,大约阅读时间需要 1 分钟。

 
static struct bus_type gpio_bus_type = { .name = "gpio",};
 
static int __init gpiolib_dev_init(void){ int ret;  /* Register GPIO sysfs bus */ ret  = bus_register(&gpio_bus_type); if (ret < 0) {  pr_err("gpiolib: could not register GPIO bus type\n");  return ret; }  ret = alloc_chrdev_region(&gpio_devt, 0, GPIO_DEV_MAX, "gpiochip"); if (ret < 0) {  pr_err("gpiolib: failed to allocate char dev region\n");  bus_unregister(&gpio_bus_type); } else {  gpiolib_initialized = true;  gpiochip_setup_devs(); } return ret;}core_initcall(gpiolib_dev_init);
 
 

转载地址:http://vgqti.baihongyu.com/

你可能感兴趣的文章
【转载】docker容器设置自动重启,设置容器启动就执行某个服务
查看>>
shell脚本中EOF的作用
查看>>
报错解决:the input device is not a TTY
查看>>
matplotlib.pyplot可视化库中contour与contourf的区别
查看>>
KITTI数据集介绍
查看>>
python将列表保存到txt
查看>>
VOC、YOLO、VIA、KITTI等数据标注格式解析
查看>>
容器与宿主机之间复制文件
查看>>
多种方法取出字典中value最大值对应的key
查看>>
tf.where()详解
查看>>
Ubuntu18.04安装nvidia-docker报错:gpg: 找不到有效的 OpenPGP 数据。
查看>>
TensorFlow2.X报错AttributeError: ‘BatchDataset‘ object has no attribute ‘make_one_shot_iterator‘
查看>>
解决ImportError: cannot import name ‘layer_utils‘ from ‘tensorflow.keras.utils‘问题
查看>>
Keras 提示找不到该层ValueError: No such layer: conv2d_589
查看>>
tensorflow models安装记录
查看>>
python glob.glob()函数
查看>>
jetson nano apt install 问题解决Could not handshake: An unexpected TLS packet was received. [xxx]
查看>>
jetson nano 安装python机器学习三方库问题
查看>>
Ubuntu安装jupyter后,使用时显示找不到命令(command not found)
查看>>
Ubuntu18解决容器内连网代理设置问题
查看>>