Merge tag 'input-for-v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 3 Sep 2022 20:09:46 +0000 (13:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 3 Sep 2022 20:09:46 +0000 (13:09 -0700)
Pull input fixes from Dmitry Torokhov:

 - GT1158 ID added to Goodix touchscreen driver

 - Boeder Force Feedback Wheel USB added to iforce joystick driver

 - fixup for iforce driver to avoid hangups

 - fix autoloading of rk805-pwrkey driver.

* tag 'input-for-v6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: iforce - add support for Boeder Force Feedback Wheel
  Input: iforce - wake up after clearing IFORCE_XMIT_RUNNING flag
  Input: goodix - add compatible string for GT1158
  MAINTAINERS: add include/dt-bindings/input to INPUT DRIVERS
  Input: rk805-pwrkey - fix module autoloading
  Input: goodix - add support for GT1158
  dt-bindings: input: touchscreen: add compatible string for Goodix GT1158

Documentation/devicetree/bindings/input/touchscreen/goodix.yaml
Documentation/input/joydev/joystick.rst
MAINTAINERS
drivers/input/joystick/iforce/iforce-main.c
drivers/input/joystick/iforce/iforce-serio.c
drivers/input/joystick/iforce/iforce-usb.c
drivers/input/joystick/iforce/iforce.h
drivers/input/misc/rk805-pwrkey.c
drivers/input/touchscreen/goodix.c

index 93f2ce3130ae7e9c55806162d994a0414c3e94b4..19ac9da421df3356ef19ffaa7bbf53f5d4126e63 100644 (file)
@@ -16,6 +16,7 @@ properties:
   compatible:
     enum:
       - goodix,gt1151
+      - goodix,gt1158
       - goodix,gt5663
       - goodix,gt5688
       - goodix,gt911
index f615906a0821b86eca1debfbb6134cd9af737ecf..6d721396717a22ae2382906934e179ae21818855 100644 (file)
@@ -517,6 +517,7 @@ All I-Force devices are supported by the iforce module. This includes:
 * AVB Mag Turbo Force
 * AVB Top Shot Pegasus
 * AVB Top Shot Force Feedback Racing Wheel
+* Boeder Force Feedback Wheel
 * Logitech WingMan Force
 * Logitech WingMan Force Wheel
 * Guillemot Race Leader Force Feedback
index 1ba68f9d7a2f53a3c04d3fe7ffb5f43bcd1132c3..167d1344f54454097c342743345684fbb4f71c8d 100644 (file)
@@ -10032,6 +10032,7 @@ F:      Documentation/devicetree/bindings/input/
 F:     Documentation/devicetree/bindings/serio/
 F:     Documentation/input/
 F:     drivers/input/
+F:     include/dt-bindings/input/
 F:     include/linux/input.h
 F:     include/linux/input/
 F:     include/uapi/linux/input-event-codes.h
index b2a68bc9f0b4d6b77a439d35c57e7038c2e3ea8f..b86de1312512bd3a1b41ab795956bdbe317f5974 100644 (file)
@@ -50,6 +50,7 @@ static struct iforce_device iforce_device[] = {
        { 0x046d, 0xc291, "Logitech WingMan Formula Force",             btn_wheel, abs_wheel, ff_iforce },
        { 0x05ef, 0x020a, "AVB Top Shot Pegasus",                       btn_joystick_avb, abs_avb_pegasus, ff_iforce },
        { 0x05ef, 0x8884, "AVB Mag Turbo Force",                        btn_wheel, abs_wheel, ff_iforce },
+       { 0x05ef, 0x8886, "Boeder Force Feedback Wheel",                btn_wheel, abs_wheel, ff_iforce },
        { 0x05ef, 0x8888, "AVB Top Shot Force Feedback Racing Wheel",   btn_wheel, abs_wheel, ff_iforce }, //?
        { 0x061c, 0xc0a4, "ACT LABS Force RS",                          btn_wheel, abs_wheel, ff_iforce }, //?
        { 0x061c, 0xc084, "ACT LABS Force RS",                          btn_wheel, abs_wheel, ff_iforce },
index f95a81b9fac72ce2050cac3c27df2b65166c6f13..2380546d79782d5b5dee309a65818f7299b6bff4 100644 (file)
@@ -39,7 +39,7 @@ static void iforce_serio_xmit(struct iforce *iforce)
 
 again:
        if (iforce->xmit.head == iforce->xmit.tail) {
-               clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
+               iforce_clear_xmit_and_wake(iforce);
                spin_unlock_irqrestore(&iforce->xmit_lock, flags);
                return;
        }
@@ -64,7 +64,7 @@ again:
        if (test_and_clear_bit(IFORCE_XMIT_AGAIN, iforce->xmit_flags))
                goto again;
 
-       clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
+       iforce_clear_xmit_and_wake(iforce);
 
        spin_unlock_irqrestore(&iforce->xmit_lock, flags);
 }
