• RK3288 Linux4.4.143 适配EETI


    适配电阻触摸屏

    一.添加配置文件

    diff --git a/device/rockchip/common/device.mk b/device/rockchip/common/device.mk
    index 22fa127..38f84fa 100755
    --- a/device/rockchip/common/device.mk
    +++ b/device/rockchip/common/device.mk
    @@ -773,4 +773,8 @@ PRODUCT_COPY_FILES += 
        device/rockchip/common/su/system/bin/rootsudaemon.sh:system/bin/rootsudaemon.sh 
        device/rockchip/common/su/system/xbin/su:system/xbin/su 
        device/rockchip/common/su/system/xbin/daemonsu:system/xbin/daemonsu
    -   
     No newline at end of file
    +
    +PRODUCT_COPY_FILES += 
    +		device/rockchip/common/eeti_file/eGalaxTouch_VirtualDevice.idc:system/usr/idc/eGalaxTouch_VirtualDevice.idc 
    +		device/rockchip/common/eeti_file/eGTouchA.ini:system/etc/eGTouchA.ini 
    +		device/rockchip/common/eeti_file/eGTouchD:system/bin/eGTouchD   
     No newline at end of file
    
    
    diff --git a/device/rockchip/common/init.rk30board.rc b/device/rockchip/common/init.rk30board.rc
    index 03f3e35..0f94f71 100755
    --- a/device/rockchip/common/init.rk30board.rc
    +++ b/device/rockchip/common/init.rk30board.rc
    @@ -172,6 +172,9 @@ on boot
         chown system system /sys/bus/platform/drivers/usb20_otg/force_usb_mode
         chmod 0664 /sys/bus/platform/drivers/usb20_otg/force_usb_mode
     
    +    copy /etc/eGTouchA.ini /data/eGTouchA.ini
    +    chmod 0777 /data/eGTouchA.ini
    +    
     		#add for rtc by jessica
     		chown system system /sys/class/rtc/rtc0/wakealarm
     		chmod 0666 /sys/class/rtc/rtc0/wakealarm
    

     二.驱动

    diff --git a/kernel/drivers/input/evdev.c b/kernel/drivers/input/evdev.c
    index e9ae3d5..0790a38 100755
    --- a/kernel/drivers/input/evdev.c
    +++ b/kernel/drivers/input/evdev.c
    @@ -1454,11 +1454,21 @@ static const struct input_device_id evdev_ids[] = {
         { },            /* Terminating zero entry */
     };
     
    +static bool evdev_match(struct input_handler *handler, struct input_dev *dev)
    +{
    +        /* Avoid EETI USB touchscreens */
    +        #define VID_EETI 0x0EEF
    +        if ((BUS_USB == dev->id.bustype) && (VID_EETI == dev->id.vendor))
    +        return false;
    +        return true;
    +}
    +
     MODULE_DEVICE_TABLE(input, evdev_ids);
     
     static struct input_handler evdev_handler = {
         .event        = evdev_event,
         .events        = evdev_events,
    +    .match = evdev_match, /* Added by EETI*/
         .connect    = evdev_connect,
         .disconnect    = evdev_disconnect,
         .legacy_minors    = true,
    diff --git a/kernel/drivers/input/joydev.c b/kernel/drivers/input/joydev.c
    index 5d11fea..1763abe 100755
    --- a/kernel/drivers/input/joydev.c
    +++ b/kernel/drivers/input/joydev.c
    @@ -804,7 +804,10 @@ static bool joydev_match(struct input_handler *handler, struct input_dev *dev)
         /* Avoid tablets, digitisers and similar devices */
         if (test_bit(EV_KEY, dev->evbit) && test_bit(BTN_DIGI, dev->keybit))
             return false;
    -
    +        /* Avoid EETI virtual devices */
    +    #define VID_EETI 0x0EEF
    +    if (( BUS_VIRTUAL == dev->id.bustype) && (VID_EETI == dev->id.vendor))
    +        return false;
         /* Avoid absolute mice */
         if (joydev_dev_is_absolute_mouse(dev))
             return false;
    diff --git a/kernel/drivers/input/mousedev.c b/kernel/drivers/input/mousedev.c
    index 30328e5..a3d2180 100755
    --- a/kernel/drivers/input/mousedev.c
    +++ b/kernel/drivers/input/mousedev.c
    @@ -1057,11 +1057,24 @@ static const struct input_device_id mousedev_ids[] = {
         { },    /* Terminating entry */
     };
     
    +static bool mousedev_match(struct input_handler *handler, struct input_dev *dev)
    +{
    +        /* Avoid EETI USB touchscreens */
    +        #define VID_EETI 0x0EEF
    +        if ((BUS_USB == dev->id.bustype) && (VID_EETI == dev->id.vendor))
    +        return false;
    +        /* Avoid EETI virtual devices */
    +        if ((BUS_VIRTUAL == dev->id.bustype) && (VID_EETI == dev->id.vendor))
    +        return false;
    +        return true;
    +}
    +
     MODULE_DEVICE_TABLE(input, mousedev_ids);
     
     static struct input_handler mousedev_handler = {
         .event        = mousedev_event,
         .connect    = mousedev_connect,
    +    .match = mousedev_match, /* Added by EETI */
         .disconnect    = mousedev_disconnect,
         .legacy_minors    = true,
         .minor        = MOUSEDEV_MINOR_BASE,
    diff --git a/system/core/rootdir/init.rc b/system/core/rootdir/init.rc
    index d6fb7da..e1bf610 100755
    --- a/system/core/rootdir/init.rc
    +++ b/system/core/rootdir/init.rc
    @@ -692,4 +692,9 @@ service lcdparamservice /system/bin/lcdparamservice
         user root
         group root
         oneshot
    -    
     No newline at end of file
    +    
    +service eGTouchD /system/bin/eGTouchD
    +        class main
    +        user root
    +        group root
    +        oneshot    
     No newline at end of file
    

      

  • 相关阅读:
    树型表的设计 上海
    FTP通讯封装 上海
    线程淡写 上海
    TCP通讯故障 上海
    设计模式引导 上海
    初试Delegate 上海
    c# 扫描端口 上海
    攻读计算机研究生的看法(转载) 上海
    挖掘表字段中的汉字 上海
    新生活运动 上海
  • 原文地址:https://www.cnblogs.com/crushgirl/p/14324940.html
Copyright © 2020-2023  润新知