mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
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:
parent
c7989e92e3
commit
329c4bc70b
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue