Other Parts Discussed in Thread: ADS7846, , TSC2046E
Tool/software: Linux
linux4.4
driver:drivers/input/touchscreen/ads7846.c
dts:
ads7843: ads7843@00{
status = "okay";
compatible = "ti,ads7843";
reg = <0x00>;
interrupt-parent = <&gpio3>;
interrupts = <1 0>; //
spi-max-frequency = <1000000>;
pendown-gpio = <&gpio3 1 0>; //GPIO3_A1
//vcc-supply = <®_vcc3>;
ti,x-min = /bits/ 16 <0>;
ti,x-max = /bits/ 16 <8000>;
ti,y-min = /bits/ 16 <0>;
ti,y-max = /bits/ 16 <4800>;
ti,x-plate-ohms = /bits/ 16 <40>;
ti,pressure-max = /bits/ 16 <255>;
wakeup-source;
};
func:
ads7846_report_state
if (Rt) {
struct input_dev *input = ts->input;
if (ts->swap_xy)
swap(x, y);
if (!ts->pendown) {
input_report_key(input, BTN_TOUCH, 1);
ts->pendown = true;
dev_vdbg(&ts->spi->dev, "DOWN\n");
}
input_report_abs(input, ABS_X, x);
input_report_abs(input, ABS_Y, y);
input_report_abs(input, ABS_PRESSURE, ts->pressure_max - Rt);
input_sync(input);
dev_vdbg(&ts->spi->dev, "%4d/%4d/%4d\n", x, y, Rt);
printk("lintest ads7846_report_state %4d/%4d/%4d\n", x, y, Rt);
}
when touch the panel
print: lintest ads7846_report_state 0 4095 127
i don't know why...