Skip to content

Commit

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

Pull input updates from Dmitry Torokhov:

 - a new driver for Novatek touch controllers

 - a new driver for power button for NXP BBNSM

 - a skeleton KUnit tests for the input core

 - improvements to Xpad game controller driver to support more devices

 - improvements to edt-ft5x06, hideep and other drivers

* tag 'input-for-v6.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (42 commits)
  Revert "Input: xpad - fix support for some third-party controllers"
  dt-bindings: input: pwm-beeper: convert to dt schema
  Input: xpad - fix PowerA EnWired Controller guide button
  Input: xpad - add constants for GIP interface numbers
  Input: synaptics-rmi4 - fix function name in kerneldoc
  Input: raspberrypi-ts - fix refcount leak in rpi_ts_probe
  Input: edt-ft5x06 - select REGMAP_I2C
  Input: melfas_mip4 - report palm touches
  Input: cma3000_d0x - remove unneeded code
  Input: edt-ft5x06 - calculate points data length only once
  Input: edt-ft5x06 - unify the crc check
  Input: edt-ft5x06 - convert to use regmap API
  Input: edt-ft5x06 - don't print error messages with dev_dbg()
  Input: edt-ft5x06 - remove code duplication
  Input: edt-ft5x06 - don't recalculate the CRC
  Input: edt-ft5x06 - add spaces to ensure format specification
  Input: edt-ft5x06 - remove unnecessary blank lines
  Input: edt-ft5x06 - fix indentation
  Input: tsc2007 - enable cansleep pendown GPIO
  Input: Add KUnit tests for some of the input core helper functions
  ...
  • Loading branch information
torvalds committed May 2, 2023
2 parents c8c655c + 9a87ffc commit 865fdb0
Show file tree
Hide file tree
Showing 37 changed files with 1,067 additions and 324 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ properties:
when the keyboard has a custom design for the top row keys.
dependencies:
function-row-phsymap: [ 'linux,keymap' ]
function-row-physmap: [ 'linux,keymap' ]
google,needs-ghost-filter: [ 'linux,keymap' ]

required:
Expand Down
24 changes: 0 additions & 24 deletions Documentation/devicetree/bindings/input/pwm-beeper.txt

This file was deleted.

41 changes: 41 additions & 0 deletions Documentation/devicetree/bindings/input/pwm-beeper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/pwm-beeper.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: PWM beeper

maintainers:
- Sascha Hauer <[email protected]>

properties:
compatible:
const: pwm-beeper

pwms:
maxItems: 1

amp-supply:
description: an amplifier for the beeper

beeper-hz:
description: bell frequency in Hz
minimum: 10
maximum: 10000

required:
- compatible
- pwms

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>
beeper {
compatible = "pwm-beeper";
pwms = <&pwm0>;
amp-supply = <&beeper_amp>;
beeper-hz = <1000>;
};
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -14877,6 +14877,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/nolibc.git
F: tools/include/nolibc/
F: tools/testing/selftests/nolibc/

NOVATEK NVT-TS I2C TOUCHSCREEN DRIVER
M: Hans de Goede <[email protected]>
L: [email protected]
S: Maintained
F: drivers/input/touchscreen/novatek-nvt-ts.c

NSDEPS
M: Matthias Maennich <[email protected]>
S: Maintained
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-pxa/spitz.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/spi/pxa2xx_spi.h>
#include <linux/mtd/sharpsl.h>
#include <linux/mtd/physmap.h>
#include <linux/input-event-codes.h>
#include <linux/input/matrix_keypad.h>
#include <linux/regulator/machine.h>
#include <linux/io.h>
Expand Down
10 changes: 10 additions & 0 deletions drivers/input/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@ config INPUT_EVBUG
To compile this driver as a module, choose M here: the
module will be called evbug.

config INPUT_KUNIT_TEST
tristate "KUnit tests for Input" if !KUNIT_ALL_TESTS
depends on INPUT && KUNIT=y
default KUNIT_ALL_TESTS
help
Say Y here if you want to build the KUnit tests for the input
subsystem.

If in doubt, say "N".

config INPUT_APMPOWER
tristate "Input Power Event -> APM Bridge" if EXPERT
depends on INPUT && APM_EMULATION
Expand Down
1 change: 1 addition & 0 deletions drivers/input/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ obj-$(CONFIG_INPUT_JOYSTICK) += joystick/
obj-$(CONFIG_INPUT_TABLET) += tablet/
obj-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen/
obj-$(CONFIG_INPUT_MISC) += misc/
obj-$(CONFIG_INPUT_KUNIT_TEST) += tests/

obj-$(CONFIG_INPUT_APMPOWER) += apm-power.o

