]> Git Repo - linux.git/commitdiff
Merge branch 'next' into for-linus
authorDmitry Torokhov <[email protected]>
Wed, 30 Aug 2023 23:06:38 +0000 (16:06 -0700)
committerDmitry Torokhov <[email protected]>
Wed, 30 Aug 2023 23:06:38 +0000 (16:06 -0700)
Prepare input updates for 6.6 merge window.

1  2 
drivers/input/touchscreen/exc3000.c
drivers/input/touchscreen/goodix.c

index 66ed2eaa6dcb8d15b91395c6288d9d351374d3e4,e3f6d21b3c1b3d5510682d883279c40e47db37ce..4c0d99aae9e0346be665ac679c17925e2291e332
@@@ -7,7 -7,6 +7,7 @@@
   * minimal implementation based on egalax_ts.c and egalax_i2c.c
   */
  
 +#include <linux/acpi.h>
  #include <linux/bitops.h>
  #include <linux/delay.h>
  #include <linux/device.h>
@@@ -19,6 -18,7 +19,7 @@@
  #include <linux/interrupt.h>
  #include <linux/module.h>
  #include <linux/of.h>
+ #include <linux/regulator/consumer.h>
  #include <linux/sizes.h>
  #include <linux/timer.h>
  #include <asm/unaligned.h>
@@@ -361,6 -361,12 +362,12 @@@ static int exc3000_probe(struct i2c_cli
        if (IS_ERR(data->reset))
                return PTR_ERR(data->reset);
  
+       /* For proper reset sequence, enable power while reset asserted */
+       error = devm_regulator_get_enable(&client->dev, "vdd");
+       if (error && error != -ENODEV)
+               return dev_err_probe(&client->dev, error,
+                                    "failed to request vdd regulator\n");
        if (data->reset) {
                msleep(EXC3000_RESET_MS);
                gpiod_set_value_cansleep(data->reset, 0);
@@@ -455,19 -461,10 +462,19 @@@ static const struct of_device_id exc300
  MODULE_DEVICE_TABLE(of, exc3000_of_match);
  #endif
  
 +#ifdef CONFIG_ACPI
 +static const struct acpi_device_id exc3000_acpi_match[] = {
 +      { "EGA00001", .driver_data = (kernel_ulong_t)&exc3000_info[EETI_EXC80H60] },
 +      { }
 +};
 +MODULE_DEVICE_TABLE(acpi, exc3000_acpi_match);
 +#endif
 +
  static struct i2c_driver exc3000_driver = {
        .driver = {
                .name   = "exc3000",
                .of_match_table = of_match_ptr(exc3000_of_match),
 +              .acpi_match_table = ACPI_PTR(exc3000_acpi_match),
        },
        .id_table       = exc3000_id,
        .probe          = exc3000_probe,
index 7f5cfc5e136eade191e22ba8e9addfacd80a74b6,85d4249f10656ede20d8e45f8440e62c42cb6279..da9954d6df44c19b45032ba862e13acfee267832
@@@ -935,7 -935,6 +935,6 @@@ static int goodix_add_acpi_gpio_mapping
   */
  static int goodix_get_gpio_config(struct goodix_ts_data *ts)
  {
-       int error;
        struct device *dev;
        struct gpio_desc *gpiod;
        bool added_acpi_mappings = false;
        ts->gpiod_rst_flags = GPIOD_IN;
  
        ts->avdd28 = devm_regulator_get(dev, "AVDD28");
-       if (IS_ERR(ts->avdd28)) {
-               error = PTR_ERR(ts->avdd28);
-               if (error != -EPROBE_DEFER)
-                       dev_err(dev,
-                               "Failed to get AVDD28 regulator: %d\n", error);
-               return error;
-       }
+       if (IS_ERR(ts->avdd28))
+               return dev_err_probe(dev, PTR_ERR(ts->avdd28), "Failed to get AVDD28 regulator\n");
  
        ts->vddio = devm_regulator_get(dev, "VDDIO");
-       if (IS_ERR(ts->vddio)) {
-               error = PTR_ERR(ts->vddio);
-               if (error != -EPROBE_DEFER)
-                       dev_err(dev,
-                               "Failed to get VDDIO regulator: %d\n", error);
-               return error;
-       }
+       if (IS_ERR(ts->vddio))
+               return dev_err_probe(dev, PTR_ERR(ts->vddio), "Failed to get VDDIO regulator\n");
  
  retry_get_irq_gpio:
        /* Get the interrupt GPIO pin number */
        gpiod = devm_gpiod_get_optional(dev, GOODIX_GPIO_INT_NAME, GPIOD_IN);
-       if (IS_ERR(gpiod)) {
-               error = PTR_ERR(gpiod);
-               if (error != -EPROBE_DEFER)
-                       dev_err(dev, "Failed to get %s GPIO: %d\n",
-                               GOODIX_GPIO_INT_NAME, error);
-               return error;
-       }
+       if (IS_ERR(gpiod))
+               return dev_err_probe(dev, PTR_ERR(gpiod), "Failed to get %s GPIO\n",
+                                    GOODIX_GPIO_INT_NAME);
        if (!gpiod && has_acpi_companion(dev) && !added_acpi_mappings) {
                added_acpi_mappings = true;
                if (goodix_add_acpi_gpio_mappings(ts) == 0)
  
        /* Get the reset line GPIO pin number */
        gpiod = devm_gpiod_get_optional(dev, GOODIX_GPIO_RST_NAME, ts->gpiod_rst_flags);
-       if (IS_ERR(gpiod)) {
-               error = PTR_ERR(gpiod);
-               if (error != -EPROBE_DEFER)
-                       dev_err(dev, "Failed to get %s GPIO: %d\n",
-                               GOODIX_GPIO_RST_NAME, error);
-               return error;
-       }
+       if (IS_ERR(gpiod))
+               return dev_err_probe(dev, PTR_ERR(gpiod), "Failed to get %s GPIO\n",
+                                    GOODIX_GPIO_RST_NAME);
  
        ts->gpiod_rst = gpiod;
  
@@@ -1517,7 -1499,6 +1499,7 @@@ 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.063723 seconds and 4 git commands to generate.