lkml.org 
[lkml]   [2012]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC 2/5] hid-multitouch: Prepare driver for new device ids
    Date
    Use a driver-specific device id macro for the id list.
    This patch does not contain any functional changes.
    ---
    drivers/hid/hid-multitouch.c | 119 ++++++++++++++++++++++--------------------
    1 file changed, 61 insertions(+), 58 deletions(-)

    diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
    index 24fc442..421b16c 100644
    --- a/drivers/hid/hid-multitouch.c
    +++ b/drivers/hid/hid-multitouch.c
    @@ -103,6 +103,9 @@ struct mt_device {

    #define MT_DEFAULT_MAXCONTACT 10

    +#define HID_USB_MT_DEVICE(v, p) \
    + HID_USB_DEVICE(v, p)
    +
    /*
    * these device-dependent functions determine what slot corresponds
    * to a valid contact that was just read.
    @@ -656,231 +659,231 @@ static const struct hid_device_id mt_devices[] = {

    /* 3M panels */
    { .driver_data = MT_CLS_3M,
    - HID_USB_DEVICE(USB_VENDOR_ID_3M,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_3M,
    USB_DEVICE_ID_3M1968) },
    { .driver_data = MT_CLS_3M,
    - HID_USB_DEVICE(USB_VENDOR_ID_3M,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_3M,
    USB_DEVICE_ID_3M2256) },
    { .driver_data = MT_CLS_3M,
    - HID_USB_DEVICE(USB_VENDOR_ID_3M,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_3M,
    USB_DEVICE_ID_3M3266) },

    /* ActionStar panels */
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_ACTIONSTAR,
    USB_DEVICE_ID_ACTIONSTAR_1011) },

    /* Atmel panels */
    { .driver_data = MT_CLS_SERIAL,
    - HID_USB_DEVICE(USB_VENDOR_ID_ATMEL,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_ATMEL,
    USB_DEVICE_ID_ATMEL_MULTITOUCH) },

    /* Cando panels */
    { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
    - HID_USB_DEVICE(USB_VENDOR_ID_CANDO,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_CANDO,
    USB_DEVICE_ID_CANDO_MULTI_TOUCH) },
    { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
    - HID_USB_DEVICE(USB_VENDOR_ID_CANDO,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_CANDO,
    USB_DEVICE_ID_CANDO_MULTI_TOUCH_10_1) },
    { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
    - HID_USB_DEVICE(USB_VENDOR_ID_CANDO,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_CANDO,
    USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6) },
    { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
    - HID_USB_DEVICE(USB_VENDOR_ID_CANDO,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_CANDO,
    USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) },

    /* Chunghwa Telecom touch panels */
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_CHUNGHWAT,
    USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) },

    /* CVTouch panels */
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_CVTOUCH,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_CVTOUCH,
    USB_DEVICE_ID_CVTOUCH_SCREEN) },

    /* Cypress panel */
    { .driver_data = MT_CLS_CYPRESS,
    - HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_CYPRESS,
    USB_DEVICE_ID_CYPRESS_TRUETOUCH) },

    /* eGalax devices (resistive) */
    { .driver_data = MT_CLS_EGALAX,
    - HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_DWAV,
    USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D) },
    { .driver_data = MT_CLS_EGALAX,
    - HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_DWAV,
    USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E) },

    /* eGalax devices (capacitive) */
    { .driver_data = MT_CLS_EGALAX,
    - HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_DWAV,
    USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) },
    { .driver_data = MT_CLS_EGALAX,
    - HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_DWAV,
    USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) },
    { .driver_data = MT_CLS_EGALAX,
    - HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_DWAV,
    USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) },
    { .driver_data = MT_CLS_EGALAX,
    - HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_DWAV,
    USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA) },
    { .driver_data = MT_CLS_EGALAX,
    - HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_DWAV,
    USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) },
    { .driver_data = MT_CLS_EGALAX_SERIAL,
    - HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_DWAV,
    USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) },

    /* Elo TouchSystems IntelliTouch Plus panel */
    { .driver_data = MT_CLS_DUAL_NSMU_CONTACTID,
    - HID_USB_DEVICE(USB_VENDOR_ID_ELO,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_ELO,
    USB_DEVICE_ID_ELO_TS2515) },

    /* GeneralTouch panel */
    { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
    - HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH,
    USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) },

    /* GoodTouch panels */
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_GOODTOUCH,
    USB_DEVICE_ID_GOODTOUCH_000f) },

    /* Hanvon panels */
    { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
    - HID_USB_DEVICE(USB_VENDOR_ID_HANVON_ALT,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_HANVON_ALT,
    USB_DEVICE_ID_HANVON_ALT_MULTITOUCH) },

    /* Ideacom panel */
    { .driver_data = MT_CLS_SERIAL,
    - HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_IDEACOM,
    USB_DEVICE_ID_IDEACOM_IDC6650) },

    /* Ilitek dual touch panel */
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_ILITEK,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_ILITEK,
    USB_DEVICE_ID_ILITEK_MULTITOUCH) },

    /* IRTOUCH panels */
    { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
    - HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
    USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },

    /* LG Display panels */
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_LG,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_LG,
    USB_DEVICE_ID_LG_MULTITOUCH) },

    /* Lumio panels */
    { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
    - HID_USB_DEVICE(USB_VENDOR_ID_LUMIO,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_LUMIO,
    USB_DEVICE_ID_CRYSTALTOUCH) },
    { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
    - HID_USB_DEVICE(USB_VENDOR_ID_LUMIO,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_LUMIO,
    USB_DEVICE_ID_CRYSTALTOUCH_DUAL) },

    /* MosArt panels */
    { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
    - HID_USB_DEVICE(USB_VENDOR_ID_ASUS,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_ASUS,
    USB_DEVICE_ID_ASUS_T91MT)},
    { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
    - HID_USB_DEVICE(USB_VENDOR_ID_ASUS,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_ASUS,
    USB_DEVICE_ID_ASUSTEK_MULTITOUCH_YFO) },
    { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
    - HID_USB_DEVICE(USB_VENDOR_ID_TURBOX,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_TURBOX,
    USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) },

    /* PenMount panels */
    { .driver_data = MT_CLS_CONFIDENCE,
    - HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_PENMOUNT,
    USB_DEVICE_ID_PENMOUNT_PCI) },

    /* PixArt optical touch screen */
    { .driver_data = MT_CLS_INRANGE_CONTACTNUMBER,
    - HID_USB_DEVICE(USB_VENDOR_ID_PIXART,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_PIXART,
    USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN) },
    { .driver_data = MT_CLS_INRANGE_CONTACTNUMBER,
    - HID_USB_DEVICE(USB_VENDOR_ID_PIXART,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_PIXART,
    USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN1) },
    { .driver_data = MT_CLS_INRANGE_CONTACTNUMBER,
    - HID_USB_DEVICE(USB_VENDOR_ID_PIXART,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_PIXART,
    USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2) },

    /* PixCir-based panels */
    { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
    - HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_HANVON,
    USB_DEVICE_ID_HANVON_MULTITOUCH) },
    { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
    - HID_USB_DEVICE(USB_VENDOR_ID_CANDO,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_CANDO,
    USB_DEVICE_ID_CANDO_PIXCIR_MULTI_TOUCH) },

    /* Quanta-based panels */
    { .driver_data = MT_CLS_CONFIDENCE_CONTACT_ID,
    - HID_USB_DEVICE(USB_VENDOR_ID_QUANTA,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_QUANTA,
    USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
    { .driver_data = MT_CLS_CONFIDENCE_CONTACT_ID,
    - HID_USB_DEVICE(USB_VENDOR_ID_QUANTA,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_QUANTA,
    USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001) },
    { .driver_data = MT_CLS_CONFIDENCE_CONTACT_ID,
    - HID_USB_DEVICE(USB_VENDOR_ID_QUANTA,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_QUANTA,
    USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008) },

    /* Stantum panels */
    { .driver_data = MT_CLS_CONFIDENCE,
    - HID_USB_DEVICE(USB_VENDOR_ID_STANTUM,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_STANTUM,
    USB_DEVICE_ID_MTP)},
    { .driver_data = MT_CLS_CONFIDENCE,
    - HID_USB_DEVICE(USB_VENDOR_ID_STANTUM_STM,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_STANTUM_STM,
    USB_DEVICE_ID_MTP_STM)},
    { .driver_data = MT_CLS_CONFIDENCE,
    - HID_USB_DEVICE(USB_VENDOR_ID_STANTUM_SITRONIX,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_STANTUM_SITRONIX,
    USB_DEVICE_ID_MTP_SITRONIX)},

    /* Touch International panels */
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_TOUCH_INTL,
    USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH) },

    /* Unitec panels */
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_UNITEC,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_UNITEC,
    USB_DEVICE_ID_UNITEC_USB_TOUCH_0709) },
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_UNITEC,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_UNITEC,
    USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) },
    /* XAT */
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_XAT,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_XAT,
    USB_DEVICE_ID_XAT_CSR) },

    /* Xiroku */
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_XIROKU,
    USB_DEVICE_ID_XIROKU_SPX) },
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_XIROKU,
    USB_DEVICE_ID_XIROKU_MPX) },
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_XIROKU,
    USB_DEVICE_ID_XIROKU_CSR) },
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_XIROKU,
    USB_DEVICE_ID_XIROKU_SPX1) },
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_XIROKU,
    USB_DEVICE_ID_XIROKU_MPX1) },
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_XIROKU,
    USB_DEVICE_ID_XIROKU_CSR1) },
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_XIROKU,
    USB_DEVICE_ID_XIROKU_SPX2) },
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_XIROKU,
    USB_DEVICE_ID_XIROKU_MPX2) },
    { .driver_data = MT_CLS_DEFAULT,
    - HID_USB_DEVICE(USB_VENDOR_ID_XIROKU,
    + HID_USB_MT_DEVICE(USB_VENDOR_ID_XIROKU,
    USB_DEVICE_ID_XIROKU_CSR2) },

    { }
    --
    1.7.9.5


    \
     
     \ /
      Last update: 2012-04-03 09:07    [W:0.034 / U:1.268 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site