Skip to content

Commit d46971e

Browse files
committed
Merge tag 'input-for-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: - support for Acer NGR 200 Controller added to xpad driver - xpad driver will no longer log errors about URBs at sudden disconnect - a fix for potential NULL dereference in cs40l50-vibra driver - several drivers have been switched to using scnprintf() to suppress warnings about potential output truncation * tag 'input-for-v6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: cs40l50-vibra - fix potential NULL dereference in cs40l50_upload_owt() Input: alps - use scnprintf() to suppress truncation warning Input: iqs7222 - explicitly define number of external channels Input: xpad - support Acer NGR 200 Controller Input: xpad - return errors from xpad_try_sending_next_out_packet() up Input: xpad - adjust error handling for disconnect Input: apple_z2 - drop default ARCH_APPLE in Kconfig Input: Fully open-code compatible for grepping dt-bindings: HID: i2c-hid: elan: Introduce Elan eKTH8D18 Input: psmouse - switch to use scnprintf() to suppress truncation warning Input: lifebook - switch to use scnprintf() to suppress truncation warning Input: alps - switch to use scnprintf() to suppress truncation warning Input: atkbd - switch to use scnprintf() to suppress truncation warning Input: fsia6b - suppress buffer truncation warning for phys Input: iqs626a - replace snprintf() with scnprintf()
2 parents 42bb9b6 + 4cf6584 commit d46971e

File tree

13 files changed

+35
-26
lines changed

13 files changed

+35
-26
lines changed

Documentation/devicetree/bindings/input/elan,ekth6915.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
$id: http://devicetree.org/schemas/input/elan,ekth6915.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: Elan eKTH6915 touchscreen controller
7+
title: Elan I2C-HID touchscreen controllers
88

99
maintainers:
1010
- Douglas Anderson <[email protected]>
1111

1212
description:
13-
Supports the Elan eKTH6915 touchscreen controller.
14-
This touchscreen controller uses the i2c-hid protocol with a reset GPIO.
13+
Supports the Elan eKTH6915 and other I2C-HID touchscreen controllers.
14+
These touchscreen controller use the i2c-hid protocol with a reset GPIO.
1515

1616
allOf:
1717
- $ref: /schemas/input/touchscreen/touchscreen.yaml#
@@ -23,12 +23,14 @@ properties:
2323
- enum:
2424
- elan,ekth5015m
2525
- const: elan,ekth6915
26+
- items:
27+
- const: elan,ekth8d18
28+
- const: elan,ekth6a12nay
2629
- enum:
2730
- elan,ekth6915
2831
- elan,ekth6a12nay
2932

30-
reg:
31-
const: 0x10
33+
reg: true
3234

3335
interrupts:
3436
maxItems: 1

drivers/input/joystick/fsia6b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int fsia6b_serio_connect(struct serio *serio, struct serio_driver *drv)
149149
}
150150
fsia6b->dev = input_dev;
151151

152-
snprintf(fsia6b->phys, sizeof(fsia6b->phys), "%s/input0", serio->phys);
152+
scnprintf(fsia6b->phys, sizeof(fsia6b->phys), "%s/input0", serio->phys);
153153

154154
input_dev->name = DRIVER_DESC;
155155
input_dev->phys = fsia6b->phys;

