elan touch driver error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

elan touch driver error

1,942 次查看
czur
Contributor III

Hi,

I am using the iMX7 sabre board and we have connected the touch screen to the i2c bus on the EPD interface,

I have updated the device tree imx7d-sdb.dts as per the imx7-sdb-epdc.dtsi as below

&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";

elan@38 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_epdc_elan_touch>;
compatible = "elan,elan-touch";
reg = <0x38>;                                    //Am guessing this would be the slave address?
interrupt-parent = <&gpio6>;
interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
gpio_elan_cs = <&gpio6 13 0>;
gpio_elan_rst = <&gpio6 15 0>;
gpio_intr = <&gpio6 12 0>;
status = "okay";
};

sii902x: sii902x@39 {
compatible = "SiI,sii902x";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sii902x>;
interrupt-parent = <&gpio2>;
interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
mode_str ="1280x720M@60";
bits-per-pixel = <16>;
reg = <0x39>;
status = "disabled";
};

max17135: max17135@48 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_max17135>;
compatible = "maxim,max17135";
reg = <0x48>;
status = "okay";

vneg_pwrup = <1>;
gvee_pwrup = <2>;
vpos_pwrup = <10>;
gvdd_pwrup = <12>;
gvdd_pwrdn = <1>;
vpos_pwrdn = <2>;
gvee_

I get the below error in the driver.

elan-touch 2-0038: elan - Read Hello Packet Failed
elan-touch: probe of 2-0038 failed with error -22

Can you please help me understand if the interrupts are set right? if so what could be the issue?

Thanks

Arun

igorpadykov#imx7 dts#imx7d gpio

标签 (2)
标记 (2)
3 回复数

1,419 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Arun

yes this is address, in imx7-sdb-epdc.dtsi  it used reg = <0x10>;

linux-imx.git - i.MX Linux Kernel 
one can debug this using oscilloscope and driver sources in :

linux/drivers/input/touschscreen/elan_ts.c, hello_packet_handler()

linux-imx.git - i.MX Linux Kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,419 次查看
czur
Contributor III

Thanks for the quick response Igor, I have one other question.

The elan_ts.c has a function which is called during initialization(probe), "elan_touch_poll" which checks if the interrupt is high as below.

static int __elan_touch_poll(struct i2c_client *client)
{
int status = 0, retry = 20;

do {
status = elan_touch_detect_int_level();
retry--;
mdelay(20);
} while (status == 1 && retry > 0);

return status == 0 ? 0 : -ETIMEDOUT;
}

My touch screen has the interrupt as active low, I think even Elan touch screen is the same, but why is the function checking for interrupt to be low during idle?

Regards

Arun

0 项奖励
回复

1,419 次查看
shrikant_bobade
Contributor III

Hi Arun,

Please have a look, I am also getting similar elan-touch failure, just want to check did you got any further pointers on your errors ?

Thanks

Shrikant

0 项奖励
回复