diff options
author | Wendly Li <wendlyli@google.com> | 2022-01-06 07:52:19 +0000 |
---|---|---|
committer | Wendly Li <wendlyli@google.com> | 2022-01-21 03:53:14 +0000 |
commit | 0f9e7e8f390c3d06c81cac7c2a94d341a25cd896 (patch) | |
tree | 582bc6c608ebec8cfbf4631c00ee7c17970665b5 /goodix_brl_spi.c | |
parent | f4cbd1e784f777c544763bb0e2bdb65ad5c685cf (diff) | |
download | goodix_touch-0f9e7e8f390c3d06c81cac7c2a94d341a25cd896.tar.gz |
Import v1.0.0 driver
Bug: 214018056
Bug: 214118475
Change-Id: I34f2afbc46ad1e4ac025cf199f323cf09e27ddec
Signed-off-by: Wendly Li <wendlyli@google.com>
Diffstat (limited to 'goodix_brl_spi.c')
-rw-r--r-- | goodix_brl_spi.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/goodix_brl_spi.c b/goodix_brl_spi.c index 8f53776..413cd9b 100644 --- a/goodix_brl_spi.c +++ b/goodix_brl_spi.c @@ -159,11 +159,8 @@ static int goodix_spi_write(struct device *dev, unsigned int addr, int ret = 0; tx_buf = kzalloc(SPI_WRITE_PREFIX_LEN + len, GFP_KERNEL); - if (!tx_buf) { - ts_err("alloc tx_buf failed, size:%d", - SPI_WRITE_PREFIX_LEN + len); + if (!tx_buf) return -ENOMEM; - } spi_message_init(&spi_msg); memset(&xfers, 0, sizeof(xfers)); @@ -209,7 +206,7 @@ static int goodix_spi_probe(struct spi_device *spi) } /* get ic type */ - ret = goodix_get_ic_type(spi->dev.of_node); + ret = goodix_get_ic_type(spi->dev.of_node, &goodix_spi_bus); if (ret < 0) return ret; @@ -264,16 +261,16 @@ static int goodix_spi_remove(struct spi_device *spi) #ifdef CONFIG_OF static const struct of_device_id spi_matches[] = { { - .compatible = "goodix,gt9897S", + .compatible = "goodix,brl-a", }, { - .compatible = "goodix,gt9897T", + .compatible = "goodix,brl-b", }, { - .compatible = "goodix,gt9966S", + .compatible = "goodix,brl-d", }, { - .compatible = "goodix,gt9916S", + .compatible = "goodix,nottingham", }, {}, }; |