drivers/input/joystick/xpad.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ static const struct xpad_device {
177177
{ 0x05fd, 0x107a, "InterAct 'PowerPad Pro' X-Box pad (Germany)", 0, XTYPE_XBOX },
178178
{ 0x05fe, 0x3030, "Chic Controller", 0, XTYPE_XBOX },
179179
{ 0x05fe, 0x3031, "Chic Controller", 0, XTYPE_XBOX },
180+
{ 0x0502, 0x1305, "Acer NGR200", 0, XTYPE_XBOX },
180181
{ 0x062a, 0x0020, "Logic3 Xbox GamePad", 0, XTYPE_XBOX },
181182
{ 0x062a, 0x0033, "Competition Pro Steering Wheel", 0, XTYPE_XBOX },
182183
{ 0x06a3, 0x0200, "Saitek Racing Wheel", 0, XTYPE_XBOX },
@@ -524,6 +525,7 @@ static const struct usb_device_id xpad_table[] = {
524525
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft Xbox 360 controllers */
525526
XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft Xbox One controllers */
526527
XPAD_XBOX360_VENDOR(0x046d), /* Logitech Xbox 360-style controllers */
528+
XPAD_XBOX360_VENDOR(0x0502), /* Acer Inc. Xbox 360 style controllers */
527529
XPAD_XBOX360_VENDOR(0x056e), /* Elecom JC-U3613M */
528530
XPAD_XBOX360_VENDOR(0x06a3), /* Saitek P3600 */
529531
XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz Xbox 360 controllers */
@@ -1344,11 +1346,12 @@ static int xpad_try_sending_next_out_packet(struct usb_xpad *xpad)
13441346
usb_anchor_urb(xpad->irq_out, &xpad->irq_out_anchor);
13451347
error = usb_submit_urb(xpad->irq_out, GFP_ATOMIC);
13461348
if (error) {
1347-
dev_err(&xpad->intf->dev,
1348-
"%s - usb_submit_urb failed with result %d\n",
1349-
__func__, error);
1349+
if (error != -ENODEV)
1350+
dev_err(&xpad->intf->dev,
1351+
"%s - usb_submit_urb failed with result %d\n",
1352+
__func__, error);
13501353
usb_unanchor_urb(xpad->irq_out);
1351-
return -EIO;
1354+
return error;
13521355
}
13531356

13541357
xpad->irq_out_active = true;

drivers/input/keyboard/atkbd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,8 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd)
11911191
"AT %s Set %d keyboard",
11921192
atkbd->translated ? "Translated" : "Raw", atkbd->set);
11931193

1194-
snprintf(atkbd->phys, sizeof(atkbd->phys),
1195-
"%s/input0", atkbd->ps2dev.serio->phys);
1194+
scnprintf(atkbd->phys, sizeof(atkbd->phys),
1195+
"%s/input0", atkbd->ps2dev.serio->phys);
11961196

11971197
input_dev->name = atkbd->name;
11981198
input_dev->phys = atkbd->phys;

drivers/input/misc/cs40l50-vibra.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ static int cs40l50_upload_owt(struct cs40l50_work *work_data)
238238
header.data_words = len / sizeof(u32);
239239

240240
new_owt_effect_data = kmalloc(sizeof(header) + len, GFP_KERNEL);
241+
if (!new_owt_effect_data)
242+
return -ENOMEM;
241243

242244
memcpy(new_owt_effect_data, &header, sizeof(header));
243245
memcpy(new_owt_effect_data + sizeof(header), work_data->custom_data, len);

drivers/input/misc/gpio-beeper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static int gpio_beeper_probe(struct platform_device *pdev)
9494

9595
#ifdef CONFIG_OF
9696
static const struct of_device_id gpio_beeper_of_match[] = {
97-
{ .compatible = BEEPER_MODNAME, },
97+
{ .compatible = "gpio-beeper", },
9898
{ }
9999
};
100100
MODULE_DEVICE_TABLE(of, gpio_beeper_of_match);

