How to config to use SAMA5D3 ADC for touch screen

Moderator: nferre

lym2533
Posts: 1
Joined: Tue Apr 07, 2015 9:25 am

How to config to use SAMA5D3 ADC for touch screen

Tue Apr 07, 2015 9:49 am

Now, I am using SAMA5D3 Xplained's ADC0~ADC3 for 4 wires resistance touch screen, the linux kernel(3.10) downloaded from https://github.com/linux4sam/linux-at91.
I config the dts like this:
adc0: adc@f8018000 {
pinctrl-names = "default";
pinctrl-0 = <
&pinctrl_adc0_adtrg
&pinctrl_adc0_ad0
&pinctrl_adc0_ad1
&pinctrl_adc0_ad2
&pinctrl_adc0_ad3
&pinctrl_adc0_ad4
&pinctrl_adc0_ad5
&pinctrl_adc0_ad6
&pinctrl_adc0_ad7
&pinctrl_adc0_ad8
&pinctrl_adc0_ad9
>;
atmel,adc-clock-rate = <1000000>;
atmel,adc-ts-wires = <4>;
atmel,adc-vref = <3000>;
atmel,adc-ts-pressure-threshold = <10000>;

status = "okay";

I can loading the iio driver and it's device is /dev/input/event0.
When I run ts_calibrate, i can touch the screen, and it doesn't return valid data for me. I find it can enter  getxy() but can't enter ts_read_raw(), everyone know why?
the tslib is tslib1.4 and the ts.conf is:module_raw input

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 4 guests