diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-02-21 11:19:49 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-02-21 11:19:49 -0800 |
commit | 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18 (patch) | |
tree | dbdd35328f43569c38c4ce193cefd7d2b6b9fbfd /drivers/input/keyboard | |
parent | 9c445d2637c938a800fcc8b5f0b10e60c94460c7 (diff) | |
parent | 9e69e845ae95227949c400af1037dca023f73038 (diff) | |
download | linux-stable-7ae9fb1b7ecbb5d85d07857943f677fd1a559b18.tar.gz linux-stable-7ae9fb1b7ecbb5d85d07857943f677fd1a559b18.tar.bz2 linux-stable-7ae9fb1b7ecbb5d85d07857943f677fd1a559b18.zip |
Merge branch 'next' into for-linus
Prepare input updates for 6.3 merge window.
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/applespi.c | 10 | ||||
-rw-r--r-- | drivers/input/keyboard/cap11xx.c | 19 | ||||
-rw-r--r-- | drivers/input/keyboard/cros_ec_keyb.c | 15 | ||||
-rw-r--r-- | drivers/input/keyboard/locomokbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/omap-keypad.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/omap4-keypad.c | 6 | ||||
-rw-r--r-- | drivers/input/keyboard/samsung-keypad.c | 12 | ||||
-rw-r--r-- | drivers/input/keyboard/spear-keyboard.c | 4 | ||||
-rw-r--r-- | drivers/input/keyboard/st-keyscan.c | 4 | ||||
-rw-r--r-- | drivers/input/keyboard/tegra-kbc.c | 4 |
11 files changed, 50 insertions, 30 deletions
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 84490915ae4d..6e51ebc55c4b 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -566,7 +566,7 @@ config KEYBOARD_PMIC8XXX help Say Y here if you want to enable the driver for the PMIC8XXX keypad provided as a reference design from Qualcomm. This is intended - to support upto 18x8 matrix based keypad design. + to support up to 18x8 matrix-based keypad design. To compile this driver as a module, choose M here: the module will be called pmic8xxx-keypad. diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c index 91a9810f6980..cf25177b4830 100644 --- a/drivers/input/keyboard/applespi.c +++ b/drivers/input/keyboard/applespi.c @@ -1876,7 +1876,7 @@ static int applespi_poweroff_late(struct device *dev) return 0; } -static int __maybe_unused applespi_suspend(struct device *dev) +static int applespi_suspend(struct device *dev) { struct spi_device *spi = to_spi_device(dev); struct applespi_data *applespi = spi_get_drvdata(spi); @@ -1903,7 +1903,7 @@ static int __maybe_unused applespi_suspend(struct device *dev) return 0; } -static int __maybe_unused applespi_resume(struct device *dev) +static int applespi_resume(struct device *dev) { struct spi_device *spi = to_spi_device(dev); struct applespi_data *applespi = spi_get_drvdata(spi); @@ -1947,15 +1947,15 @@ static const struct acpi_device_id applespi_acpi_match[] = { MODULE_DEVICE_TABLE(acpi, applespi_acpi_match); static const struct dev_pm_ops applespi_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(applespi_suspend, applespi_resume) - .poweroff_late = applespi_poweroff_late, + SYSTEM_SLEEP_PM_OPS(applespi_suspend, applespi_resume) + .poweroff_late = pm_sleep_ptr(applespi_poweroff_late), }; static struct spi_driver applespi_driver = { .driver = { .name = "applespi", .acpi_match_table = applespi_acpi_match, - .pm = &applespi_pm_ops, + .pm = pm_sleep_ptr(&applespi_pm_ops), }, .probe = applespi_probe, .remove = applespi_remove, diff --git a/drivers/input/keyboard/cap11xx.c b/drivers/input/keyboard/cap11xx.c index 79afd0386e3f..040696d0e49c 100644 --- a/drivers/input/keyboard/cap11xx.c +++ b/drivers/input/keyboard/cap11xx.c @@ -98,14 +98,20 @@ enum { CAP1106, CAP1126, CAP1188, + CAP1203, CAP1206, + CAP1293, + CAP1298 }; static const struct cap11xx_hw_model cap11xx_devices[] = { [CAP1106] = { .product_id = 0x55, .num_channels = 6, .num_leds = 0, .no_gain = false }, [CAP1126] = { .product_id = 0x53, .num_channels = 6, .num_leds = 2, .no_gain = false }, [CAP1188] = { .product_id = 0x50, .num_channels = 8, .num_leds = 8, .no_gain = false }, + [CAP1203] = { .product_id = 0x6d, .num_channels = 3, .num_leds = 0, .no_gain = true }, [CAP1206] = { .product_id = 0x67, .num_channels = 6, .num_leds = 0, .no_gain = true }, + [CAP1293] = { .product_id = 0x6f, .num_channels = 3, .num_leds = 0, .no_gain = false }, + [CAP1298] = { .product_id = 0x71, .num_channels = 8, .num_leds = 0, .no_gain = false }, }; static const struct reg_default cap11xx_reg_defaults[] = { @@ -377,7 +383,8 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client) if (error < 0) return error; - dev_info(dev, "CAP11XX detected, revision 0x%02x\n", rev); + dev_info(dev, "CAP11XX detected, model %s, revision 0x%02x\n", + id->name, rev); node = dev->of_node; if (!of_property_read_u32(node, "microchip,sensor-gain", &gain32)) { @@ -390,7 +397,9 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client) dev_err(dev, "Invalid sensor-gain value %d\n", gain32); } - if (id->driver_data != CAP1206) { + if (id->driver_data == CAP1106 || + id->driver_data == CAP1126 || + id->driver_data == CAP1188) { if (of_property_read_bool(node, "microchip,irq-active-high")) { error = regmap_update_bits(priv->regmap, CAP11XX_REG_CONFIG2, @@ -483,7 +492,10 @@ static const struct of_device_id cap11xx_dt_ids[] = { { .compatible = "microchip,cap1106", }, { .compatible = "microchip,cap1126", }, { .compatible = "microchip,cap1188", }, + { .compatible = "microchip,cap1203", }, { .compatible = "microchip,cap1206", }, + { .compatible = "microchip,cap1293", }, + { .compatible = "microchip,cap1298", }, {} }; MODULE_DEVICE_TABLE(of, cap11xx_dt_ids); @@ -492,7 +504,10 @@ static const struct i2c_device_id cap11xx_i2c_ids[] = { { "cap1106", CAP1106 }, { "cap1126", CAP1126 }, { "cap1188", CAP1188 }, + { "cap1203", CAP1203 }, { "cap1206", CAP1206 }, + { "cap1293", CAP1293 }, + { "cap1298", CAP1298 }, {} }; MODULE_DEVICE_TABLE(i2c, cap11xx_i2c_ids); diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index 6f435125ec03..e7ecfca838df 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -100,6 +100,21 @@ static const struct cros_ec_bs_map cros_ec_keyb_bs[] = { .code = KEY_VOLUMEDOWN, .bit = EC_MKBP_VOL_DOWN, }, + { + .ev_type = EV_KEY, + .code = KEY_BRIGHTNESSUP, + .bit = EC_MKBP_BRI_UP, + }, + { + .ev_type = EV_KEY, + .code = KEY_BRIGHTNESSDOWN, + .bit = EC_MKBP_BRI_DOWN, + }, + { + .ev_type = EV_KEY, + .code = KEY_SCREENLOCK, + .bit = EC_MKBP_SCREEN_LOCK, + }, /* Switches */ { diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c index dae053596572..f866c03b9d0e 100644 --- a/drivers/input/keyboard/locomokbd.c +++ b/drivers/input/keyboard/locomokbd.c @@ -310,7 +310,7 @@ static void locomokbd_remove(struct locomo_dev *dev) free_irq(dev->irq[0], locomokbd); - del_timer_sync(&locomokbd->timer); + timer_shutdown_sync(&locomokbd->timer); input_unregister_device(locomokbd->input); locomo_set_drvdata(dev, NULL); diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index 57447d6c9007..24440b498645 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c @@ -296,7 +296,7 @@ static int omap_kp_remove(struct platform_device *pdev) omap_writew(1, OMAP1_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); free_irq(omap_kp->irq, omap_kp); - del_timer_sync(&omap_kp->timer); + timer_shutdown_sync(&omap_kp->timer); tasklet_kill(&kp_tasklet); /* unregister everything */ diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index ee9d04a3f0d5..4426120398b0 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -310,7 +310,7 @@ static int omap4_keypad_check_revision(struct device *dev, * Interrupt may not happen for key-up events. We must clear stuck * key-up events after the keyboard hardware has auto-idled. */ -static int __maybe_unused omap4_keypad_runtime_suspend(struct device *dev) +static int omap4_keypad_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct omap4_keypad *keypad_data = platform_get_drvdata(pdev); @@ -328,7 +328,7 @@ static int __maybe_unused omap4_keypad_runtime_suspend(struct device *dev) } static const struct dev_pm_ops omap4_keypad_pm_ops = { - SET_RUNTIME_PM_OPS(omap4_keypad_runtime_suspend, NULL, NULL) + RUNTIME_PM_OPS(omap4_keypad_runtime_suspend, NULL, NULL) }; static void omap4_disable_pm(void *d) @@ -488,7 +488,7 @@ static struct platform_driver omap4_keypad_driver = { .driver = { .name = "omap4-keypad", .of_match_table = omap_keypad_dt_match, - .pm = &omap4_keypad_pm_ops, + .pm = pm_ptr(&omap4_keypad_pm_ops), }, }; module_platform_driver(omap4_keypad_driver); diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c index df0258dcf89e..09e883ea1352 100644 --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c @@ -458,7 +458,6 @@ static int samsung_keypad_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM static int samsung_keypad_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -503,9 +502,7 @@ static int samsung_keypad_runtime_resume(struct device *dev) return 0; } -#endif -#ifdef CONFIG_PM_SLEEP static void samsung_keypad_toggle_wakeup(struct samsung_keypad *keypad, bool enable) { @@ -563,12 +560,11 @@ static int samsung_keypad_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops samsung_keypad_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(samsung_keypad_suspend, samsung_keypad_resume) - SET_RUNTIME_PM_OPS(samsung_keypad_runtime_suspend, - samsung_keypad_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(samsung_keypad_suspend, samsung_keypad_resume) + RUNTIME_PM_OPS(samsung_keypad_runtime_suspend, + samsung_keypad_runtime_resume, NULL) }; #ifdef CONFIG_OF @@ -598,7 +594,7 @@ static struct platform_driver samsung_keypad_driver = { .driver = { .name = "samsung-keypad", .of_match_table = of_match_ptr(samsung_keypad_dt_match), - .pm = &samsung_keypad_pm_ops, + .pm = pm_ptr(&samsung_keypad_pm_ops), }, .id_table = samsung_keypad_driver_ids, }; diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index 4bb7c533147c..a50fa9915381 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -186,7 +186,6 @@ static int spear_kbd_probe(struct platform_device *pdev) const struct matrix_keymap_data *keymap = pdata ? pdata->keymap : NULL; struct spear_kbd *kbd; struct input_dev *input_dev; - struct resource *res; int irq; int error; @@ -219,8 +218,7 @@ static int spear_kbd_probe(struct platform_device *pdev) kbd->suspended_rate = pdata->suspended_rate; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - kbd->io_base = devm_ioremap_resource(&pdev->dev, res); + kbd->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(kbd->io_base)) return PTR_ERR(kbd->io_base); diff --git a/drivers/input/keyboard/st-keyscan.c b/drivers/input/keyboard/st-keyscan.c index 13735a5e8391..b6e83324f97a 100644 --- a/drivers/input/keyboard/st-keyscan.c +++ b/drivers/input/keyboard/st-keyscan.c @@ -125,7 +125,6 @@ static int keyscan_probe(struct platform_device *pdev) { struct st_keyscan *keypad_data; struct input_dev *input_dev; - struct resource *res; int error; if (!pdev->dev.of_node) { @@ -169,8 +168,7 @@ static int keyscan_probe(struct platform_device *pdev) input_set_drvdata(input_dev, keypad_data); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - keypad_data->base = devm_ioremap_resource(&pdev->dev, res); + keypad_data->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(keypad_data->base)) return PTR_ERR(keypad_data->base); diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 1eba06bcf27a..da4019cf0c83 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -598,7 +598,6 @@ MODULE_DEVICE_TABLE(of, tegra_kbc_of_match); static int tegra_kbc_probe(struct platform_device *pdev) { struct tegra_kbc *kbc; - struct resource *res; int err; int num_rows = 0; unsigned int debounce_cnt; @@ -642,8 +641,7 @@ static int tegra_kbc_probe(struct platform_device *pdev) timer_setup(&kbc->timer, tegra_kbc_keypress_timer, 0); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - kbc->mmio = devm_ioremap_resource(&pdev->dev, res); + kbc->mmio = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(kbc->mmio)) return PTR_ERR(kbc->mmio); |