Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - an update to Elan touchpad controller driver supporting newer ICs
   with enhanced precision reports and a new firmware update process

 - an update to EXC3000 touch controller supporting additional parts

 - assorted driver fixups

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (27 commits)
  Input: exc3000 - add support to query model and fw_version
  Input: exc3000 - add reset gpio support
  Input: exc3000 - add EXC80H60 and EXC80H84 support
  dt-bindings: touchscreen: Convert EETI EXC3000 touchscreen to json-schema
  Input: sentelic - fix error return when fsp_reg_write fails
  Input: alps - remove redundant assignment to variable ret
  Input: ims-pcu - return error code rather than -ENOMEM
  Input: elan_i2c - add ic type 0x15
  Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary
  Input: uinput - fix typo in function name documentation
  Input: ati_remote2 - add missing newlines when printing module parameters
  Input: psmouse - add a newline when printing 'proto' by sysfs
  Input: synaptics-rmi4 - drop a duplicated word
  Input: elan_i2c - add support for high resolution reports
  Input: elan_i2c - do not constantly re-query pattern ID
  Input: elan_i2c - add firmware update info for ICs 0x11, 0x13, 0x14
  Input: elan_i2c - handle firmware updated on newer ICs
  Input: elan_i2c - add support for different firmware page sizes
  Input: elan_i2c - fix detecting IAP version on older controllers
  Input: elan_i2c - handle devices with patterns above 1
  ...
  • Loading branch information
Linus Torvalds committed Aug 10, 2020
2 parents b7b8e36 + 9e82380 commit 4bcf69e
Show file tree
Hide file tree
Showing 47 changed files with 718 additions and 265 deletions.
15 changes: 15 additions & 0 deletions Documentation/ABI/testing/sysfs-driver-input-exc3000
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
What: /sys/bus/i2c/devices/xxx/fw_version
Date: Aug 2020
Contact: linux-input@vger.kernel.org
Description: Reports the firmware version provided by the touchscreen, for example "00_T6" on a EXC80H60

Access: Read
Valid values: Represented as string

What: /sys/bus/i2c/devices/xxx/model
Date: Aug 2020
Contact: linux-input@vger.kernel.org
Description: Reports the model identification provided by the touchscreen, for example "Orion_1320" on a EXC80H60

Access: Read
Valid values: Represented as string
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/eeti,exc3000.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: EETI EXC3000 series touchscreen controller

maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>

allOf:
- $ref: touchscreen.yaml#

properties:
compatible:
enum:
- eeti,exc3000
- eeti,exc80h60
- eeti,exc80h84
reg:
const: 0x2a
interrupts:
maxItems: 1
reset-gpios:
maxItems: 1
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-inverted-x: true
touchscreen-inverted-y: true
touchscreen-swapped-x-y: true

required:
- compatible
- reg
- interrupts
- touchscreen-size-x
- touchscreen-size-y

additionalProperties: false

examples:
- |
#include "dt-bindings/interrupt-controller/irq.h"
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@2a {
compatible = "eeti,exc3000";
reg = <0x2a>;
interrupt-parent = <&gpio1>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
touchscreen-size-x = <4096>;
touchscreen-size-y = <4096>;
touchscreen-inverted-x;
touchscreen-swapped-x-y;
};
};
26 changes: 0 additions & 26 deletions Documentation/devicetree/bindings/input/touchscreen/exc3000.txt

This file was deleted.

6 changes: 3 additions & 3 deletions Documentation/input/uinput.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ the sake of simplicity.
/*
* Give userspace some time to read the events before we destroy the
* device with UI_DEV_DESTOY.
* device with UI_DEV_DESTROY.
*/
sleep(1);
Expand Down Expand Up @@ -164,7 +164,7 @@ mouse.
/*
* Give userspace some time to read the events before we destroy the
* device with UI_DEV_DESTOY.
* device with UI_DEV_DESTROY.
*/
sleep(1);
Expand Down Expand Up @@ -233,7 +233,7 @@ but interact with uinput via ioctl calls, or use libevdev.
/*
* Give userspace some time to read the events before we destroy the
* device with UI_DEV_DESTOY.
* device with UI_DEV_DESTROY.
*/
sleep(1);
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/input-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static void copy_abs(struct input_dev *dev, unsigned int dst, unsigned int src)
if (dev->absinfo && test_bit(src, dev->absbit)) {
dev->absinfo[dst] = dev->absinfo[src];
dev->absinfo[dst].fuzz = 0;
dev->absbit[BIT_WORD(dst)] |= BIT_MASK(dst);
__set_bit(dst, dev->absbit);
}
}

