projects/linux·commit 348e77b8

Merge tag 'input-for-v7.0-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

348e77b8 · Linus Torvalds <[email protected]> · 2026-02-15 08:24:19 -08:00

Pull input updates from Dmitry Torokhov:

 - support for FocalTech FT8112 added to i2c-hid driver

 - support for FocalTech FT3518 added to edt-ft5x06 driver

 - support for power buttons in TWL603x chips added to twl4030-pwrbutton
   driver

 - an update to gpio-decoder driver to make it usable on non-OF
   platforms and to clean up the code

 - an update to synaptics_i2c driver switching it to use managed
   resources and a fix to restarting polling after resume

 - an update to gpio-keys driver to fall back to getting IRQ from
   resources if not specified using other means

 - an update to ili210x driver to support polling mode

 - a number of input drivers switched to scnprintf() to suppress
   truncation warnings

 - a number of updates and conversions of device tree bindings to yaml
   format

 - fixes to spelling in comments and messages in several drivers

 - other assorted fixups

* tag 'input-for-v7.0-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits)
  dt-bindings: input: qcom,pm8941-pwrkey: Document PMM8654AU
  dt-bindings: input: touchscreen: imagis: allow linux,keycodes for ist3038
  Input: apbps2 - fix comment style and typos
  Input: gpio_keys - fall back to platform_get_irq() for interrupt-only keys
  Input: novatek-nvt-ts - drop wake_type check
  dt-bindings: input: touchscreen: tsc2007: document '#io-channel-cells'
  Input: ili210x - add support for polling mode
  dt-bindings: touchscreen: trivial-touch: Drop 'interrupts' requirement for old Ilitek
  Input: appletouch - fix potential race between resume and open
  HID: i2c-hid: Add FocalTech FT8112
  dt-bindings: input: i2c-hid: Introduce FocalTech FT8112
  Input: synaptics_i2c - switch to using managed resources
  Input: synaptics_i2c - guard polling restart in resume
  Input: gpio_decoder - don't use "proxy" headers
  Input: gpio_decoder - make use of the macros from bits.h
  Input: gpio_decoder - replace custom loop by gpiod_get_array_value_cansleep()
  Input: gpio_decoder - unify messages with help of dev_err_probe()
  Input: gpio_decoder - make use of device properties
  Input: serio - complete sizeof(*pointer) conversions
  Input: wdt87xx_i2c - switch to use dev_err_probe()
  ...
Commit
348e77b8145676184fb49063d5543e054fd74909
Parents
13c916af · 273a171d

Merge commit. Changes below are compared with the first parent: 13c916af.

Changes

50 files changed · +518 −512

