This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/ADS7843: work incorrect ,get event (get value x:0 y:4095 Rt:127 )

Part Number: ADS7843
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 = <&reg_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...

  • Hello,

    Our expertise with TI's touch screen controller products lies much more with the operation of the touch screen controller devices and less on processor/FW/Linux driver debug but we will do our best to support you.

    First, are you using the ADS7843 or the ADS7846? The two devices are pin-to-pin compatible and mostly SW compatible, but the ADS7846 includes some additional features including direct battery measurement, temperature measurement, and touch pressure measurements.

    Second, both the ADS7846 and the ADS7843 are older Touch Screen Controller products. Is there a particular reason you've selected this device versus the more recent TSC2046E?
  • thank you for your support. 

    yes,using ADS7843 now,why not TSC2046E?because of HW design use ADS7843

    can you tell me,why when spi read from ADS7843,the value is all 4095 (the 12bit ADC max value)?

    can you call me,my tel:186-8874-2399 

    thankyou.