Commit 8840cbd3 authored by Kyungmin Park's avatar Kyungmin Park Committed by Tony Lindgren

Fix tsx210x detection

If the return value is all 0xff, it means there's no device.
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 0f974aa1
......@@ -1092,6 +1092,11 @@ static int tsc210x_probe(struct spi_device *spi, enum tsc_type type)
dev_dbg(&dev->spi->dev, "revision, err %d\n", err);
goto err_spi;
}
if (reg == 0xffff) {
err = -ENODEV;
dev_dbg(&dev->spi->dev, "no device, err %d\n", err);
goto err_spi;
}
dev_info(&spi->dev, "rev %d, irq %d\n", reg & 0x0007, spi->irq);
err = tsc210x_configure(dev);
......
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