input: nova_0flash_mmi: check whether panel exists

nova_0flash_mmi:
Check whether panel exists before probe:
- reduce boot on time
- don't set touch pin state, avoid impact other touch panel

Change-Id: I63f35d5af852477e9571680834087449601c2677
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2422379
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jing Hu <hujing3@lenovo.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wangyq13 2022-11-07 15:06:26 +08:00 • committed by Yeqing Wang
commit 9b4c9f024a

View file

@ -70,6 +70,7 @@ enum touch_state {
#endif
#ifdef CONFIG_INPUT_TOUCHSCREEN_MMI
#include <linux/mmi_device.h>
extern int nvt_mmi_init(struct nvt_ts_data *ts_data, bool enable);
#endif
@ -2767,6 +2768,11 @@ static int32_t nvt_ts_probe(struct spi_device *client)
return ret;
}
#endif
#else
if (client->dev.of_node && !mmi_device_is_available(client->dev.of_node)) {
NVT_ERR("mmi: device not supported\n");
return -ENODEV;
}
#endif
NVT_LOG("start\n");