FileStatusAddDelContent
Documentation/devicetree/bindings/goldfish/events.txtdeleted+0−17View before deletion
Documentation/devicetree/bindings/input/focaltech,ft8112.yamladded+66−0View file
Documentation/devicetree/bindings/input/google,goldfish-events-keypad.yamladded+41−0View file
Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yamlmodified+12−5View file
Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yamlmodified+1−0View file
Documentation/devicetree/bindings/input/touchscreen/ilitek,ili210x.yamladded+51−0View file
Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yamlmodified+3−1View file
Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yamlmodified+7−3View file
Documentation/devicetree/bindings/input/touchscreen/ti,tsc2007.yamlmodified+3−0View file
Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yamlmodified+0−4View file
MAINTAINERSmodified+1−1View file
drivers/hid/i2c-hid/i2c-hid-of-elan.cmodified+8−0View file
drivers/input/keyboard/cros_ec_keyb.cmodified+2−1View file
drivers/input/keyboard/gpio_keys.cmodified+13−6View file
drivers/input/keyboard/omap4-keypad.cmodified+0−4View file
drivers/input/misc/cs40l50-vibra.cmodified+0−4View file
drivers/input/misc/gpio_decoder.cmodified+34−40View file
drivers/input/misc/palmas-pwrbutton.cmodified+1−1View file
drivers/input/misc/pf1550-onkey.cmodified+1−1View file
drivers/input/misc/twl4030-pwrbutton.cmodified+58−9View file
drivers/input/mouse/appletouch.cmodified+4−5View file
drivers/input/mouse/byd.cmodified+2−4View file
drivers/input/mouse/cyapa.cmodified+0−3View file
drivers/input/mouse/cyapa_gen5.cmodified+0−1View file
drivers/input/mouse/psmouse-smbus.cmodified+1−1View file
drivers/input/mouse/synaptics_i2c.cmodified+99−124View file
drivers/input/serio/altera_ps2.cmodified+1−1View file
drivers/input/serio/apbps2.cmodified+7−7View file
drivers/input/serio/arc_ps2.cmodified+1−2View file
drivers/input/serio/olpc_apsp.cmodified+1−1View file
drivers/input/touchscreen/dynapro.cmodified+2−2View file
drivers/input/touchscreen/edt-ft5x06.cmodified+6−0View file
drivers/input/touchscreen/egalax_ts_serial.cmodified+1−2View file
drivers/input/touchscreen/elo.cmodified+1−1View file
drivers/input/touchscreen/fujitsu_ts.cmodified+1−2View file
drivers/input/touchscreen/gunze.cmodified+1−1View file
drivers/input/touchscreen/hampshire.cmodified+2−2View file
drivers/input/touchscreen/ili210x.cmodified+60−36View file
drivers/input/touchscreen/ilitek_ts_i2c.cmodified+5−5View file
drivers/input/touchscreen/inexio.cmodified+1−1View file
drivers/input/touchscreen/mtouch.cmodified+1−1View file
drivers/input/touchscreen/novatek-nvt-ts.cmodified+0−5View file
drivers/input/touchscreen/penmount.cmodified+1−1View file
drivers/input/touchscreen/stmfts.cmodified+9−12View file
drivers/input/touchscreen/touchit213.cmodified+2−2View file
drivers/input/touchscreen/touchright.cmodified+1−1View file
drivers/input/touchscreen/touchwin.cmodified+1−1View file
drivers/input/touchscreen/tsc40.cmodified+1−1View file
drivers/input/touchscreen/wdt87xx_i2c.cmodified+4−10View file
include/linux/input/adp5589.hdeleted+0−180View before deletion

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/goldfish/events.txt

View before deletion
diff --git a/Documentation/devicetree/bindings/goldfish/events.txt b/Documentation/devicetree/bindings/goldfish/events.txt
deleted file mode 100644
index 5babf46..0000000
--- a/Documentation/devicetree/bindings/goldfish/events.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Android Goldfish Events Keypad
-
-Android goldfish events keypad device generated by android emulator.
-
-Required properties:
-
-- compatible : should contain "google,goldfish-events-keypad" to match emulator
-- reg : <registers mapping>
-- interrupts : <interrupt mapping>
-
-Example:
-
- goldfish-events@9040000 {
- compatible = "google,goldfish-events-keypad";
- reg = <0x9040000 0x1000>;
- interrupts = <0x5>;
- };

Documentation/devicetree/bindings/input/focaltech,ft8112.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/focaltech,ft8112.yaml b/Documentation/devicetree/bindings/input/focaltech,ft8112.yaml
new file mode 100644
index 0000000..197f30b
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/focaltech,ft8112.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/focaltech,ft8112.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: FocalTech FT8112 touchscreen controller
+
+maintainers:
+ - Daniel Peng <[email protected]>
+
+description:
+ Supports the FocalTech FT8112 touchscreen controller.
+ This touchscreen controller uses the i2c-hid protocol with a reset GPIO.
+
+allOf:
+ - $ref: /schemas/input/touchscreen/touchscreen.yaml#
+
+properties:
+ compatible:
+ enum:
+ - focaltech,ft8112
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ panel: true
+
+ reset-gpios:
+ maxItems: 1
+
+ vcc33-supply: true
+
+ vccio-supply: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - vcc33-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@38 {
+ compatible = "focaltech,ft8112";
+ reg = <0x38>;
+
+ interrupt-parent = <&pio>;
+ interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
+
+ reset-gpios = <&pio 126 GPIO_ACTIVE_LOW>;
+ vcc33-supply = <&pp3300_tchscr_x>;
+ };
+ };

Documentation/devicetree/bindings/input/google,goldfish-events-keypad.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/google,goldfish-events-keypad.yaml b/Documentation/devicetree/bindings/input/google,goldfish-events-keypad.yaml
new file mode 100644
index 0000000..4e3a010
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/google,goldfish-events-keypad.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/google,goldfish-events-keypad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Android Goldfish Events Keypad
+
+maintainers:
+ - Kuan-Wei Chiu <[email protected]>
+
+allOf:
+ - $ref: input.yaml#
+
+description:
+ Android goldfish events keypad device generated by android emulator.
+
+properties:
+ compatible:
+ const: google,goldfish-events-keypad
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ keypad@9040000 {
+ compatible = "google,goldfish-events-keypad";
+ reg = <0x9040000 0x1000>;
+ interrupts = <5>;
+ };

Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
index f978cf9..f2543d6 100644
--- a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
+++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
@@ -12,11 +12,18 @@ maintainers:
properties:
compatible:
- enum:
- - qcom,pm8941-pwrkey
- - qcom,pm8941-resin
- - qcom,pmk8350-pwrkey
- - qcom,pmk8350-resin
+ oneOf:
+ - enum:
+ - qcom,pm8941-pwrkey
+ - qcom,pm8941-resin
+ - qcom,pmk8350-pwrkey
+ - qcom,pmk8350-resin
+ - items:
+ - const: qcom,pmm8654au-pwrkey
+ - const: qcom,pmk8350-pwrkey
+ - items:
+ - const: qcom,pmm8654au-resin
+ - const: qcom,pmk8350-resin
interrupts:
maxItems: 1

Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
index 7d3edb5..6f90522 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
@@ -39,6 +39,7 @@ properties:
- edt,edt-ft5406
- edt,edt-ft5506
- evervision,ev-ft5726
+ - focaltech,ft3518
- focaltech,ft5426
- focaltech,ft5452
- focaltech,ft6236

Documentation/devicetree/bindings/input/touchscreen/ilitek,ili210x.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/touchscreen/ilitek,ili210x.yaml b/Documentation/devicetree/bindings/input/touchscreen/ilitek,ili210x.yaml
new file mode 100644
index 0000000..c47d775
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/ilitek,ili210x.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/ilitek,ili210x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ilitek ILI21xx/ILI251x V3/V6 touch screen controller with i2c interface
+
+maintainers:
+ - Frank Li <[email protected]>
+ - Marek Vasut <[email protected]>
+
+properties:
+ compatible:
+ enum:
+ - ilitek,ili210x
+ - ilitek,ili2117
+ - ilitek,ili2120
+ - ilitek,ili251x
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+
+ wakeup-source: true
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: touchscreen.yaml
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@41 {
+ compatible = "ilitek,ili2120";
+ reg = <0x41>;
+ };
+ };

Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
index 0ef7934..dfaffbc 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml
@@ -55,7 +55,9 @@ allOf:
properties:
compatible:
contains:
- const: imagis,ist3032c
+ enum:
+ - imagis,ist3032c
+ - imagis,ist3038
then:
properties:
linux,keycodes: false

Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml b/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
index e7ee7a0..978afaa 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml
@@ -14,9 +14,13 @@ allOf:
properties:
compatible:
- enum:
- - sitronix,st1232
- - sitronix,st1633
+ oneOf:
+ - enum:
+ - sitronix,st1232
+ - sitronix,st1633
+ - items:
+ - const: sitronix,st1624
+ - const: sitronix,st1633
reg:
maxItems: 1

Documentation/devicetree/bindings/input/touchscreen/ti,tsc2007.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/touchscreen/ti,tsc2007.yaml b/Documentation/devicetree/bindings/input/touchscreen/ti,tsc2007.yaml
index a595df3..d9cb53e 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/ti,tsc2007.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/ti,tsc2007.yaml
@@ -53,6 +53,9 @@ properties:
how much time to wait (in milliseconds) before reading again the
values from the tsc2007.
+ "#io-channel-cells":
+ const: 1
+
required:
- compatible
- reg

Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml b/Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml
index fa27c67..6441d21 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml
@@ -23,9 +23,6 @@ properties:
# Hynitron cstxxx series touchscreen controller
- hynitron,cst340
# Ilitek I2C Touchscreen Controller
- - ilitek,ili210x
- - ilitek,ili2117
- - ilitek,ili2120
- ilitek,ili2130
- ilitek,ili2131
- ilitek,ili2132
@@ -33,7 +30,6 @@ properties:
- ilitek,ili2322
- ilitek,ili2323
- ilitek,ili2326
- - ilitek,ili251x
- ilitek,ili2520
- ilitek,ili2521
# MAXI MAX11801 Resistive touch screen controller with i2c interface

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index e0e4d5e..9c439b6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11404,7 +11404,7 @@ HIMAX HX83112B TOUCHSCREEN SUPPORT
M: Job Noorman <[email protected]>
S: Maintained
-F: Documentation/devicetree/bindings/input/touchscreen/himax,hx83112b.yaml
+F: Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml
F: drivers/input/touchscreen/himax_hx83112b.c
HIMAX HX852X TOUCHSCREEN DRIVER

drivers/hid/i2c-hid/i2c-hid-of-elan.c

View file
diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
index 0215f21..b81fcc6 100644
--- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c
+++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
@@ -168,6 +168,13 @@ static const struct elan_i2c_hid_chip_data elan_ekth6a12nay_chip_data = {
.power_after_backlight = true,
};
+static const struct elan_i2c_hid_chip_data focaltech_ft8112_chip_data = {
+ .post_power_delay_ms = 10,
+ .post_gpio_reset_on_delay_ms = 150,
+ .hid_descriptor_address = 0x0001,
+ .main_supply_name = "vcc33",
+};
+
static const struct elan_i2c_hid_chip_data ilitek_ili9882t_chip_data = {
.post_power_delay_ms = 1,
.post_gpio_reset_on_delay_ms = 200,
@@ -191,6 +198,7 @@ static const struct elan_i2c_hid_chip_data ilitek_ili2901_chip_data = {
static const struct of_device_id elan_i2c_hid_of_match[] = {
{ .compatible = "elan,ekth6915", .data = &elan_ekth6915_chip_data },
{ .compatible = "elan,ekth6a12nay", .data = &elan_ekth6a12nay_chip_data },
+ { .compatible = "focaltech,ft8112", .data = &focaltech_ft8112_chip_data },
{ .compatible = "ilitek,ili9882t", .data = &ilitek_ili9882t_chip_data },
{ .compatible = "ilitek,ili2901", .data = &ilitek_ili2901_chip_data },
{ }

drivers/input/keyboard/cros_ec_keyb.c

View file
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 1c6b046..2822c59 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -269,7 +269,8 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
if (ckdev->ec->event_size != ckdev->cols) {
dev_err(ckdev->dev,
- "Discarded incomplete key matrix event.\n");
+ "Discarded key matrix event, unexpected length: %d != %d\n",
+ ckdev->ec->event_size, ckdev->cols);
return NOTIFY_OK;
}

drivers/input/keyboard/gpio_keys.c

View file
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index f9db86d..e196174 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -434,7 +434,7 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id)
ms_to_ktime(bdata->software_debounce),
HRTIMER_MODE_REL);
} else {
- mod_delayed_work(system_wq,
+ mod_delayed_work(system_dfl_wq,
&bdata->work,
msecs_to_jiffies(bdata->software_debounce));
}
@@ -616,12 +616,19 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
break;
}
} else {
- if (!button->irq) {
- dev_err(dev, "Found button without gpio or irq\n");
- return -EINVAL;
- }
+ if (button->irq) {
+ bdata->irq = button->irq;
+ } else {
+ irq = platform_get_irq_optional(pdev, idx);
+ if (irq < 0) {
+ error = irq;
+ return dev_err_probe(dev, error,
+ "Unable to determine IRQ# for button #%d",
+ idx);
+ }
- bdata->irq = button->irq;
+ bdata->irq = irq;
+ }
if (button->type && button->type != EV_KEY) {
dev_err(dev, "Only EV_KEY allowed for IRQ buttons.\n");

drivers/input/keyboard/omap4-keypad.c

View file
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index bffe89c..e783244 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -193,7 +193,6 @@ static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
- pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
return IRQ_HANDLED;
@@ -231,7 +230,6 @@ static int omap4_keypad_open(struct input_dev *input)
enable_irq(keypad_data->irq);
out:
- pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
return error;
@@ -265,7 +263,6 @@ static void omap4_keypad_close(struct input_dev *input)
enable_irq(keypad_data->irq);
clk_disable_unprepare(keypad_data->fck);
- pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
}
@@ -404,7 +401,6 @@ static int omap4_keypad_probe(struct platform_device *pdev)
omap4_keypad_stop(keypad_data);
}
- pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
if (error)
return error;

drivers/input/misc/cs40l50-vibra.c

View file
diff --git a/drivers/input/misc/cs40l50-vibra.c b/drivers/input/misc/cs40l50-vibra.c
index 7aa7d57..9041002 100644
--- a/drivers/input/misc/cs40l50-vibra.c
+++ b/drivers/input/misc/cs40l50-vibra.c
@@ -308,7 +308,6 @@ err_free:
list_add(&effect->list, &vib->effect_head);
}
err_pm:
- pm_runtime_mark_last_busy(vib->dev);
pm_runtime_put_autosuspend(vib->dev);
err_exit:
work_data->error = error;
@@ -368,7 +367,6 @@ static void cs40l50_start_worker(struct work_struct *work)
dev_err(vib->dev, "Effect to play not found\n");
}
- pm_runtime_mark_last_busy(vib->dev);
pm_runtime_put_autosuspend(vib->dev);
err_free:
kfree(work_data);
@@ -384,7 +382,6 @@ static void cs40l50_stop_worker(struct work_struct *work)
vib->dsp.write(vib->dev, vib->regmap, vib->dsp.stop_cmd);
- pm_runtime_mark_last_busy(vib->dev);
pm_runtime_put_autosuspend(vib->dev);
kfree(work_data);
@@ -456,7 +453,6 @@ static void cs40l50_erase_worker(struct work_struct *work)
list_del(&erase_effect->list);
kfree(erase_effect);
err_pm:
- pm_runtime_mark_last_busy(vib->dev);
pm_runtime_put_autosuspend(vib->dev);
err_exit:
work_data->error = error;

drivers/input/misc/gpio_decoder.c

View file
diff --git a/drivers/input/misc/gpio_decoder.c b/drivers/input/misc/gpio_decoder.c
index ee668eb..f0759dd 100644
--- a/drivers/input/misc/gpio_decoder.c
+++ b/drivers/input/misc/gpio_decoder.c
@@ -6,13 +6,18 @@
* encoded numeric value into an input event.
*/
-#include <linux/device.h>
+#include <linux/bitmap.h>
+#include <linux/dev_printk.h>
+#include <linux/device/devres.h>
+#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/input.h>
-#include <linux/kernel.h>
+#include <linux/minmax.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
+#include <linux/types.h>
struct gpio_decoder {
struct gpio_descs *input_gpios;
@@ -24,23 +29,18 @@ struct gpio_decoder {
static int gpio_decoder_get_gpios_state(struct gpio_decoder *decoder)
{
struct gpio_descs *gpios = decoder->input_gpios;
- unsigned int ret = 0;
- int i, val;
-
- for (i = 0; i < gpios->ndescs; i++) {
- val = gpiod_get_value_cansleep(gpios->desc[i]);
- if (val < 0) {
- dev_err(decoder->dev,
- "Error reading gpio %d: %d\n",
- desc_to_gpio(gpios->desc[i]), val);
- return val;
- }
-
- val = !!val;
- ret = (ret << 1) | val;
+ DECLARE_BITMAP(values, 32);
+ unsigned int size;
+ int err;
+
+ size = min(gpios->ndescs, 32U);
+ err = gpiod_get_array_value_cansleep(size, gpios->desc, gpios->info, values);
+ if (err) {
+ dev_err(decoder->dev, "Error reading GPIO: %d\n", err);
+ return err;
}
- return ret;
+ return bitmap_read(values, 0, size);
}
static void gpio_decoder_poll_gpios(struct input_dev *input)
@@ -61,7 +61,7 @@ static int gpio_decoder_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct gpio_decoder *decoder;
struct input_dev *input;
- u32 max;
+ u32 max;
int err;
decoder = devm_kzalloc(dev, sizeof(*decoder), GFP_KERNEL);
@@ -72,18 +72,18 @@ static int gpio_decoder_probe(struct platform_device *pdev)
device_property_read_u32(dev, "linux,axis", &decoder->axis);
decoder->input_gpios = devm_gpiod_get_array(dev, NULL, GPIOD_IN);
- if (IS_ERR(decoder->input_gpios)) {
- dev_err(dev, "unable to acquire input gpios\n");
- return PTR_ERR(decoder->input_gpios);
- }
+ if (IS_ERR(decoder->input_gpios))
+ return dev_err_probe(dev, PTR_ERR(decoder->input_gpios),
+ "unable to acquire input gpios\n");
- if (decoder->input_gpios->ndescs < 2) {
- dev_err(dev, "not enough gpios found\n");
- return -EINVAL;
- }
+ if (decoder->input_gpios->ndescs < 2)
+ return dev_err_probe(dev, -EINVAL, "not enough gpios found\n");
+
+ if (decoder->input_gpios->ndescs > 31)
+ return dev_err_probe(dev, -EINVAL, "too many gpios found\n");
if (device_property_read_u32(dev, "decoder-max-value", &max))
- max = (1U << decoder->input_gpios->ndescs) - 1;
+ max = BIT(decoder->input_gpios->ndescs) - 1;
input = devm_input_allocate_device(dev);
if (!input)
@@ -96,33 +96,27 @@ static int gpio_decoder_probe(struct platform_device *pdev)
input_set_abs_params(input, decoder->axis, 0, max, 0, 0);
err = input_setup_polling(input, gpio_decoder_poll_gpios);
- if (err) {
- dev_err(dev, "failed to set up polling\n");
- return err;
- }
+ if (err)
+ return dev_err_probe(dev, err, "failed to set up polling\n");
err = input_register_device(input);
- if (err) {
- dev_err(dev, "failed to register input device\n");
- return err;
- }
+ if (err)
+ return dev_err_probe(dev, err, "failed to register input device\n");
return 0;
}
-#ifdef CONFIG_OF
static const struct of_device_id gpio_decoder_of_match[] = {
{ .compatible = "gpio-decoder", },
- { },
+ { }
};
MODULE_DEVICE_TABLE(of, gpio_decoder_of_match);

This diff is incomplete. Download the complete patch.

drivers/input/misc/palmas-pwrbutton.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/pf1550-onkey.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/twl4030-pwrbutton.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/mouse/appletouch.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/mouse/byd.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/mouse/cyapa.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/mouse/cyapa_gen5.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/mouse/psmouse-smbus.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/mouse/synaptics_i2c.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/altera_ps2.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/apbps2.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/arc_ps2.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/olpc_apsp.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/dynapro.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/edt-ft5x06.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/egalax_ts_serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/elo.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/fujitsu_ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/gunze.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/hampshire.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ili210x.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ilitek_ts_i2c.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/inexio.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/mtouch.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/novatek-nvt-ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/penmount.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/stmfts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/touchit213.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/touchright.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/touchwin.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/tsc40.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/wdt87xx_i2c.c

View file

This diff is incomplete. Download the complete patch.

include/linux/input/adp5589.h

View before deletion

This diff is incomplete. Download the complete patch.