]> Git Repo - J-linux.git/commitdiff
Merge branch 'next' into for-linus
authorDmitry Torokhov <[email protected]>
Tue, 2 Aug 2022 17:06:12 +0000 (10:06 -0700)
committerDmitry Torokhov <[email protected]>
Tue, 2 Aug 2022 17:06:12 +0000 (10:06 -0700)
Prepare input updates for 5.20 (or 6.0) merge window.

1  2 
drivers/input/touchscreen/goodix.c
drivers/input/touchscreen/wm97xx-core.c
include/uapi/linux/input.h

index aa45a9fee6a0182d4434a2f7d246ea305546960e,cc52f0d21dbb8dbd81a9df067a06db0f5e25a575..d016505fc081f31aaf6684dbca06c264dcc12d22
@@@ -822,22 -822,16 +822,16 @@@ static int goodix_resource(struct acpi_
        struct device *dev = &ts->client->dev;
        struct acpi_resource_gpio *gpio;
  
-       switch (ares->type) {
-       case ACPI_RESOURCE_TYPE_GPIO:
-               gpio = &ares->data.gpio;
-               if (gpio->connection_type == ACPI_RESOURCE_GPIO_TYPE_INT) {
-                       if (ts->gpio_int_idx == -1) {
-                               ts->gpio_int_idx = ts->gpio_count;
-                       } else {
-                               dev_err(dev, "More then one GpioInt resource, ignoring ACPI GPIO resources\n");
-                               ts->gpio_int_idx = -2;
-                       }
+       if (acpi_gpio_get_irq_resource(ares, &gpio)) {
+               if (ts->gpio_int_idx == -1) {
+                       ts->gpio_int_idx = ts->gpio_count;
+               } else {
+                       dev_err(dev, "More then one GpioInt resource, ignoring ACPI GPIO resources\n");
+                       ts->gpio_int_idx = -2;
                }
                ts->gpio_count++;
-               break;
-       default:
-               break;
-       }
+       } else if (acpi_gpio_get_io_resource(ares, &gpio))
+               ts->gpio_count++;
  
        return 0;
  }
@@@ -900,11 -894,6 +894,11 @@@ static int goodix_add_acpi_gpio_mapping
        } else {
                dev_warn(dev, "Unexpected ACPI resources: gpio_count %d, gpio_int_idx %d\n",
                         ts->gpio_count, ts->gpio_int_idx);
 +              /*
 +               * On some devices _PS0 does a reset for us and
 +               * sometimes this is necessary for things to work.
 +               */
 +              acpi_device_fix_up_power(ACPI_COMPANION(dev));
                return -EINVAL;
        }
  
index a466e8c56462f10fa151c33cb872cf99d6ba46e2,2757c7768ffe95456757d35eaa2f7dc41fddf589..f51ab561453200b8432ebdc8c2cf144c7a28e9f4
@@@ -285,11 -285,12 +285,12 @@@ void wm97xx_set_suspend_mode(struct wm9
  EXPORT_SYMBOL_GPL(wm97xx_set_suspend_mode);
  
  /*
-  * Handle a pen down interrupt.
+  * Codec PENDOWN irq handler
+  *
   */
- static void wm97xx_pen_irq_worker(struct work_struct *work)
+ static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id)
  {
-       struct wm97xx *wm = container_of(work, struct wm97xx, pen_event_work);
+       struct wm97xx *wm = dev_id;
        int pen_was_down = wm->pen_is_down;
  
        /* do we need to enable the touch panel reader */
        if (!wm->pen_is_down && wm->mach_ops->acc_enabled)
                wm->mach_ops->acc_pen_up(wm);
  
-       wm->mach_ops->irq_enable(wm, 1);
- }
- /*
-  * Codec PENDOWN irq handler
-  *
-  * We have to disable the codec interrupt in the handler because it
-  * can take up to 1ms to clear the interrupt source. We schedule a task
-  * in a work queue to do the actual interaction with the chip.  The
-  * interrupt is then enabled again in the slow handler when the source
-  * has been cleared.
-  */
- static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id)
- {
-       struct wm97xx *wm = dev_id;
-       if (!work_pending(&wm->pen_event_work)) {
-               wm->mach_ops->irq_enable(wm, 0);
-               queue_work(wm->ts_workq, &wm->pen_event_work);
-       }
        return IRQ_HANDLED;
  }
  
