1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 16:22:36 +02:00

input: goodix: Fix address initialization

Pinetab2 has a different address than 0x14 configured by holding IRQ
line high.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
This commit is contained in:
Ondrej Jirman
2025-01-31 02:06:00 +01:00
parent 945123ae81
commit cbff60799f

View File

@@ -365,6 +365,7 @@ static int goodix_stop(struct udevice *dev)
static int goodix_probe(struct udevice *dev)
{
struct touchpanel_priv *uc_priv = dev_get_uclass_priv(dev);
struct dm_i2c_chip *chip = dev_get_parent_plat(dev);
struct goodix_priv *ts = dev_get_priv(dev);
int ret;
@@ -416,8 +417,8 @@ static int goodix_probe(struct udevice *dev)
udelay(30 * 1000);
if (dm_gpio_is_valid(&ts->reset_gpio)) {
// select address 0x14
ret = dm_gpio_set_value(&ts->irq_gpio, 1);
// select address
ret = dm_gpio_set_value(&ts->irq_gpio, chip->chip_addr == 0x14 ? 1 : 0);
if (ret)
return ret;