10000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel… · codeguru85/linux@e941bc0 · GitHub
[go: up one dir, main page]

Skip to content

Commit e941bc0

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
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
2 parents 9e895ac + be66227 commit e941bc0

File tree

6 files changed

+27
-9
lines changed

6 files changed

+27
-9
lines changed

drivers/input/joystick/xpad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static const struct xpad_device {
137137
{ 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
138138
{ 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", 0, XTYPE_XBOX },
139139
{ 0x0738, 0x4716, "Mad Catz Wired Xbox 360 Controller", 0, XTYPE_XBOX360 },
140-
{ 0x0738, 0x4728, "Mad Catz Street Fighter IV FightPad", XTYPE_XBOX360 },
140+
{ 0x0738, 0x4728, "Mad Catz Street Fighter IV FightPad", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
141141
{ 0x0738, 0x4738, "Mad Catz Wired Xbox 360 Controller (SFIV)", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
142142
{ 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
143143
{ 0x0738, 0xbeef, "Mad Catz JOYTECH NEO SE Advanced GamePad", XTYPE_XBOX360 },

drivers/input/keyboard/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ config KEYBOARD_TEGRA
431431

432432
config KEYBOARD_OPENCORES
433433
tristate "OpenCores Keyboard Controller"
434+
depends on HAS_IOMEM
434435
help
435436
Say Y here if you want to use the OpenCores Keyboard Controller
436437
http://www.opencores.org/project,keyboardcontroller

drivers/input/serio/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ config SERIO_XILINX_XPS_PS2
205205

206206
config SERIO_ALTERA_PS2
207207
tristate "Altera UP PS/2 controller"
208+
depends on HAS_IOMEM
208209
help
209210
Say Y here if you have Altera University Program PS/2 ports.
210211

drivers/input/tablet/wacom_wac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
363363
case 0x140802: /* Intuos4/5 13HD/24HD Classic Pen */
364364
case 0x160802: /* Cintiq 13HD Pro Pen */
365365
case 0x180802: /* DTH2242 Pen */
366+
case 0x100802: /* Intuos4/5 13HD/24HD General Pen */
366367
wacom->tool[idx] = BTN_TOOL_PEN;
367368
break;
368369

@@ -401,6 +402,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
401402
case 0x10080c: /* Intuos4/5 13HD/24HD Art Pen Eraser */
402403
case 0x16080a: /* Cintiq 13HD Pro Pen Eraser */
403404
case 0x18080a: /* DTH2242 Eraser */
405+
case 0x10080a: /* Intuos4/5 13HD/24HD General Pen Eraser */
404406
wacom->tool[idx] = BTN_TOOL_RUBBER;
405407
break;
406408

drivers/input/touchscreen/cyttsp_core.c

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ static int ttsp_send_command(struct cyttsp *ts, u8 cmd)
116116
return ttsp_write_block_data(ts, CY_REG_BASE, sizeof(cmd), &cmd);
117117
}
118118

119+
static int cyttsp_handshake(struct cyttsp *ts)
120+
{
121+
if (ts->pdata->use_hndshk)
122+
return ttsp_send_command(ts,
123+
ts->xy_data.hst_mode ^ CY_HNDSHK_BIT);
124+
125+
return 0;
126+
}
127+
119128
static int cyttsp_load_bl_regs(struct cyttsp *ts)
120129
{
121130
memset(&ts->bl_data, 0, sizeof(ts->bl_data));
@@ -133,7 +142,7 @@ static int cyttsp_exit_bl_mode(struct cyttsp *ts)
133142
memcpy(bl_cmd, bl_command, sizeof(bl_command));
134143
if (ts->pdata->bl_keys)
135144
memcpy(&bl_cmd[sizeof(bl_command) - CY_NUM_BL_KEYS],
136-
ts->pdata->bl_keys, sizeof(bl_command));
145+
ts->pdata->bl_keys, CY_NUM_BL_KEYS);
137146

138147
error = ttsp_write_block_data(ts, CY_REG_BASE,
139148
sizeof(bl_cmd), bl_cmd);
@@ -167,6 +176,10 @@ static int cyttsp_set_operational_mode(struct cyttsp *ts)
167176
if (error)
168177
return error;
169178

179+
error = cyttsp_handshake(ts);
180+
if (error)
181+
return error;
182+
170183
return ts->xy_data.act_dist == CY_ACT_DIST_DFLT ? -EIO : 0;
171184
}
172185

@@ -188,6 +201,10 @@ static int cyttsp_set_sysinfo_mode(struct cyttsp *ts)
188201
if (error)
189202
return error;
190203

204+
error = cyttsp_handshake(ts);
205+
if (error)
206+
return error;
207+
191208
if (!ts->sysinfo_data.tts_verh && !ts->sysinfo_data.tts_verl)
192209
return -EIO;
193210

@@ -344,12 +361,9 @@ static irqreturn_t cyttsp_irq(int irq, void *handle)
344361
goto out;
345362

346363
/* provide flow control handshake */
347-
if (ts->pdata->use_hndshk) {
348-
error = ttsp_send_command(ts,
349-
ts->xy_data.hst_mode ^ CY_HNDSHK_BIT);
350-
if (error)
351-
goto out;
352-
}
364+
error = cyttsp_handshake(ts);
365+
if (error)
366+
goto out;
353367

354368
if (unlikely(ts->state == CY_IDLE_STATE))
355369
goto out;

drivers/input/touchscreen/cyttsp_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ struct cyttsp_xydata {
6767
/* TTSP System Information interface definition */
6868
struct cyttsp_sysinfo_data {
6969
u8 hst_mode;
70-
u8 mfg_cmd;
7170
u8 mfg_stat;
71+
u8 mfg_cmd;
7272
u8 cid[3];
7373
u8 tt_undef1;
7474
u8 uid[8];

0 commit comments

Comments
 (0)
0