@@ -169,7 +169,7 @@ static irqreturn_t iforce_serio_irq(struct serio *serio,
                        iforce_serio->cmd_response_len = iforce_serio->len;
 
                        /* Signal that command is done */
-                       wake_up(&iforce->wait);
+                       wake_up_all(&iforce->wait);
                } else if (likely(iforce->type)) {
                        iforce_process_packet(iforce, iforce_serio->id,
                                              iforce_serio->data_in,
index ea58805c480fa91c9d2dfdfec4d857200986021f..cba92bd590a8d83b4ded836059b5d882fb8751b2 100644 (file)
@@ -30,7 +30,7 @@ static void __iforce_usb_xmit(struct iforce *iforce)
        spin_lock_irqsave(&iforce->xmit_lock, flags);
 
        if (iforce->xmit.head == iforce->xmit.tail) {
-               clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
+               iforce_clear_xmit_and_wake(iforce);
                spin_unlock_irqrestore(&iforce->xmit_lock, flags);
                return;
        }
@@ -58,9 +58,9 @@ static void __iforce_usb_xmit(struct iforce *iforce)
        XMIT_INC(iforce->xmit.tail, n);
 
        if ( (n=usb_submit_urb(iforce_usb->out, GFP_ATOMIC)) ) {
-               clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
                dev_warn(&iforce_usb->intf->dev,
                         "usb_submit_urb failed %d\n", n);
+               iforce_clear_xmit_and_wake(iforce);
        }
 
        /* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended.
@@ -175,15 +175,15 @@ static void iforce_usb_out(struct urb *urb)
        struct iforce *iforce = &iforce_usb->iforce;
 
        if (urb->status) {
-               clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
                dev_dbg(&iforce_usb->intf->dev, "urb->status %d, exiting\n",
                        urb->status);
+               iforce_clear_xmit_and_wake(iforce);
                return;
        }
 
        __iforce_usb_xmit(iforce);
 
-       wake_up(&iforce->wait);
+       wake_up_all(&iforce->wait);
 }
 
 static int iforce_usb_probe(struct usb_interface *intf,
index 6aa761ebbdf7725e639ccd7cb974fb36bcd3ad45..9ccb9107ccbef09651a7980023cbd7f30067e0c0 100644 (file)
@@ -119,6 +119,12 @@ static inline int iforce_get_id_packet(struct iforce *iforce, u8 id,
                                         response_data, response_len);
 }
 
+static inline void iforce_clear_xmit_and_wake(struct iforce *iforce)
+{
+       clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
+       wake_up_all(&iforce->wait);
+}
+
 /* Public functions */
 /* iforce-main.c */
 int iforce_init_device(struct device *parent, u16 bustype,
index 3fb64dbda1a2189117a8ef6605b9602195feff57..76873aa005b419b0c1644b9eee7f886c389cabd7 100644 (file)
@@ -98,6 +98,7 @@ static struct platform_driver rk805_pwrkey_driver = {
 };
 module_platform_driver(rk805_pwrkey_driver);
 
+MODULE_ALIAS("platform:rk805-pwrkey");
 MODULE_AUTHOR("Joseph Chen <chenjh@rock-chips.com>");
 MODULE_DESCRIPTION("RK805 PMIC Power Key driver");
 MODULE_LICENSE("GPL");
index d016505fc081f31aaf6684dbca06c264dcc12d22..21c0dddbe41d4b8483095cef5b55da66e488b56a 100644 (file)
@@ -95,6 +95,7 @@ static const struct goodix_chip_data gt9x_chip_data = {
 
 static const struct goodix_chip_id goodix_chip_ids[] = {
        { .id = "1151", .data = &gt1x_chip_data },
+       { .id = "1158", .data = &gt1x_chip_data },
        { .id = "5663", .data = &gt1x_chip_data },
        { .id = "5688", .data = &gt1x_chip_data },
        { .id = "917S", .data = &gt1x_chip_data },
@@ -1508,6 +1509,7 @@ MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
 #ifdef CONFIG_OF
 static const struct of_device_id goodix_of_match[] = {
        { .compatible = "goodix,gt1151" },
+       { .compatible = "goodix,gt1158" },
        { .compatible = "goodix,gt5663" },
        { .compatible = "goodix,gt5688" },
        { .compatible = "goodix,gt911" },