Commit 4c493b1a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'input-for-v5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:
 "A small fixup to ili210x touchscreen driver, and updated maintainer
  entry for the device tree binding of Mediatek 6779 keypad:

   - fix reset timing of Ilitek touchscreens

   - update maintainer entry of DT binding of Mediatek 6779 keypad"

* tag 'input-for-v5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: ili210x - use one common reset implementation
  Input: ili210x - fix reset timing
  dt-bindings: input: mediatek,mt6779-keypad: update maintainer
parents 36ed2da7 b26ff913
...@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# ...@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mediatek's Keypad Controller device tree bindings title: Mediatek's Keypad Controller device tree bindings
maintainers: maintainers:
- Fengping Yu <fengping.yu@mediatek.com> - Mattijs Korpershoek <mkorpershoek@baylibre.com>
allOf: allOf:
- $ref: "/schemas/input/matrix-keymap.yaml#" - $ref: "/schemas/input/matrix-keymap.yaml#"
......
...@@ -756,15 +756,12 @@ static int ili251x_firmware_reset(struct i2c_client *client) ...@@ -756,15 +756,12 @@ static int ili251x_firmware_reset(struct i2c_client *client)
return ili251x_firmware_busy(client); return ili251x_firmware_busy(client);
} }
static void ili251x_hardware_reset(struct device *dev) static void ili210x_hardware_reset(struct gpio_desc *reset_gpio)
{ {
struct i2c_client *client = to_i2c_client(dev);
struct ili210x *priv = i2c_get_clientdata(client);
/* Reset the controller */ /* Reset the controller */
gpiod_set_value_cansleep(priv->reset_gpio, 1); gpiod_set_value_cansleep(reset_gpio, 1);
usleep_range(10000, 15000); usleep_range(12000, 15000);
gpiod_set_value_cansleep(priv->reset_gpio, 0); gpiod_set_value_cansleep(reset_gpio, 0);
msleep(300); msleep(300);
} }
...@@ -773,6 +770,7 @@ static ssize_t ili210x_firmware_update_store(struct device *dev, ...@@ -773,6 +770,7 @@ static ssize_t ili210x_firmware_update_store(struct device *dev,
const char *buf, size_t count) const char *buf, size_t count)
{ {
struct i2c_client *client = to_i2c_client(dev); struct i2c_client *client = to_i2c_client(dev);
struct ili210x *priv = i2c_get_clientdata(client);
const char *fwname = ILI251X_FW_FILENAME; const char *fwname = ILI251X_FW_FILENAME;
const struct firmware *fw; const struct firmware *fw;
u16 ac_end, df_end; u16 ac_end, df_end;
...@@ -803,7 +801,7 @@ static ssize_t ili210x_firmware_update_store(struct device *dev, ...@@ -803,7 +801,7 @@ static ssize_t ili210x_firmware_update_store(struct device *dev,
dev_dbg(dev, "Firmware update started, firmware=%s\n", fwname); dev_dbg(dev, "Firmware update started, firmware=%s\n", fwname);
ili251x_hardware_reset(dev); ili210x_hardware_reset(priv->reset_gpio);
error = ili251x_firmware_reset(client); error = ili251x_firmware_reset(client);
if (error) if (error)
...@@ -858,7 +856,7 @@ static ssize_t ili210x_firmware_update_store(struct device *dev, ...@@ -858,7 +856,7 @@ static ssize_t ili210x_firmware_update_store(struct device *dev,
error = count; error = count;
exit: exit:
ili251x_hardware_reset(dev); ili210x_hardware_reset(priv->reset_gpio);
dev_dbg(dev, "Firmware update ended, error=%i\n", error); dev_dbg(dev, "Firmware update ended, error=%i\n", error);
enable_irq(client->irq); enable_irq(client->irq);
kfree(fwbuf); kfree(fwbuf);
...@@ -951,9 +949,7 @@ static int ili210x_i2c_probe(struct i2c_client *client, ...@@ -951,9 +949,7 @@ static int ili210x_i2c_probe(struct i2c_client *client,
if (error) if (error)
return error; return error;
usleep_range(50, 100); ili210x_hardware_reset(reset_gpio);
gpiod_set_value_cansleep(reset_gpio, 0);
msleep(100);
} }
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment