mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
input: optimize nt36672c touch spi timing
input: modify nt36672c CS Hold Time to meet spec requirement. Change-Id: I9f24cee977f70fab7dec22e11cb6d71c4a1b61cc Reviewed-on: https://gerrit.mot.com/2435678 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jun Weng <wengjun1@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
8e73aacdfa
commit
ccaf3c7f3c
3 changed files with 28 additions and 0 deletions
|
|
@ -79,6 +79,10 @@ ifeq ($(GTP_ENABLE_DDA_STYLUS),true)
|
|||
KBUILD_OPTIONS += CONFIG_GTP_DDA_STYLUS=y
|
||||
endif
|
||||
|
||||
ifeq ($(NVT_SPI_TIMING_CTRL),true)
|
||||
KBUILD_OPTIONS += CONFIG_SPI_SM8450=y
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
ifneq ($(BOARD_USES_DOUBLE_TAP),)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES += $(KERNEL_MODULES_OUT)/sensors_class.ko
|
||||
|
|
|
|||
|
|
@ -60,6 +60,10 @@ ifneq ($(filter m y, $(CONFIG_BOARD_USES_DOUBLE_TAP_CTRL)),)
|
|||
EXTRA_CFLAGS += -DCONFIG_BOARD_USES_DOUBLE_TAP_CTRL
|
||||
endif
|
||||
|
||||
ifneq ($(filter m y, $(CONFIG_SPI_SM8450)),)
|
||||
EXTRA_CFLAGS += -DCONFIG_SPI_SM8450
|
||||
endif
|
||||
|
||||
nova_0flash_mmi-objs += nt36xxx.o
|
||||
nova_0flash_mmi-objs += nt36xxx_ext_proc.o
|
||||
nova_0flash_mmi-objs += nt36xxx_fw_update.o
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include <linux/of_irq.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/spi/spi-msm-geni.h>
|
||||
|
||||
#ifndef CONFIG_INPUT_TOUCHSCREEN_MMI
|
||||
#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL))
|
||||
|
|
@ -2752,6 +2753,7 @@ return:
|
|||
static int32_t nvt_ts_probe(struct spi_device *client)
|
||||
{
|
||||
int32_t ret = 0;
|
||||
struct spi_geni_qcom_ctrl_data *spi_param = NULL;
|
||||
#if ((TOUCH_KEY_NUM > 0) || WAKEUP_GESTURE)
|
||||
int32_t retry = 0;
|
||||
#endif
|
||||
|
|
@ -2797,6 +2799,13 @@ static int32_t nvt_ts_probe(struct spi_device *client)
|
|||
goto err_malloc_rbuf;
|
||||
}
|
||||
|
||||
spi_param = devm_kzalloc(&client->dev, sizeof(spi_param), GFP_KERNEL);
|
||||
if(spi_param == NULL) {
|
||||
NVT_ERR("devm_kzalloc for spi_param failed!\n");
|
||||
ret = -ENOMEM;
|
||||
goto err_malloc_spi_param;
|
||||
}
|
||||
|
||||
ts->client = client;
|
||||
spi_set_drvdata(client, ts);
|
||||
|
||||
|
|
@ -2828,6 +2837,12 @@ static int32_t nvt_ts_probe(struct spi_device *client)
|
|||
ts->client->controller_data = (void *)&ts->spi_ctrl;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SPI_SM8450
|
||||
/* Initialize the driver data */
|
||||
spi_param->spi_cs_clk_delay = 2;
|
||||
client->controller_data = spi_param;
|
||||
#endif
|
||||
|
||||
NVT_LOG("mode=%d, max_speed_hz=%d\n", ts->client->mode, ts->client->max_speed_hz);
|
||||
|
||||
//---parse dts---
|
||||
|
|
@ -3289,6 +3304,11 @@ err_gpio_config_failed:
|
|||
err_spi_setup:
|
||||
err_ckeck_full_duplex:
|
||||
spi_set_drvdata(client, NULL);
|
||||
if (spi_param) {
|
||||
devm_kfree(&client->dev ,spi_param);
|
||||
spi_param = NULL;
|
||||
}
|
||||
err_malloc_spi_param:
|
||||
if (ts->rbuf) {
|
||||
kfree(ts->rbuf);
|
||||
ts->rbuf = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue