Firefly开源社区

打印 上一主题 下一主题

RK3288使用gpio-keys.c,系统里找不到gpio-keys,求助

20

积分

0

威望

0

贡献

游客

积分
20

RK3288使用gpio-keys.c,系统里找不到gpio-keys,求助

发表于 2017-12-28 18:15:48      浏览:6081 | 回复:1        打印      只看该作者   [复制链接] 楼主
本帖最后由 miyazono 于 2017-12-28 18:21 编辑

我参照晚上移植按键的教程直接在设备树下面添加gpio口信息,然后make menuconfig ,添加按键模块,但是系统却找不到它。
  1. gpio_keys {
  2.                         compatible = "gpio-keys";
  3.                         #address-cells = <1>;
  4.                         #size-cells = <0>;
  5.                         autorepeat;
  6.                         button@1 {
  7.                                 label = "Key1";
  8.                                 linux,code = <49>;
  9.                                 gpios = <&gpio8 GPIO_A0 GPIO_ACTIVE_LOW>;
  10.                         };
  11.                         button@2 {
  12.                                 label = "Key2";
  13.                                 linux,code = <50>;
  14.                                 gpios = <&gpio8 GPIO_A1 GPIO_ACTIVE_LOW>;
  15.                         };
  16.                         
  17.                         button@3 {
  18.                                 label = "Key3";
  19.                                 linux,code = <51>;
  20.                                 gpios = <&gpio8 GPIO_A2 GPIO_ACTIVE_LOW>;
  21.                         };
  22.                         
  23.                         button@4 {
  24.                                 label = "Key4";
  25.                                 linux,code = <52>;
  26.                                 gpios = <&gpio8 GPIO_A3 GPIO_ACTIVE_LOW>;
  27.                         };
  28.                         
  29.                         button@5 {
  30.                                 label = "Key5";
  31.                                 linux,code = <53>;
  32.                                 gpios = <&gpio8 GPIO_A4 GPIO_ACTIVE_LOW>;
  33.                         };
  34.                         
  35.                         button@6 {
  36.                                 label = "Key6";
  37.                                 linux,code = <54>;
  38.                                 gpios = <&gpio6 GPIO_A0 GPIO_ACTIVE_LOW>;
  39.                         };
  40.                         
  41.                         button@7 {
  42.                                 label = "Key7";
  43.                                 linux,code = <55>;
  44.                                 gpios = <&gpio6 GPIO_A1 GPIO_ACTIVE_LOW>;
  45.                         };
  46.                         
  47.                         button@8 {
  48.                                 label = "Key8";
  49.                                 linux,code = <56>;
  50.                                 gpios = <&gpio6 GPIO_A2 GPIO_ACTIVE_LOW>;
  51.                         };
  52.                         
  53.                         button@9 {
  54.                                 label = "Key9";
  55.                                 linux,code = <57>;
  56.                                 gpios = <&gpio6 GPIO_A3 GPIO_ACTIVE_LOW>;
  57.                         };
  58.                         
  59.                         button@10 {
  60.                                 label = "Key10";
  61.                                 linux,code = <58>;
  62.                                 gpios = <&gpio6 GPIO_A4 GPIO_ACTIVE_LOW>;
  63.                         };
  64.                         
  65.                         button@11 {
  66.                                 label = "Key11";
  67.                                 linux,code = <59>;
  68.                                 gpios = <&gpio2 GPIO_A0 GPIO_ACTIVE_LOW>;
  69.                         };
  70.                         
  71.                         button@12 {
  72.                                 label = "Key12";
  73.                                 linux,code = <60>;
  74.                                 gpios = <&gpio2 GPIO_A1 GPIO_ACTIVE_LOW>;
  75.                         };
  76.                         button@13 {
  77.                                 label = "Key13";
  78.                                 linux,code = <61>;
  79.                                 gpios = <&gpio2 GPIO_A2 GPIO_ACTIVE_LOW>;
  80.                         };
  81.                         button@14 {
  82.                                 label = "Key14";
  83.                                 linux,code = <62>;
  84.                                 gpios = <&gpio2 GPIO_A3 GPIO_ACTIVE_LOW>;
  85.                         };
  86.                         button@15 {
  87.                                 label = "Key15";
  88.                                 linux,code = <63>;
  89.                                 gpios = <&gpio2 GPIO_A4 GPIO_ACTIVE_LOW>;
  90.                         };
  91.                         button@16 {
  92.                                 label = "Key16";
  93.                                 linux,code = <64>;
  94.                                 gpios = <&gpio2 GPIO_A5 GPIO_ACTIVE_LOW>;
  95.                         };
  96.                         };
复制代码



QQ截图20171228181543.png (30.95 KB, 下载次数: 68)

QQ截图20171228181543.png
回复

使用道具 举报

9

积分

0

威望

0

贡献

技术小白

积分
9
发表于 2018-1-10 15:13:24        只看该作者  沙发
在gpio-keys.c里打log跟一下。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表