]> Git Repo - J-linux.git/commitdiff
Merge branch 'next' into for-linus
authorDmitry Torokhov <[email protected]>
Thu, 23 May 2024 00:39:34 +0000 (17:39 -0700)
committerDmitry Torokhov <[email protected]>
Thu, 23 May 2024 00:39:34 +0000 (17:39 -0700)
Prepare input updates for 6.10 merge window.

1  2 
drivers/input/joystick/xpad.c
drivers/input/rmi4/rmi_smbus.c
drivers/input/touchscreen/goodix.c

index 6fadaddb2b908f0b0a2ed5cdd9c8382f08cacae8,a2a2d014de0f6ff54acd2cfcd9c732770ef5891a..70f0654c58b6a1e8dcf7bb4e63cdafb810003693
@@@ -131,12 -131,6 +131,12 @@@ static const struct xpad_device 
        { 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 },
        { 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 },
        { 0x03eb, 0xff02, "Wooting Two (Legacy)", 0, XTYPE_XBOX360 },
 +      { 0x03f0, 0x038D, "HyperX Clutch", 0, XTYPE_XBOX360 },                  /* wired */
 +      { 0x03f0, 0x048D, "HyperX Clutch", 0, XTYPE_XBOX360 },                  /* wireless */
 +      { 0x03f0, 0x0495, "HyperX Clutch Gladiate", 0, XTYPE_XBOXONE },
 +      { 0x03f0, 0x07A0, "HyperX Clutch Gladiate RGB", 0, XTYPE_XBOXONE },
 +      { 0x03f0, 0x08B6, "HyperX Clutch Gladiate", 0, XTYPE_XBOXONE },         /* v2 */
 +      { 0x03f0, 0x09B4, "HyperX Clutch Tanto", 0, XTYPE_XBOXONE },
        { 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX },
        { 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX },
        { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
        { 0x0738, 0xcb29, "Saitek Aviator Stick AV8R02", 0, XTYPE_XBOX360 },
        { 0x0738, 0xf738, "Super SFIV FightStick TE S", 0, XTYPE_XBOX360 },
        { 0x07ff, 0xffff, "Mad Catz GamePad", 0, XTYPE_XBOX360 },
 +      { 0x0b05, 0x1a38, "ASUS ROG RAIKIRI", 0, XTYPE_XBOXONE },
        { 0x0c12, 0x0005, "Intec wireless", 0, XTYPE_XBOX },
        { 0x0c12, 0x8801, "Nyko Xbox Controller", 0, XTYPE_XBOX },
        { 0x0c12, 0x8802, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
        { 0x1038, 0x1430, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 },
        { 0x1038, 0x1431, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 },
        { 0x11c9, 0x55f0, "Nacon GC-100XF", 0, XTYPE_XBOX360 },
 +      { 0x11ff, 0x0511, "PXN V900", 0, XTYPE_XBOX360 },
        { 0x1209, 0x2882, "Ardwiino Controller", 0, XTYPE_XBOX360 },
        { 0x12ab, 0x0004, "Honey Bee Xbox360 dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
        { 0x12ab, 0x0301, "PDP AFTERGLOW AX.1", 0, XTYPE_XBOX360 },
        { 0x146b, 0x0604, "Bigben Interactive DAIJA Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
        { 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
        { 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE },
 +      { 0x1532, 0x0a29, "Razer Wolverine V2", 0, XTYPE_XBOXONE },
        { 0x15e4, 0x3f00, "Power A Mini Pro Elite", 0, XTYPE_XBOX360 },
        { 0x15e4, 0x3f0a, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 },
        { 0x15e4, 0x3f10, "Batarang Xbox 360 controller", 0, XTYPE_XBOX360 },
        { 0x1689, 0xfd00, "Razer Onza Tournament Edition", 0, XTYPE_XBOX360 },
        { 0x1689, 0xfd01, "Razer Onza Classic Edition", 0, XTYPE_XBOX360 },
        { 0x1689, 0xfe00, "Razer Sabertooth", 0, XTYPE_XBOX360 },
 +      { 0x17ef, 0x6182, "Lenovo Legion Controller for Windows", 0, XTYPE_XBOX360 },
        { 0x1949, 0x041a, "Amazon Game Controller", 0, XTYPE_XBOX360 },
        { 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 },
        { 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
        { 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE },
        { 0x20d6, 0x2009, "PowerA Enhanced Wired Controller for Xbox Series X|S", 0, XTYPE_XBOXONE },
        { 0x20d6, 0x281f, "PowerA Wired Controller For Xbox 360", 0, XTYPE_XBOX360 },
+       { 0x2345, 0xe00b, "Machenike G5 Pro Controller", 0, XTYPE_XBOX360 },
        { 0x24c6, 0x5000, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
        { 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 },
        { 0x24c6, 0x5303, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 },
@@@ -476,8 -467,6 +477,8 @@@ static const struct usb_device_id xpad_
        { USB_INTERFACE_INFO('X', 'B', 0) },    /* Xbox USB-IF not-approved class */
        XPAD_XBOX360_VENDOR(0x0079),            /* GPD Win 2 controller */
        XPAD_XBOX360_VENDOR(0x03eb),            /* Wooting Keyboards (Legacy) */
 +      XPAD_XBOX360_VENDOR(0x03f0),            /* HP HyperX Xbox 360 controllers */
 +      XPAD_XBOXONE_VENDOR(0x03f0),            /* HP HyperX Xbox One controllers */
        XPAD_XBOX360_VENDOR(0x044f),            /* Thrustmaster Xbox 360 controllers */
        XPAD_XBOX360_VENDOR(0x045e),            /* Microsoft Xbox 360 controllers */
        XPAD_XBOXONE_VENDOR(0x045e),            /* Microsoft Xbox One controllers */
        { USB_DEVICE(0x0738, 0x4540) },         /* Mad Catz Beat Pad */
        XPAD_XBOXONE_VENDOR(0x0738),            /* Mad Catz FightStick TE 2 */
        XPAD_XBOX360_VENDOR(0x07ff),            /* Mad Catz Gamepad */
 +      XPAD_XBOXONE_VENDOR(0x0b05),            /* ASUS controllers */
        XPAD_XBOX360_VENDOR(0x0c12),            /* Zeroplus X-Box 360 controllers */
        XPAD_XBOX360_VENDOR(0x0e6f),            /* 0x0e6f Xbox 360 controllers */
        XPAD_XBOXONE_VENDOR(0x0e6f),            /* 0x0e6f Xbox One controllers */
        XPAD_XBOX360_VENDOR(0x1038),            /* SteelSeries controllers */
        XPAD_XBOXONE_VENDOR(0x10f5),            /* Turtle Beach Controllers */
        XPAD_XBOX360_VENDOR(0x11c9),            /* Nacon GC100XF */
 +      XPAD_XBOX360_VENDOR(0x11ff),            /* PXN V900 */
        XPAD_XBOX360_VENDOR(0x1209),            /* Ardwiino Controllers */
        XPAD_XBOX360_VENDOR(0x12ab),            /* Xbox 360 dance pads */
        XPAD_XBOX360_VENDOR(0x1430),            /* RedOctane Xbox 360 controllers */
        XPAD_XBOX360_VENDOR(0x15e4),            /* Numark Xbox 360 controllers */
        XPAD_XBOX360_VENDOR(0x162e),            /* Joytech Xbox 360 controllers */
        XPAD_XBOX360_VENDOR(0x1689),            /* Razer Onza */
 +      XPAD_XBOX360_VENDOR(0x17ef),            /* Lenovo */
        XPAD_XBOX360_VENDOR(0x1949),            /* Amazon controllers */
        XPAD_XBOX360_VENDOR(0x1bad),            /* Harmonix Rock Band guitar and drums */
        XPAD_XBOX360_VENDOR(0x20d6),            /* PowerA controllers */
        XPAD_XBOXONE_VENDOR(0x20d6),            /* PowerA controllers */
+       XPAD_XBOX360_VENDOR(0x2345),            /* Machenike Controllers */
        XPAD_XBOX360_VENDOR(0x24c6),            /* PowerA controllers */
        XPAD_XBOXONE_VENDOR(0x24c6),            /* PowerA controllers */
        XPAD_XBOX360_VENDOR(0x2563),            /* OneXPlayer Gamepad */
index b0b099b5528a8b78fbe60b0db9a79b2751a74edb,3fa5c195982411c4eca5600052a7cb672e22ec4d..f3d0b40721df0a69b914e84c20ca9c209b1173c9
@@@ -235,29 -235,12 +235,29 @@@ static void rmi_smb_clear_state(struct 
  
  static int rmi_smb_enable_smbus_mode(struct rmi_smb_xport *rmi_smb)
  {
 -      int retval;
 +      struct i2c_client *client = rmi_smb->client;
 +      int smbus_version;
 +
 +      /*
 +       * psmouse driver resets the controller, we only need to wait
 +       * to give the firmware chance to fully reinitialize.
 +       */
 +      if (rmi_smb->xport.pdata.reset_delay_ms)
 +              msleep(rmi_smb->xport.pdata.reset_delay_ms);
  
        /* we need to get the smbus version to activate the touchpad */
 -      retval = rmi_smb_get_version(rmi_smb);
 -      if (retval < 0)
 -              return retval;
 +      smbus_version = rmi_smb_get_version(rmi_smb);
 +      if (smbus_version < 0)
 +              return smbus_version;
 +
 +      rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d",
 +              smbus_version);
 +
 +      if (smbus_version != 2 && smbus_version != 3) {
 +              dev_err(&client->dev, "Unrecognized SMB version %d\n",
 +                              smbus_version);
 +              return -ENODEV;
 +      }
  
        return 0;
  }
@@@ -270,10 -253,11 +270,10 @@@ static int rmi_smb_reset(struct rmi_tra
        rmi_smb_clear_state(rmi_smb);
  
        /*
 -       * we do not call the actual reset command, it has to be handled in
 -       * PS/2 or there will be races between PS/2 and SMBus.
 -       * PS/2 should ensure that a psmouse_reset is called before
 -       * intializing the device and after it has been removed to be in a known
 -       * state.
 +       * We do not call the actual reset command, it has to be handled in
 +       * PS/2 or there will be races between PS/2 and SMBus. PS/2 should
 +       * ensure that a psmouse_reset is called before initializing the
 +       * device and after it has been removed to be in a known state.
         */
        return rmi_smb_enable_smbus_mode(rmi_smb);
  }
@@@ -288,6 -272,7 +288,6 @@@ static int rmi_smb_probe(struct i2c_cli
  {
        struct rmi_device_platform_data *pdata = dev_get_platdata(&client->dev);
        struct rmi_smb_xport *rmi_smb;
 -      int smbus_version;
        int error;
  
        if (!pdata) {
        rmi_smb->xport.proto_name = "smb";
        rmi_smb->xport.ops = &rmi_smb_ops;
  
 -      smbus_version = rmi_smb_get_version(rmi_smb);
 -      if (smbus_version < 0)
 -              return smbus_version;
 -
 -      rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d",
 -              smbus_version);
 -
 -      if (smbus_version != 2 && smbus_version != 3) {
 -              dev_err(&client->dev, "Unrecognized SMB version %d\n",
 -                              smbus_version);
 -              return -ENODEV;
 -      }
 +      error = rmi_smb_enable_smbus_mode(rmi_smb);
 +      if (error)
 +              return error;
  
        i2c_set_clientdata(client, rmi_smb);
  
@@@ -413,7 -407,7 +413,7 @@@ static const struct dev_pm_ops rmi_smb_
  };
  
  static const struct i2c_device_id rmi_id[] = {
-       { "rmi4_smbus", 0 },
+       { "rmi4_smbus" },
        { }
  };
  MODULE_DEVICE_TABLE(i2c, rmi_id);
index b068ff8afbc9ad3ba62b70cbbee20feb572c3855,e7b308b8ea2377e912d92768f5e5c7378eae5b6f..435714f18c23a61ca8cf2fcedaf6d6889b1f76a5
@@@ -884,8 -884,7 +884,8 @@@ static int goodix_add_acpi_gpio_mapping
                }
        }
  
 -      if (ts->gpio_count == 2 && ts->gpio_int_idx == 0) {
 +      /* Some devices with gpio_int_idx 0 list a third unused GPIO */
 +      if ((ts->gpio_count == 2 || ts->gpio_count == 3) && ts->gpio_int_idx == 0) {
                ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO;
                gpio_mapping = acpi_goodix_int_first_gpios;
        } else if (ts->gpio_count == 2 && ts->gpio_int_idx == 1) {
                dev_info(dev, "No ACPI GpioInt resource, assuming that the GPIO order is reset, int\n");
                ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO;
                gpio_mapping = acpi_goodix_int_last_gpios;
 +      } else if (ts->gpio_count == 1 && ts->gpio_int_idx == 0) {
 +              /*
 +               * On newer devices there is only 1 GpioInt resource and _PS0
 +               * does the whole reset sequence for us.
 +               */
 +              acpi_device_fix_up_power(ACPI_COMPANION(dev));
 +
 +              /*
 +               * Before the _PS0 call the int GPIO may have been in output
 +               * mode and the call should have put the int GPIO in input mode,
 +               * but the GPIO subsys cached state may still think it is
 +               * in output mode, causing gpiochip_lock_as_irq() failure.
 +               *
 +               * Add a mapping for the int GPIO to make the
 +               * gpiod_int = gpiod_get(..., GPIOD_IN) call succeed,
 +               * which will explicitly set the direction to input.
 +               */
 +              ts->irq_pin_access_method = IRQ_PIN_ACCESS_NONE;
 +              gpio_mapping = acpi_goodix_int_first_gpios;
        } else {
                dev_warn(dev, "Unexpected ACPI resources: gpio_count %d, gpio_int_idx %d\n",
                         ts->gpio_count, ts->gpio_int_idx);
@@@ -1510,7 -1490,7 +1510,7 @@@ static int goodix_resume(struct device 
  static DEFINE_SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume);
  
  static const struct i2c_device_id goodix_ts_id[] = {
-       { "GDIX1001:00", 0 },
+       { "GDIX1001:00" },
        { }
  };
  MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
  static const struct acpi_device_id goodix_acpi_match[] = {
        { "GDIX1001", 0 },
        { "GDIX1002", 0 },
 +      { "GDX9110", 0 },
        { }
  };
  MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
This page took 0.083593 seconds and 4 git commands to generate.