博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Linux 内核设备驱动之GPIO驱动之GPIO 管脚添加
阅读量:4154 次
发布时间:2019-05-25

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

在配置CONFIG_OF_GPIO下作用:
 
int of_gpiochip_add(struct gpio_chip *chip){ int status;  if ((!chip->of_node) && (chip->parent))  chip->of_node = chip->parent->of_node;  if (!chip->of_node)  return 0;  if (!chip->of_xlate) {  chip->of_gpio_n_cells = 2;  chip->of_xlate = of_gpio_simple_xlate; }  if (chip->of_gpio_n_cells > MAX_PHANDLE_ARGS)  return -EINVAL;  status = of_gpiochip_add_pin_range(chip); if (status)  return status;  /* If the chip defines names itself, these take precedence */ if (!chip->names)  of_gpiochip_set_names(chip);  of_node_get(chip->of_node);  return of_gpiochip_scan_gpios(chip);} void of_gpiochip_remove(struct gpio_chip *chip){ gpiochip_remove_pin_ranges(chip); of_node_put(chip->of_node);}
 
 

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

你可能感兴趣的文章
程序员失误造成服务停用3小时,只得到半月辞退补偿,发帖喊冤
查看>>
码农:很多人称我“技术”,感觉这是不尊重!纠正无果后果断辞职
查看>>
php程序员看过来,这老外是在吐糟你吗?看看你中了几点!
查看>>
为什么说程序员是“培训班出来的”就是鄙视呢?
查看>>
码农吐糟同事:写代码低调点不行么?空格回车键与你有仇吗?
查看>>
阿里p8程序员四年提交6000次代码的确有功,但一次错误让人唏嘘!
查看>>
一道技术问题引起的遐想,最后得出结论技术的本质是多么的朴实!
查看>>
985硕士:非科班自学编程感觉还不如培训班出来的,硕士白读了?
查看>>
你准备写代码到多少岁?程序员们是这么回答的!
查看>>
码农:和产品对一天需求,产品经理的需求是对完了,可我代码呢?
查看>>
程序员过年回家该怎么给亲戚朋友解释自己的职业?
查看>>
技术架构师的日常工作是什么?网友:搭框架,写公共方法?
查看>>
第四章 微信飞机大战
查看>>
九度:题目1008:最短路径问题
查看>>
九度Online Judge
查看>>
九度:题目1027:欧拉回路
查看>>
九度:题目1012:畅通工程
查看>>
九度:题目1017:还是畅通工程
查看>>
九度:题目1034:寻找大富翁
查看>>
第六章 背包问题——01背包
查看>>