Expand Down
10 changes: 5 additions & 5 deletions drivers/input/joystick/db9.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static unsigned char db9_saturn_read_packet(struct parport *port, unsigned char
db9_saturn_write_sub(port, type, 3, powered, 0);
return data[0] = 0xe3;
}
/* fall through */
fallthrough;
default:
return data[0];
}
Expand All @@ -267,14 +267,14 @@ static int db9_saturn_report(unsigned char id, unsigned char data[60], struct in
switch (data[j]) {
case 0x16: /* multi controller (analog 4 axis) */
input_report_abs(dev, db9_abs[5], data[j + 6]);
/* fall through */
fallthrough;
case 0x15: /* mission stick (analog 3 axis) */
input_report_abs(dev, db9_abs[3], data[j + 4]);
input_report_abs(dev, db9_abs[4], data[j + 5]);
/* fall through */
fallthrough;
case 0x13: /* racing controller (analog 1 axis) */
input_report_abs(dev, db9_abs[2], data[j + 3]);
/* fall through */
fallthrough;
case 0x34: /* saturn keyboard (udlr ZXC ASD QE Esc) */
case 0x02: /* digital pad (digital 2 axis + buttons) */
input_report_abs(dev, db9_abs[0], !(data[j + 1] & 128) - !(data[j + 1] & 64));
Expand Down Expand Up @@ -368,7 +368,7 @@ static void db9_timer(struct timer_list *t)
input_report_abs(dev2, ABS_X, (data & DB9_RIGHT ? 0 : 1) - (data & DB9_LEFT ? 0 : 1));
input_report_abs(dev2, ABS_Y, (data & DB9_DOWN ? 0 : 1) - (data & DB9_UP ? 0 : 1));
input_report_key(dev2, BTN_TRIGGER, ~data & DB9_FIRE1);
/* fall through */
fallthrough;

case DB9_MULTI_0802:

Expand Down
10 changes: 6 additions & 4 deletions drivers/input/joystick/gamecon.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ static void gc_multi_process_packet(struct gc *gc)
switch (pad->type) {
case GC_MULTI2:
input_report_key(dev, BTN_THUMB, s & data[5]);
/* fall through */
fallthrough;

case GC_MULTI:
input_report_abs(dev, ABS_X,
Expand Down Expand Up @@ -638,7 +638,7 @@ static void gc_psx_report_one(struct gc_pad *pad, unsigned char psx_type,

input_report_key(dev, BTN_THUMBL, ~data[0] & 0x04);
input_report_key(dev, BTN_THUMBR, ~data[0] & 0x02);
/* fall through */
fallthrough;

case GC_PSX_NEGCON:
case GC_PSX_ANALOG:
Expand Down Expand Up @@ -872,15 +872,17 @@ static int gc_setup_pad(struct gc *gc, int idx, int pad_type)
case GC_SNES:
for (i = 4; i < 8; i++)
input_set_capability(input_dev, EV_KEY, gc_snes_btn[i]);
/* fall through */
fallthrough;

case GC_NES:
for (i = 0; i < 4; i++)
input_set_capability(input_dev, EV_KEY, gc_snes_btn[i]);
break;

case GC_MULTI2:
input_set_capability(input_dev, EV_KEY, BTN_THUMB);
/* fall through */
fallthrough;

case GC_MULTI:
input_set_capability(input_dev, EV_KEY, BTN_TRIGGER);
/* fall through */
Expand Down
15 changes: 10 additions & 5 deletions drivers/input/joystick/sidewinder.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,16 +656,19 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)

switch (i * m) {
case 60:
sw->number++; /* fall through */
sw->number++;
fallthrough;
case 45: /* Ambiguous packet length */
if (j <= 40) { /* ID length less or eq 40 -> FSP */
case 43:
sw->type = SW_ID_FSP;
break;
}
sw->number++; /* fall through */
sw->number++;
fallthrough;
case 30:
sw->number++; /* fall through */
sw->number++;
fallthrough;
case 15:
sw->type = SW_ID_GP;
break;
Expand All @@ -681,9 +684,11 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)
sw->type = SW_ID_PP;
break;
case 66:
sw->bits = 3; /* fall through */
sw->bits = 3;
fallthrough;
case 198:
sw->length = 22; /* fall through */
sw->length = 22;
fallthrough;
case 64:
sw->type = SW_ID_3DP;
if (j == 160)
Expand Down
8 changes: 4 additions & 4 deletions drivers/input/joystick/spaceball.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ static irqreturn_t spaceball_interrupt(struct serio *serio,
break;
}
spaceball->escape = 0;
/* fall through */
fallthrough;
case 'M':
case 'Q':
case 'S':
if (spaceball->escape) {
spaceball->escape = 0;
data &= 0x1f;
}
/* fall through */
fallthrough;
default:
if (spaceball->escape)
spaceball->escape = 0;
Expand Down Expand Up @@ -220,13 +220,13 @@ static int spaceball_connect(struct serio *serio, struct serio_driver *drv)
input_dev->keybit[BIT_WORD(BTN_A)] |= BIT_MASK(BTN_A) |
BIT_MASK(BTN_B) | BIT_MASK(BTN_C) |
BIT_MASK(BTN_MODE);
/* fall through */
fallthrough;
default:
input_dev->keybit[BIT_WORD(BTN_0)] |= BIT_MASK(BTN_2) |
BIT_MASK(BTN_3) | BIT_MASK(BTN_4) |
BIT_MASK(BTN_5) | BIT_MASK(BTN_6) |
BIT_MASK(BTN_7) | BIT_MASK(BTN_8);
/* fall through */
fallthrough;
case SPACEBALL_3003C:
input_dev->keybit[BIT_WORD(BTN_0)] |= BIT_MASK(BTN_1) |
BIT_MASK(BTN_8);
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/keyboard/adp5589-keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ static int adp5589_probe(struct i2c_client *client,
switch (id->driver_data) {
case ADP5585_02:
kpad->support_row5 = true;
/* fall through */
fallthrough;
case ADP5585_01:
kpad->is_adp5585 = true;
kpad->var = &const_adp5585;
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/keyboard/atkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ static int atkbd_connect(struct serio *serio, struct serio_driver *drv)

case SERIO_8042_XL:
atkbd->translated = true;
/* Fall through */
fallthrough;

case SERIO_8042:
if (serio->write)
Expand Down
1 change: 0 additions & 1 deletion drivers/input/keyboard/gpio_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
IRQ_TYPE_EDGE_RISING : IRQ_TYPE_EDGE_FALLING;
break;
case EV_ACT_ANY:
/* fall through */
default:
/*
* For other cases, we are OK letting suspend/resume
Expand Down
4 changes: 2 additions & 2 deletions drivers/input/misc/ati_remote2.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static int ati_remote2_get_channel_mask(char *buffer,
{
pr_debug("%s()\n", __func__);

return sprintf(buffer, "0x%04x", *(unsigned int *)kp->arg);
return sprintf(buffer, "0x%04x\n", *(unsigned int *)kp->arg);
}

static int ati_remote2_set_mode_mask(const char *val,
Expand All @@ -84,7 +84,7 @@ static int ati_remote2_get_mode_mask(char *buffer,
{
pr_debug("%s()\n", __func__);

return sprintf(buffer, "0x%02x", *(unsigned int *)kp->arg);
return sprintf(buffer, "0x%02x\n", *(unsigned int *)kp->arg);
}

static unsigned int channel_mask = ATI_REMOTE2_MAX_CHANNEL_MASK;
Expand Down
8 changes: 2 additions & 6 deletions drivers/input/misc/cm109.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,8 @@ static const struct usb_device_id cm109_usb_table[] = {
static void cm109_usb_cleanup(struct cm109_dev *dev)
{
kfree(dev->ctl_req);
if (dev->ctl_data)
usb_free_coherent(dev->udev, USB_PKT_LEN,
dev->ctl_data, dev->ctl_dma);
if (dev->irq_data)
usb_free_coherent(dev->udev, USB_PKT_LEN,
dev->irq_data, dev->irq_dma);
usb_free_coherent(dev->udev, USB_PKT_LEN, dev->ctl_data, dev->ctl_dma);
usb_free_coherent(dev->udev, USB_PKT_LEN, dev->irq_data, dev->irq_dma);

usb_free_urb(dev->urb_irq); /* parameter validation in core/urb */
usb_free_urb(dev->urb_ctl); /* parameter validation in core/urb */
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/misc/ims-pcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ static int ims_pcu_setup_gamepad(struct ims_pcu *pcu)
err_free_mem:
input_free_device(input);
kfree(gamepad);
return -ENOMEM;
return error;
}

static void ims_pcu_destroy_gamepad(struct ims_pcu *pcu)
Expand Down
Loading

0 comments on commit 4bcf69e

Please sign in to comment.