mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
input: focaltech_0flash_v2_mmi: add initial pinctrl feature support
Modify: Add focaltech_0flash_v2_mmi touchscreen driver support for pinctrl. Change-Id: Id8bf827db59cf064a174b0dae90742c53fa9c120 Reviewed-on: https://gerrit.mot.com/2380648 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wei Deng <dengwei1@motorola.com> Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
4741f3e7a1
commit
99431cfb5f
4 changed files with 38 additions and 5 deletions
|
|
@ -27,6 +27,10 @@ ifneq ($(BOARD_USES_PANEL_NOTIFICATIONS),)
|
|||
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_PANEL_NOTIFICATIONS=y
|
||||
endif
|
||||
|
||||
ifneq ($(FOCALTECH_PINCTRL_ENABLE),)
|
||||
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_PINCTRL_EN=y
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := focaltech_0flash_v2_mmi.ko
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
|
|
|||
|
|
@ -38,4 +38,8 @@ endif
|
|||
ifneq ($(filter ft8057,$(CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME)),)
|
||||
EXTRA_CFLAGS += -DCONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME_FT8057
|
||||
endif
|
||||
|
||||
ifneq ($(filter m y,$(CONFIG_INPUT_FOCALTECH_PINCTRL_EN)),)
|
||||
EXTRA_CFLAGS += -DFOCALTECH_PINCTRL_EN
|
||||
endif
|
||||
KBUILD_EXTRA_SYMBOLS += $(CURDIR)/../../kernel/msm-$(MODULE_KERNEL_VERSION)/Module.symvers
|
||||
|
|
|
|||
|
|
@ -251,8 +251,11 @@
|
|||
* Pinctrl enable
|
||||
* default: disable
|
||||
*/
|
||||
#ifdef FOCALTECH_PINCTRL_EN
|
||||
#define FTS_PINCTRL_EN 1
|
||||
#else
|
||||
#define FTS_PINCTRL_EN 0
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Customer power enable
|
||||
* enable it when customer need control TP power
|
||||
|
|
|
|||
|
|
@ -1164,10 +1164,6 @@ static int fts_buffer_init(struct fts_ts_data *ts_data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if FTS_POWER_SOURCE_CUST_EN
|
||||
/*****************************************************************************
|
||||
* Power Control
|
||||
*****************************************************************************/
|
||||
#if FTS_PINCTRL_EN
|
||||
static int fts_pinctrl_init(struct fts_ts_data *ts)
|
||||
{
|
||||
|
|
@ -1260,6 +1256,10 @@ static int fts_pinctrl_select_release(struct fts_ts_data *ts)
|
|||
}
|
||||
#endif /* FTS_PINCTRL_EN */
|
||||
|
||||
/*****************************************************************************
|
||||
* Power Control
|
||||
*****************************************************************************/
|
||||
#if FTS_POWER_SOURCE_CUST_EN
|
||||
static int fts_power_source_ctrl(struct fts_ts_data *ts_data, int enable)
|
||||
{
|
||||
int ret = 0;
|
||||
|
|
@ -1960,6 +1960,11 @@ static int fts_ts_probe_entry(struct fts_ts_data *ts_data)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if FTS_PINCTRL_EN && (!FTS_POWER_SOURCE_CUST_EN)
|
||||
fts_pinctrl_init(ts_data);
|
||||
fts_pinctrl_select_normal(ts_data);
|
||||
#endif
|
||||
|
||||
#if (!FTS_CHIP_IDC)
|
||||
fts_reset_proc(200);
|
||||
#endif
|
||||
|
|
@ -2084,6 +2089,11 @@ err_irq_req:
|
|||
err_power_init:
|
||||
fts_power_source_exit(ts_data);
|
||||
#endif
|
||||
|
||||
#if FTS_PINCTRL_EN && (!FTS_POWER_SOURCE_CUST_EN)
|
||||
fts_pinctrl_select_release(ts_data);
|
||||
#endif
|
||||
|
||||
if (gpio_is_valid(ts_data->pdata->reset_gpio))
|
||||
gpio_free(ts_data->pdata->reset_gpio);
|
||||
if (gpio_is_valid(ts_data->pdata->irq_gpio))
|
||||
|
|
@ -2173,6 +2183,10 @@ static int fts_ts_remove_entry(struct fts_ts_data *ts_data)
|
|||
fts_power_source_exit(ts_data);
|
||||
#endif
|
||||
|
||||
#if FTS_PINCTRL_EN && (!FTS_POWER_SOURCE_CUST_EN)
|
||||
fts_pinctrl_select_release(ts_data);
|
||||
#endif
|
||||
|
||||
kfree_safe(ts_data->touch_buf);
|
||||
kfree_safe(ts_data->pdata);
|
||||
kfree_safe(ts_data);
|
||||
|
|
@ -2247,6 +2261,9 @@ static int fts_ts_suspend(struct device *dev)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if FTS_PINCTRL_EN && (!FTS_POWER_SOURCE_CUST_EN)
|
||||
fts_pinctrl_select_suspend(ts_data);
|
||||
#endif
|
||||
fts_release_all_finger();
|
||||
ts_data->suspended = true;
|
||||
FTS_FUNC_EXIT();
|
||||
|
|
@ -2284,6 +2301,11 @@ static int fts_ts_resume(struct device *dev)
|
|||
fts_reset_proc(200);
|
||||
}
|
||||
|
||||
|
||||
#if FTS_PINCTRL_EN && (!FTS_POWER_SOURCE_CUST_EN)
|
||||
fts_pinctrl_select_normal(ts_data);
|
||||
#endif
|
||||
|
||||
fts_wait_tp_to_valid();
|
||||
fts_ex_mode_recovery(ts_data);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue