dlkm: Add check if panel is available for gt9916s

- Add if panel is available logic for gt9916s with
using spi bus.

Change-Id: I0489672829c2e411f58a1799e35cf05024f7a75b
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2108636
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wengjun1 2021-11-05 16:16:31 +08:00 • committed by Jun Weng
commit 329c4bc70b

View file

@ -19,6 +19,8 @@
#include <linux/spi/spi.h>
#include "goodix_ts_core.h"
#include <linux/mmi_device.h>
#define TS_DRIVER_NAME "goodix_ts"
#define SPI_TRANS_PREFIX_LEN 1
@ -197,6 +199,11 @@ static int goodix_spi_probe(struct spi_device *spi)
ts_info("goodix spi probe in");
if (spi->dev.of_node && !mmi_device_is_available(spi->dev.of_node)) {
ts_err("%s mmi: device not supported\n", __func__);
return -ENODEV;
}
/* init spi_device */
spi->mode = SPI_MODE_0;
spi->bits_per_word = 8;