【发布时间】:2018-05-08 00:05:55
【问题描述】:
我正在尝试在屏幕进入睡眠状态后使用 gpio-keys 中断来唤醒屏幕。我正在使用 Raspberry Pi 3 和 Lineage OS 14.1。我已经能够成功配置 gpio-keys,它在接收到中断时注册输入设备事件。但是,当它熄灭时,我无法让它唤醒屏幕。我的 gpio-keys 设备的设备树覆盖文件如下:
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
// Configure the gpio pin controller
target = <&gpio>;
__overlay__ {
pin_state: key_pins@0 {
brcm,pins = <17>; // gpio number
brcm,function = <0>; // 0 = input, 1 = output
brcm,pull = <2>; // 0 = none, 1 = pull down, 2 = pull up
};
};
};
fragment@1 {
target-path = "/";
__overlay__ {
keypad: proximity@0 {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
key: proximity {
label = "proximity detection";
linux,code = <61>; // F3 Key
gpios = <&gpio 17 1>; // GPIO 17
wakeup-source;
};
};
};
};
};
正如您在文件中看到的,我添加了属性 wakeup-source 但我相信它可能会在屏幕睡眠时将系统从 CPU 睡眠中唤醒,而不一定是屏幕本身。
您也看到了,我的 gpio-keys 绑定到 KEY F3。如果我按键盘上的 F3,它会唤醒显示器。但是,如果我在 GPIO17 引脚上生成中断,即使它注册为 KEY F3 事件,它也不会唤醒监视器。关于如何从 gpio-keys 唤醒显示器的任何建议?谢谢!
【问题讨论】:
标签: android linux-kernel raspberry-pi3 device-tree wakeup