@@@ -374,12 -354,9 +354,9 @@@ static int wm97xx_init_pen_irq(struct w
  {
        u16 reg;
  
-       /* If an interrupt is supplied an IRQ enable operation must also be
-        * provided. */
-       BUG_ON(!wm->mach_ops->irq_enable);
-       if (request_irq(wm->pen_irq, wm97xx_pen_interrupt, IRQF_SHARED,
-                       "wm97xx-pen", wm)) {
+       if (request_threaded_irq(wm->pen_irq, NULL, wm97xx_pen_interrupt,
+                                IRQF_SHARED | IRQF_ONESHOT,
+                                "wm97xx-pen", wm)) {
                dev_err(wm->dev,
                        "Failed to register pen down interrupt, polling");
                wm->pen_irq = 0;
@@@ -509,7 -486,6 +486,6 @@@ static int wm97xx_ts_input_open(struct 
        wm->codec->dig_enable(wm, 1);
  
        INIT_DELAYED_WORK(&wm->ts_reader, wm97xx_ts_reader);
-       INIT_WORK(&wm->pen_event_work, wm97xx_pen_irq_worker);
  
        wm->ts_reader_min_interval = HZ >= 100 ? HZ / 100 : 1;
        if (wm->ts_reader_min_interval < 1)
@@@ -560,10 -536,6 +536,6 @@@ static void wm97xx_ts_input_close(struc
  
        wm->pen_is_down = 0;
  
-       /* Balance out interrupt disables/enables */
-       if (cancel_work_sync(&wm->pen_event_work))
-               wm->mach_ops->irq_enable(wm, 1);
        /* ts_reader rearms itself so we need to explicitly stop it
         * before we destroy the workqueue.
         */
@@@ -786,9 -758,7 +758,9 @@@ batt_err
  
  static int wm97xx_mfd_remove(struct platform_device *pdev)
  {
 -      return wm97xx_remove(&pdev->dev);
 +      wm97xx_remove(&pdev->dev);
 +
 +      return 0;
  }
  
  static int __maybe_unused wm97xx_suspend(struct device *dev)
index 328cf545c029921bd9544dbd4ac7cf51a9510445,ef4257ab30265c67940b2d7a06fc237d776dee80..2557eb7b056178b2b8be98d9cea855eba1bd5aaf
@@@ -78,13 -78,10 +78,13 @@@ struct input_id 
   * Note that input core does not clamp reported values to the
   * [minimum, maximum] limits, such task is left to userspace.
   *
 - * The default resolution for main axes (ABS_X, ABS_Y, ABS_Z)
 - * is reported in units per millimeter (units/mm), resolution
 - * for rotational axes (ABS_RX, ABS_RY, ABS_RZ) is reported
 - * in units per radian.
 + * The default resolution for main axes (ABS_X, ABS_Y, ABS_Z,
 + * ABS_MT_POSITION_X, ABS_MT_POSITION_Y) is reported in units
 + * per millimeter (units/mm), resolution for rotational axes
 + * (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian.
 + * The resolution for the size axes (ABS_MT_TOUCH_MAJOR,
 + * ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MAJOR, ABS_MT_WIDTH_MINOR)
 + * is reported in units per millimeter (units/mm).
   * When INPUT_PROP_ACCELEROMETER is set the resolution changes.
   * The main axes (ABS_X, ABS_Y, ABS_Z) are then reported in
   * units per g (units/g) and in units per degree per second
@@@ -274,6 -271,7 +274,7 @@@ struct input_mask 
  #define BUS_RMI                       0x1D
  #define BUS_CEC                       0x1E
  #define BUS_INTEL_ISHTP               0x1F
+ #define BUS_AMD_SFH           0x20
  
  /*
   * MT_TOOL types
This page took 0.13088 seconds and 4 git commands to generate.