Finding right Android touchscreen driver file

白昼怎懂夜的黑 提交于 2019-11-30 18:06:08

问题


My goal is to add a single printk command to one of the driver files for my phone's touchscreen. I would like to run this printk command everytime the screen recieves touch input. I found the list of touchscreen driver files shown below. I'm just hoping someone with some experience might be able to point me to the correct file to place this printk command.

ad7877.c       atmel_224e.c    cy8ctmg110_ts.c  gunze.c           intel-mid-touch.c
max11801_ts.c  pcap_ts.c       touchit213.c     ucb1400_ts.c      wm9712.c  
ad7879.c       atmel_mxt_ts.c  da9034-ts.c      h3600_ts_input.c  jornada720_ts.c
mc13783_ts.c   penmount.c      touchright.c     usbtouchscreen.c  wm9713.c
ad7879.h       atmel_tsadcc.c  dynapro.c        hampshire.c       Kconfig 
mcs5000_ts.c   s3c2410_ts.c    touchwin.c       w90p910_ts.c      wm97xx-core.c
ad7879-i2c.c   atmel-wm97xx.c  eeti_ts.c        hp680_ts_input.c  lpc32xx_ts.c  
migor_ts.c     st1232.c        tps6507x-ts.c    wacom_w8001.c     zylonite-wm97xx.c
ad7879-spi.c   bu21013_ts.c    elo.c            htcpen.c          mainstone-wm97xx.c
mk712.c        stmpe-ts.c      tsc2005.c        wm831x-ts.c

回答1:


First Check the Driver file by using the following command on terminal: $logcat | grep EventHub You will find all the input devices (Including your touch driver) in the prints.

Go to that file and add the print command in interrupt handler.




回答2:


Try running the getevent command in a shell on the Android device. The touchscreen should be listed, and the name should be the driver being used.

Here's what came up on my phone:

add device 7: /dev/input/event1
  name:     "synaptics_dsx"

This means my phone uses the synaptics_dsx touchscreen driver.



来源:https://stackoverflow.com/questions/22058758/finding-right-android-touchscreen-driver-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!