]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 24 Jun 2013 02:12:46 +0000 (16:12 -1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 24 Jun 2013 02:12:46 +0000 (16:12 -1000)
Pull input subsystem updates from Dmitry Torokhov:
 "A few small fixups for cyttsp, wacom and xpad drivers"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: xpad - fix for "Mad Catz Street Fighter IV FightPad" controllers
  Input: wacom - add a new stylus (0x100802) for Intuos5 and Cintiqs
  Input: add missing dependencies on CONFIG_HAS_IOMEM
  Input: cyttsp - fix swapped mfg_stat and mfg_cmd registers
  Input: cyttsp - add missing handshake
  Input: cyttsp - fix memcpy size param

drivers/input/joystick/xpad.c
drivers/input/keyboard/Kconfig
drivers/input/serio/Kconfig
drivers/input/tablet/wacom_wac.c
drivers/input/touchscreen/cyttsp_core.c
drivers/input/touchscreen/cyttsp_core.h

index d6cbfe9df21810efe9255415787af029525d1131..fa061d46527f91e7de8838930a75d863ac7d3f6a 100644 (file)
@@ -137,7 +137,7 @@ static const struct xpad_device {
        { 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
        { 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", 0, XTYPE_XBOX },
        { 0x0738, 0x4716, "Mad Catz Wired Xbox 360 Controller", 0, XTYPE_XBOX360 },
-       { 0x0738, 0x4728, "Mad Catz Street Fighter IV FightPad", XTYPE_XBOX360 },
+       { 0x0738, 0x4728, "Mad Catz Street Fighter IV FightPad", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
        { 0x0738, 0x4738, "Mad Catz Wired Xbox 360 Controller (SFIV)", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
        { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
        { 0x0738, 0xbeef, "Mad Catz JOYTECH NEO SE Advanced GamePad", XTYPE_XBOX360 },
index 62a2c0e4cc998774e1c12185b4f04369bbde4d28..7ac9c9818d5562c5d3970ec8e59f4df63ce2aba7 100644 (file)
@@ -431,6 +431,7 @@ config KEYBOARD_TEGRA
 
 config KEYBOARD_OPENCORES
        tristate "OpenCores Keyboard Controller"
+       depends on HAS_IOMEM
        help
          Say Y here if you want to use the OpenCores Keyboard Controller
          http://www.opencores.org/project,keyboardcontroller
index aebfe3ecb9451638b21714949caff6c9c381fbf8..1bda828f4b5546cda5820cec874e66277a01a6f6 100644 (file)
@@ -205,6 +205,7 @@ config SERIO_XILINX_XPS_PS2
 
 config SERIO_ALTERA_PS2
        tristate "Altera UP PS/2 controller"
+       depends on HAS_IOMEM
        help
          Say Y here if you have Altera University Program PS/2 ports.
 
index 518282da6d850b180d56572c0517b62424f12e19..384fbcd0cee0d1b65d402beaa0f4f418e22e0a50 100644 (file)
@@ -363,6 +363,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
                case 0x140802: /* Intuos4/5 13HD/24HD Classic Pen */
                case 0x160802: /* Cintiq 13HD Pro Pen */
                case 0x180802: /* DTH2242 Pen */
+               case 0x100802: /* Intuos4/5 13HD/24HD General Pen */
                        wacom->tool[idx] = BTN_TOOL_PEN;
                        break;
 
@@ -401,6 +402,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
                case 0x10080c: /* Intuos4/5 13HD/24HD Art Pen Eraser */
                case 0x16080a: /* Cintiq 13HD Pro Pen Eraser */
                case 0x18080a: /* DTH2242 Eraser */
+               case 0x10080a: /* Intuos4/5 13HD/24HD General Pen Eraser */
                        wacom->tool[idx] = BTN_TOOL_RUBBER;
                        break;
 
index 8e60437ac85b46569e57ae78f2bea455fd1b9ab5..ae89d2609ab0bd1a7e943cef3550ac0b992e18df 100644 (file)
@@ -116,6 +116,15 @@ static int ttsp_send_command(struct cyttsp *ts, u8 cmd)
        return ttsp_write_block_data(ts, CY_REG_BASE, sizeof(cmd), &cmd);
 }
 
+static int cyttsp_handshake(struct cyttsp *ts)
+{
+       if (ts->pdata->use_hndshk)
+               return ttsp_send_command(ts,
+                               ts->xy_data.hst_mode ^ CY_HNDSHK_BIT);
+
+       return 0;
+}
+
 static int cyttsp_load_bl_regs(struct cyttsp *ts)
 {
        memset(&ts->bl_data, 0, sizeof(ts->bl_data));
@@ -133,7 +142,7 @@ static int cyttsp_exit_bl_mode(struct cyttsp *ts)
        memcpy(bl_cmd, bl_command, sizeof(bl_command));
        if (ts->pdata->bl_keys)
                memcpy(&bl_cmd[sizeof(bl_command) - CY_NUM_BL_KEYS],
-                       ts->pdata->bl_keys, sizeof(bl_command));
+                       ts->pdata->bl_keys, CY_NUM_BL_KEYS);
 
        error = ttsp_write_block_data(ts, CY_REG_BASE,
                                      sizeof(bl_cmd), bl_cmd);
@@ -167,6 +176,10 @@ static int cyttsp_set_operational_mode(struct cyttsp *ts)
        if (error)
                return error;
 
+       error = cyttsp_handshake(ts);
+       if (error)
+               return error;
+
        return ts->xy_data.act_dist == CY_ACT_DIST_DFLT ? -EIO : 0;
 }
 
@@ -188,6 +201,10 @@ static int cyttsp_set_sysinfo_mode(struct cyttsp *ts)
        if (error)
                return error;
 
+       error = cyttsp_handshake(ts);
+       if (error)
+               return error;
+
        if (!ts->sysinfo_data.tts_verh && !ts->sysinfo_data.tts_verl)
                return -EIO;
 
@@ -344,12 +361,9 @@ static irqreturn_t cyttsp_irq(int irq, void *handle)
                goto out;
 
        /* provide flow control handshake */
-       if (ts->pdata->use_hndshk) {
-               error = ttsp_send_command(ts,
-                               ts->xy_data.hst_mode ^ CY_HNDSHK_BIT);
-               if (error)
-                       goto out;
-       }
+       error = cyttsp_handshake(ts);
+       if (error)
+               goto out;
 
        if (unlikely(ts->state == CY_IDLE_STATE))
                goto out;
index 1aa3c6967e70fb63610849f578f3afe08d0ac145..f1ebde369f8696d84ed977b28269841009bc54b1 100644 (file)
@@ -67,8 +67,8 @@ struct cyttsp_xydata {
 /* TTSP System Information interface definition */
 struct cyttsp_sysinfo_data {
        u8 hst_mode;
-       u8 mfg_cmd;
        u8 mfg_stat;
+       u8 mfg_cmd;
        u8 cid[3];
        u8 tt_undef1;
        u8 uid[8];