Expand Down
23 changes: 21 additions & 2 deletions drivers/input/joystick/xpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ static const struct xpad_device {
char *name;
u8 mapping;
u8 xtype;
u8 packet_type;
} xpad_device[] = {
{ 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 },
{ 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 },
Expand Down Expand Up @@ -475,6 +474,7 @@ static const struct usb_device_id xpad_table[] = {
XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */
XPAD_XBOXONE_VENDOR(0x0f0d), /* Hori Controllers */
XPAD_XBOX360_VENDOR(0x1038), /* SteelSeries Controllers */
XPAD_XBOXONE_VENDOR(0x10f5), /* Turtle Beach Controllers */
XPAD_XBOX360_VENDOR(0x11c9), /* Nacon GC100XF */
XPAD_XBOX360_VENDOR(0x1209), /* Ardwiino Controllers */
XPAD_XBOX360_VENDOR(0x12ab), /* X-Box 360 dance pads */
Expand All @@ -493,6 +493,7 @@ static const struct usb_device_id xpad_table[] = {
XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA Controllers */
XPAD_XBOX360_VENDOR(0x2563), /* OneXPlayer Gamepad */
XPAD_XBOX360_VENDOR(0x260d), /* Dareu H101 */
XPAD_XBOX360_VENDOR(0x2c22), /* Qanba Controllers */
XPAD_XBOX360_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller */
XPAD_XBOXONE_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller for Xbox */
XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Duke X-Box One pad */
Expand Down Expand Up @@ -559,6 +560,9 @@ struct xboxone_init_packet {
#define GIP_MOTOR_LT BIT(3)
#define GIP_MOTOR_ALL (GIP_MOTOR_R | GIP_MOTOR_L | GIP_MOTOR_RT | GIP_MOTOR_LT)

#define GIP_WIRED_INTF_DATA 0
#define GIP_WIRED_INTF_AUDIO 1

/*
* This packet is required for all Xbox One pads with 2015
* or later firmware installed (or present from the factory).
Expand Down Expand Up @@ -1392,6 +1396,21 @@ static int xpad_start_xbox_one(struct usb_xpad *xpad)
unsigned long flags;
int retval;

if (usb_ifnum_to_if(xpad->udev, GIP_WIRED_INTF_AUDIO)) {
/*
* Explicitly disable the audio interface. This is needed
* for some controllers, such as the PowerA Enhanced Wired
* Controller for Series X|S (0x20d6:0x200e) to report the
* guide button.
*/
retval = usb_set_interface(xpad->udev,
GIP_WIRED_INTF_AUDIO, 0);
if (retval)
dev_warn(&xpad->dev->dev,
"unable to disable audio interface: %d\n",
retval);
}

spin_lock_irqsave(&xpad->odata_lock, flags);

/*
Expand Down Expand Up @@ -2003,7 +2022,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
}

if (xpad->xtype == XTYPE_XBOXONE &&
intf->cur_altsetting->desc.bInterfaceNumber != 0) {
intf->cur_altsetting->desc.bInterfaceNumber != GIP_WIRED_INTF_DATA) {
/*
* The Xbox One controller lists three interfaces all with the
* same interface class, subclass and protocol. Differentiate by
Expand Down
3 changes: 3 additions & 0 deletions drivers/input/keyboard/gpio_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,9 @@ gpio_keys_get_devtree_pdata(struct device *dev)
&button->type))
button->type = EV_KEY;

fwnode_property_read_u32(child, "linux,input-value",
(u32 *)&button->value);

button->wakeup =
fwnode_property_read_bool(child, "wakeup-source") ||
/* legacy name */
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/keyboard/iqs62x-keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static int iqs62x_keys_remove(struct platform_device *pdev)
if (ret)
dev_err(&pdev->dev, "Failed to unregister notifier: %d\n", ret);

return ret;
return 0;
}

static struct platform_driver iqs62x_keys_platform_driver = {
Expand Down
6 changes: 2 additions & 4 deletions drivers/input/keyboard/matrix_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,12 @@ matrix_keypad_parse_dt(struct device *dev)
return ERR_PTR(-EINVAL);
}

if (of_get_property(np, "linux,no-autorepeat", NULL))
pdata->no_autorepeat = true;
pdata->no_autorepeat = of_property_read_bool(np, "linux,no-autorepeat");

pdata->wakeup = of_property_read_bool(np, "wakeup-source") ||
of_property_read_bool(np, "linux,wakeup"); /* legacy */

if (of_get_property(np, "gpio-activelow", NULL))
pdata->active_low = true;
pdata->active_low = of_property_read_bool(np, "gpio-activelow");

pdata->drive_inactive_cols =
of_property_read_bool(np, "drive-inactive-cols");
Expand Down
3 changes: 1 addition & 2 deletions drivers/input/keyboard/omap4-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,7 @@ static int omap4_keypad_parse_dt(struct device *dev,
if (err)
return err;

if (of_get_property(np, "linux,input-no-autorepeat", NULL))
keypad_data->no_autorepeat = true;
keypad_data->no_autorepeat = of_property_read_bool(np, "linux,input-no-autorepeat");

return 0;
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/input/keyboard/samsung-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ samsung_keypad_parse_dt(struct device *dev)
*keymap++ = KEY(row, col, key_code);
}

if (of_get_property(np, "linux,input-no-autorepeat", NULL))
pdata->no_autorepeat = true;
pdata->no_autorepeat = of_property_read_bool(np, "linux,input-no-autorepeat");

pdata->wakeup = of_property_read_bool(np, "wakeup-source") ||
/* legacy name */
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/keyboard/st-keyscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static struct platform_driver keyscan_device_driver = {
.driver = {
.name = "st-keyscan",
.pm = pm_sleep_ptr(&keyscan_dev_pm_ops),
.of_match_table = of_match_ptr(keyscan_of_match),
.of_match_table = keyscan_of_match,
}
};

Expand Down
3 changes: 1 addition & 2 deletions drivers/input/keyboard/tegra-kbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,7 @@ static int tegra_kbc_parse_dt(struct tegra_kbc *kbc)
if (!of_property_read_u32(np, "nvidia,repeat-delay-ms", &prop))
kbc->repeat_cnt = prop;

if (of_find_property(np, "nvidia,needs-ghost-filter", NULL))
kbc->use_ghost_filter = true;
kbc->use_ghost_filter = of_property_present(np, "nvidia,needs-ghost-filter");

if (of_property_read_bool(np, "wakeup-source") ||
of_property_read_bool(np, "nvidia,wakeup-source")) /* legacy */
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/keyboard/tm2-touchkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static struct i2c_driver tm2_touchkey_driver = {
.driver = {
.name = TM2_TOUCHKEY_DEV_NAME,
.pm = pm_sleep_ptr(&tm2_touchkey_pm_ops),
.of_match_table = of_match_ptr(tm2_touchkey_of_match),
.of_match_table = tm2_touchkey_of_match,
},
.probe_new = tm2_touchkey_probe,
.id_table = tm2_touchkey_id_table,
Expand Down
11 changes: 11 additions & 0 deletions drivers/input/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ config INPUT_ATMEL_CAPTOUCH
To compile this driver as a module, choose M here: the
module will be called atmel_captouch.

config INPUT_BBNSM_PWRKEY
tristate "NXP BBNSM Power Key Driver"
depends on ARCH_MXC || COMPILE_TEST
depends on OF
help
This is the bbnsm powerkey driver for the NXP i.MX application
processors.

To compile this driver as a module, choose M here; the
module will be called bbnsm_pwrkey.

config INPUT_BMA150
tristate "BMA150/SMB380 acceleration sensor support"
depends on I2C
Expand Down
1 change: 1 addition & 0 deletions drivers/input/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ obj-$(CONFIG_INPUT_ATC260X_ONKEY) += atc260x-onkey.o
obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o
obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o
obj-$(CONFIG_INPUT_ATMEL_CAPTOUCH) += atmel_captouch.o
obj-$(CONFIG_INPUT_BBNSM_PWRKEY) += nxp-bbnsm-pwrkey.o
obj-$(CONFIG_INPUT_BMA150) += bma150.o
obj-$(CONFIG_INPUT_CM109) += cm109.o
obj-$(CONFIG_INPUT_CMA3000) += cma3000_d0x.o
Expand Down
2 changes: 0 additions & 2 deletions drivers/input/misc/cma3000_d0x.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,6 @@ struct cma3000_accl_data *cma3000_init(struct device *dev, int irq,
input_dev->open = cma3000_open;
input_dev->close = cma3000_close;

__set_bit(EV_ABS, input_dev->evbit);

input_set_abs_params(input_dev, ABS_X,
-data->g_range, data->g_range, pdata->fuzz_x, 0);
input_set_abs_params(input_dev, ABS_Y,
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/misc/hp_sdc_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static inline int hp_sdc_rtc_read_ct(struct timespec64 *res) {
return 0;
}

static int hp_sdc_rtc_proc_show(struct seq_file *m, void *v)
static int __maybe_unused hp_sdc_rtc_proc_show(struct seq_file *m, void *v)
{
#define YN(bit) ("no")
#define NY(bit) ("yes")
Expand Down
Loading

0 comments on commit 865fdb0

Please sign in to comment.