linux_driver/cst816x-driver-main/rpi4b/hynitron-cst816s.dts
2024-11-19 11:37:38 +08:00

50 lines
1.4 KiB
Plaintext

/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&i2c1>;
__overlay__ {
cst816s: cst816s@15 {
compatible = "hynitron,cst816s";
reg = <0x15>;
interrupt-parent = <&gpio>;
interrupts = <4 1>; /* IRQF_TRIGGER_RISING */
reset-gpios = <&gpio 17 1>; /* GPIO_ACTIVE_LOW */
touchscreen {
swipe_up {
cst816x,gesture = <0x1>;
linux,code = <0x115>; // BTN_FORWARD
};
swipe_down {
cst816x,gesture = <0x2>;
linux,code = <0x116>; // BTN_BACK
};
swipe_left {
cst816x,gesture = <0x3>;
linux,code = <0x110>; // BTN_LEFT
};
swipe_right {
cst816x,gesture = <0x4>;
linux,code = <0x111>; // BTN_RIGHT
};
single_tap {
cst816x,gesture = <0x5>;
linux,code = <0x14A>; // BTN_TOUCH
};
long_press {
cst816x,gesture = <0xC>;
linux,code = <0x14E>; // BTN_TOOL_TRIPLETAP
};
};
};
};
};
};