drivers/input/misc/iqs626a.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ static int iqs626_parse_trackpad(struct iqs626_private *iqs626,
771771
u8 *thresh = &sys_reg->tp_grp_reg.ch_reg_tp[i].thresh;
772772
char tc_name[10];
773773

774-
snprintf(tc_name, sizeof(tc_name), "channel-%d", i);
774+
scnprintf(tc_name, sizeof(tc_name), "channel-%d", i);
775775

776776
struct fwnode_handle *tc_node __free(fwnode_handle) =
777777
fwnode_get_named_child_node(ch_node, tc_name);

drivers/input/misc/iqs7222.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ struct iqs7222_dev_desc {
301301
int allow_offset;
302302
int event_offset;
303303
int comms_offset;
304+
int ext_chan;
304305
bool legacy_gesture;
305306
struct iqs7222_reg_grp_desc reg_grps[IQS7222_NUM_REG_GRPS];
306307
};
@@ -315,6 +316,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
315316
.allow_offset = 9,
316317
.event_offset = 10,
317318
.comms_offset = 12,
319+
.ext_chan = 10,
318320
.reg_grps = {
319321
[IQS7222_REG_GRP_STAT] = {
320322
.base = IQS7222_SYS_STATUS,
@@ -373,6 +375,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
373375
.allow_offset = 9,
374376
.event_offset = 10,
375377
.comms_offset = 12,
378+
.ext_chan = 10,
376379
.legacy_gesture = true,
377380
.reg_grps = {
378381
[IQS7222_REG_GRP_STAT] = {
@@ -2244,7 +2247,7 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222,
22442247
const struct iqs7222_dev_desc *dev_desc = iqs7222->dev_desc;
22452248
struct i2c_client *client = iqs7222->client;
22462249
int num_chan = dev_desc->reg_grps[IQS7222_REG_GRP_CHAN].num_row;
2247-
int ext_chan = rounddown(num_chan, 10);
2250+
int ext_chan = dev_desc->ext_chan ? : num_chan;
22482251
int error, i;
22492252
u16 *chan_setup = iqs7222->chan_setup[chan_index];
22502253
u16 *sys_setup = iqs7222->sys_setup;
@@ -2445,7 +2448,7 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222,
24452448
const struct iqs7222_dev_desc *dev_desc = iqs7222->dev_desc;
24462449
struct i2c_client *client = iqs7222->client;
24472450
int num_chan = dev_desc->reg_grps[IQS7222_REG_GRP_CHAN].num_row;
2448-
int ext_chan = rounddown(num_chan, 10);
2451+
int ext_chan = dev_desc->ext_chan ? : num_chan;
24492452
int count, error, reg_offset, i;
24502453
u16 *event_mask = &iqs7222->sys_setup[dev_desc->event_offset];
24512454
u16 *sldr_setup = iqs7222->sldr_setup[sldr_index];

drivers/input/mouse/alps.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,9 +1408,9 @@ static int alps_do_register_bare_ps2_mouse(struct alps_data *priv)
14081408
return -ENOMEM;
14091409
}
14101410

1411-
snprintf(priv->phys3, sizeof(priv->phys3), "%s/%s",
1412-
psmouse->ps2dev.serio->phys,
1413-
(priv->dev2 ? "input2" : "input1"));
1411+
scnprintf(priv->phys3, sizeof(priv->phys3), "%s/%s",
1412+
psmouse->ps2dev.serio->phys,
1413+
(priv->dev2 ? "input2" : "input1"));
14141414
dev3->phys = priv->phys3;
14151415

14161416
/*
@@ -3103,8 +3103,8 @@ int alps_init(struct psmouse *psmouse)
31033103
goto init_fail;
31043104
}
31053105

3106-
snprintf(priv->phys2, sizeof(priv->phys2), "%s/input1",
3107-
psmouse->ps2dev.serio->phys);
3106+
scnprintf(priv->phys2, sizeof(priv->phys2), "%s/input1",
3107+
psmouse->ps2dev.serio->phys);
31083108
dev2->phys = priv->phys2;
31093109

31103110
/*

drivers/input/mouse/lifebook.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ static int lifebook_create_relative_device(struct psmouse *psmouse)
279279
goto err_out;
280280

281281
priv->dev2 = dev2;
282-
snprintf(priv->phys, sizeof(priv->phys),
283-
"%s/input1", psmouse->ps2dev.serio->phys);
282+
scnprintf(priv->phys, sizeof(priv->phys),
283+
"%s/input1", psmouse->ps2dev.serio->phys);
284284

285285
dev2->phys = priv->phys;
286286
dev2->name = "LBPS/2 Fujitsu Lifebook Touchpad";

0 commit comments

Comments
 (0)