]> Git Repo - linux.git/commitdiff
Merge branch 'next' into for-linus
authorDmitry Torokhov <[email protected]>
Thu, 11 Jul 2019 06:24:10 +0000 (23:24 -0700)
committerDmitry Torokhov <[email protected]>
Thu, 11 Jul 2019 06:24:10 +0000 (23:24 -0700)
Prepare input updates for 5.3 merge window.

1  2 
drivers/input/keyboard/imx_keypad.c
drivers/input/touchscreen/atmel_mxt_ts.c
drivers/input/touchscreen/iqs5xx.c

index ae9c51cc85f997b92a6581a74a0ba65f6a673cb1,cf08f4acb19122ac39fc0cc58e8ecedbad3a3dc9..97500a2de2d5123a7f1c7a9dd40abdcc54ba4e3a
@@@ -422,7 -422,6 +422,6 @@@ static int imx_keypad_probe(struct plat
                        dev_get_platdata(&pdev->dev);
        struct imx_keypad *keypad;
        struct input_dev *input_dev;
-       struct resource *res;
        int irq, error, i, row, col;
  
        if (!keymap_data && !pdev->dev.of_node) {
        timer_setup(&keypad->check_matrix_timer,
                    imx_keypad_check_for_events, 0);
  
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       keypad->mmio_base = devm_ioremap_resource(&pdev->dev, res);
+       keypad->mmio_base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(keypad->mmio_base))
                return PTR_ERR(keypad->mmio_base);
  
        return 0;
  }
  
 -static int __maybe_unused imx_kbd_suspend(struct device *dev)
 +static int __maybe_unused imx_kbd_noirq_suspend(struct device *dev)
  {
        struct platform_device *pdev = to_platform_device(dev);
        struct imx_keypad *kbd = platform_get_drvdata(pdev);
        struct input_dev *input_dev = kbd->input_dev;
 +      unsigned short reg_val = readw(kbd->mmio_base + KPSR);
  
        /* imx kbd can wake up system even clock is disabled */
        mutex_lock(&input_dev->mutex);
  
        mutex_unlock(&input_dev->mutex);
  
 -      if (device_may_wakeup(&pdev->dev))
 +      if (device_may_wakeup(&pdev->dev)) {
 +              if (reg_val & KBD_STAT_KPKD)
 +                      reg_val |= KBD_STAT_KRIE;
 +              if (reg_val & KBD_STAT_KPKR)
 +                      reg_val |= KBD_STAT_KDIE;
 +              writew(reg_val, kbd->mmio_base + KPSR);
 +
                enable_irq_wake(kbd->irq);
 +      }
  
        return 0;
  }
  
 -static int __maybe_unused imx_kbd_resume(struct device *dev)
 +static int __maybe_unused imx_kbd_noirq_resume(struct device *dev)
  {
        struct platform_device *pdev = to_platform_device(dev);
        struct imx_keypad *kbd = platform_get_drvdata(pdev);
@@@ -578,9 -568,7 +576,9 @@@ err_clk
        return ret;
  }
  
 -static SIMPLE_DEV_PM_OPS(imx_kbd_pm_ops, imx_kbd_suspend, imx_kbd_resume);
 +static const struct dev_pm_ops imx_kbd_pm_ops = {
 +      SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(imx_kbd_noirq_suspend, imx_kbd_noirq_resume)
 +};
  
  static struct platform_driver imx_keypad_driver = {
        .driver         = {
index 8b536778f1d8ecebe0cc30939fc02dc2cc243ef8,d530aade0103368e7d99122632bb19efbde53375..6f4f9da0515cc7b601fb8355db7be2bc44add676
@@@ -261,16 -261,6 +261,6 @@@ enum v4l_dbg_inputs 
        MXT_V4L_INPUT_MAX,
  };
  
- static const struct v4l2_file_operations mxt_video_fops = {
-       .owner = THIS_MODULE,
-       .open = v4l2_fh_open,
-       .release = vb2_fop_release,
-       .unlocked_ioctl = video_ioctl2,
-       .read = vb2_fop_read,
-       .mmap = vb2_fop_mmap,
-       .poll = vb2_fop_poll,
- };
  enum mxt_suspend_mode {
        MXT_SUSPEND_DEEP_SLEEP  = 0,
        MXT_SUSPEND_T9_CTRL     = 1,
@@@ -1526,8 -1516,7 +1516,8 @@@ static int mxt_update_cfg(struct mxt_da
                } else if (config_crc == data->config_crc) {
                        dev_dbg(dev, "Config CRC 0x%06X: OK\n",
                                 data->config_crc);
 -                      return 0;
 +                      ret = 0;
 +                      goto release_raw;
                } else {
                        dev_info(dev, "Config CRC 0x%06X: does not match file 0x%06X\n",
                                 data->config_crc, config_crc);
@@@ -2224,6 -2213,16 +2214,16 @@@ recheck
  }
  
  #ifdef CONFIG_TOUCHSCREEN_ATMEL_MXT_T37
+ static const struct v4l2_file_operations mxt_video_fops = {
+       .owner = THIS_MODULE,
+       .open = v4l2_fh_open,
+       .release = vb2_fop_release,
+       .unlocked_ioctl = video_ioctl2,
+       .read = vb2_fop_read,
+       .mmap = vb2_fop_mmap,
+       .poll = vb2_fop_poll,
+ };
  static u16 mxt_get_debug_value(struct mxt_data *data, unsigned int x,
                               unsigned int y)
  {
index 4f6fe8cc8efaefeb8cce55f52251c35f1963f4d5,158707897c2dd8ba10020dc8ffbc83643db3e174..5875bb1099a84e1741e0a70ce6cae78662577aa6
@@@ -502,6 -502,14 +502,6 @@@ static int iqs5xx_axis_init(struct i2c_
                input_set_capability(input, EV_ABS, ABS_MT_POSITION_Y);
                input_set_capability(input, EV_ABS, ABS_MT_PRESSURE);
  
 -              error = input_mt_init_slots(input,
 -                              IQS5XX_NUM_CONTACTS, INPUT_MT_DIRECT);
 -              if (error) {
 -                      dev_err(&client->dev,
 -                              "Failed to initialize slots: %d\n", error);
 -                      return error;
 -              }
 -
                input_set_drvdata(input, iqs5xx);
                iqs5xx->input = input;
        }
        if (error)
                return error;
  
 -      return iqs5xx_write_word(client,
 -                               prop.swap_x_y ? IQS5XX_X_RES : IQS5XX_Y_RES,
 -                               max_y);
 +      error = iqs5xx_write_word(client,
 +                                prop.swap_x_y ? IQS5XX_X_RES : IQS5XX_Y_RES,
 +                                max_y);
 +      if (error)
 +              return error;
 +
 +      error = input_mt_init_slots(iqs5xx->input, IQS5XX_NUM_CONTACTS,
 +                                  INPUT_MT_DIRECT);
 +      if (error)
 +              dev_err(&client->dev, "Failed to initialize slots: %d\n",
 +                      error);
 +
 +      return error;
  }
  
  static int iqs5xx_dev_init(struct i2c_client *client)
@@@ -1056,8 -1054,6 +1056,6 @@@ static int iqs5xx_probe(struct i2c_clie
        if (!iqs5xx)
                return -ENOMEM;
  
-       dev_set_drvdata(&client->dev, iqs5xx);
        i2c_set_clientdata(client, iqs5xx);
        iqs5xx->client = client;
  
This page took 0.082271 seconds and 4 git commands to generate.