请问一下rk_keys.c文件该如何使用,我在dts文件添加按键以后,总是提示错误

本帖最后由 miyazono 于 2017-12-28 20:27 编辑

我在dts文件添加按键,添加一个可以正常使用,添加多个就提示“” rk-keypad: probe of key.31 failed with error -16“”,我不用AD按键,只是普通的gpio按键就行

&adc {
	status = "okay";
	key {
		compatible = "rockchip,key";
		io-channels = <&adc 1>;
		button1 {
			gpios = <&gpio8 GPIO_A0 GPIO_ACTIVE_LOW>;
			linux,code = <1>;
			label = "Key1";
		};
		button2 {
		gpios = <&gpio8 GPIO_A1 GPIO_ACTIVE_LOW>;
		linux,code = <2>;
		label = "Key2";
	};
	};
};