Skip to content

Commit 4c493b1

Browse files
committed
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
2 parents 36ed2da + b26ff91 commit 4c493b1

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
77
title: Mediatek's Keypad Controller device tree bindings
88

99
maintainers:
10-
- Fengping Yu <fengping.yu@mediatek.com>
10+
- Mattijs Korpershoek <mkorpershoek@baylibre.com>
1111

1212
allOf:
1313
- $ref: "/schemas/input/matrix-keymap.yaml#"

drivers/input/touchscreen/ili210x.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -756,15 +756,12 @@ static int ili251x_firmware_reset(struct i2c_client *client)
756756
return ili251x_firmware_busy(client);
757757
}
758758

759-
static void ili251x_hardware_reset(struct device *dev)
759+
static void ili210x_hardware_reset(struct gpio_desc *reset_gpio)
760760
{
761-
struct i2c_client *client = to_i2c_client(dev);
762-
struct ili210x *priv = i2c_get_clientdata(client);
763-
764761
/* Reset the controller */
765-
gpiod_set_value_cansleep(priv->reset_gpio, 1);
766-
usleep_range(10000, 15000);
767-
gpiod_set_value_cansleep(priv->reset_gpio, 0);
762+
gpiod_set_value_cansleep(reset_gpio, 1);
763+
usleep_range(12000, 15000);
764+
gpiod_set_value_cansleep(reset_gpio, 0);
768765
msleep(300);
769766
}
770767

@@ -773,6 +770,7 @@ static ssize_t ili210x_firmware_update_store(struct device *dev,
773770
const char *buf, size_t count)
774771
{
775772
struct i2c_client *client = to_i2c_client(dev);
773+
struct ili210x *priv = i2c_get_clientdata(client);
776774
const char *fwname = ILI251X_FW_FILENAME;
777775
const struct firmware *fw;
778776
u16 ac_end, df_end;
@@ -803,7 +801,7 @@ static ssize_t ili210x_firmware_update_store(struct device *dev,
803801

804802
dev_dbg(dev, "Firmware update started, firmware=%s\n", fwname);
805803

806-
ili251x_hardware_reset(dev);
804+
ili210x_hardware_reset(priv->reset_gpio);
807805

808806
error = ili251x_firmware_reset(client);
809807
if (error)
@@ -858,7 +856,7 @@ static ssize_t ili210x_firmware_update_store(struct device *dev,
858856
error = count;
859857

860858
exit:
861-
ili251x_hardware_reset(dev);
859+
ili210x_hardware_reset(priv->reset_gpio);
862860
dev_dbg(dev, "Firmware update ended, error=%i\n", error);
863861
enable_irq(client->irq);
864862
kfree(fwbuf);
@@ -951,9 +949,7 @@ static int ili210x_i2c_probe(struct i2c_client *client,
951949
if (error)
952950
return error;
953951

954-
usleep_range(50, 100);
955-
gpiod_set_value_cansleep(reset_gpio, 0);
956-
msleep(100);
952+
ili210x_hardware_reset(reset_gpio);
957953
}
958954

959955
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);

0 commit comments

Comments
 (0)