omap3530上移植AMT 6000 系列USB型触摸屏+tslib(9)

#ifdef CONFIG_TOUCHSCREEN_USB_E2I
    [DEVTYPE_E2I] = {
        .min_xc        = 0x0,
        .max_xc        = 0x7fff,
        .min_yc        = 0x0,
        .max_yc        = 0x7fff,
        .rept_size    = 6,
        .init        = e2i_init,
        .read_data    = e2i_read_data,
    },
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_ZYTRONIC
    [DEVTYPE_ZYTRONIC] = {
        .min_xc        = 0x0,
        .max_xc        = 0x03ff,
        .min_yc        = 0x0,
        .max_yc        = 0x03ff,
        .rept_size    = 5,
        .read_data    = zytronic_read_data,
        .irq_always     = true,
    },
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
    [DEVTYPE_TC5UH] = {
        .min_xc        = 0x0,
        .max_xc        = 0x0fff,
        .min_yc        = 0x0,
        .max_yc        = 0x0fff,
        .rept_size    = 5,
        .read_data    = tc5uh_read_data,
    },
#endif

/***************************************************************
*add by willow 2011.4.13
*AMT 6000 PART
*/
#ifdef CONFIG_TOUCHSCREEN_USB_AMT_6000
    [DEVTYPE_AMT_6000] = {
        .min_xc        = 0x0,
        //.max_xc        = 0x0fff,
        .max_xc        = 0x0400,
        .min_yc        = 0x0,
        //.max_yc        = 0x0fff,
        .max_yc        = 0x0300,
        .rept_size    = 5,
        .read_data    = amt_6000_read_data,
    },
#endif
};


/*****************************************************************************
 * Generic Part
 */
static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch,
                                 unsigned char *pkt, int len)
{
    struct usbtouch_device_info *type = usbtouch->type;

if (!type->read_data(usbtouch, pkt))
            return;

input_report_key(usbtouch->input, BTN_TOUCH, usbtouch->touch);

if (swap_xy) {
        input_report_abs(usbtouch->input, ABS_X, usbtouch->y);
        input_report_abs(usbtouch->input, ABS_Y, usbtouch->x);
    } else {
        input_report_abs(usbtouch->input, ABS_X, usbtouch->x);
        input_report_abs(usbtouch->input, ABS_Y, usbtouch->y);
    }
    if (type->max_press)
        input_report_abs(usbtouch->input, ABS_PRESSURE, usbtouch->press);
    input_sync(usbtouch->input);
}

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwxzdz.html