How modify egalax_tx.c driver to get information when it hangs?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How modify egalax_tx.c driver to get information when it hangs?

1,170件の閲覧回数
sebastianpszczo
Contributor I

We have custom board with imx6 and touchscreen egalx_tx.c driver. It works correctly but sometimes it hangs up. We want to modify driver to read in every 60 second inforamtion from chip and if we check that it hangs we reset it. How can I implement this to driver? I know ioctl but I do not see this implementation in i2c_driver. I want from user space check if driver can read register from chip and if driver can't I reset chip by antoher ioctl command. Is it good idea? Can you give me example how implement ioctl functionality in i2c_driver? Thank you

ラベル(1)
タグ(2)
0 件の賞賛
返信
2 返答(返信)

1,080件の閲覧回数
sebastianpszczo
Contributor I

I created timer and check from this if egalax is working correctly but when I read some register from timer handler kernel crash  :

CPU: 1 PID: 0 Comm: swapper/1 Tainted: G W 4.1.15-1.2.0+g77f6154 #6
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[<80015d84>] (unwind_backtrace) from [<80012728>] (show_stack+0x10/0x14)
[<80012728>] (show_stack) from [<807ef384>] (dump_stack+0x84/0xc4)
[<807ef384>] (dump_stack) from [<80050fac>] (__schedule_bug+0x6c/0xc0)
[<80050fac>] (__schedule_bug) from [<807f2ecc>] (__schedule+0x454/0x50c)
[<807f2ecc>] (__schedule) from [<807f2fc4>] (schedule+0x40/0x98)
[<807f2fc4>] (schedule) from [<807f58ec>] (schedule_timeout+0x118/0x178)
[<807f58ec>] (schedule_timeout) from [<804fee30>] (i2c_imx_trx_complete+0x5c/0xbc)
[<804fee30>] (i2c_imx_trx_complete) from [<804ff32c>] (i2c_imx_xfer+0x49c/0xe7c)
[<804ff32c>] (i2c_imx_xfer) from [<804fb2e8>] (__i2c_transfer+0x13c/0x278)
[<804fb2e8>] (__i2c_transfer) from [<804fb4b8>] (i2c_transfer+0x94/0xc4)
[<804fb4b8>] (i2c_transfer) from [<804fb524>] (i2c_master_send+0x3c/0x4c)
[<804fb524>] (i2c_master_send) from [<804f07d8>] (my_timer_callback+0x18/0x5c)
[<804f07d8>] (my_timer_callback) from [<8007ac20>] (call_timer_fn+0x24/0x98)
[<8007ac20>] (call_timer_fn) from [<8007b16c>] (run_timer_softirq+0x1bc/0x240)
[<8007b16c>] (run_timer_softirq) from [<80037c74>] (__do_softirq+0x120/0x238)
[<80037c74>] (__do_softirq) from [<80038054>] (irq_exit+0xc0/0xfc)
[<80038054>] (irq_exit) from [<8006ca20>] (__handle_domain_irq+0x80/0xec)

Do I need synchronize acces form interrupt and access from timer handler to I2C?

thank you

0 件の賞賛
返信

1,080件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi bb

please check Chapter 35 Inter-IC (I2C) Driver attached Linux Manual and

Porting Guide sect.7.3 Using the I2C Interface

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

0 件の賞賛
返信