mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
nova_0flash_mmi: conditionally enable spi CS delay feature
Following changes are made to fix Devon build issue: - conditionally enable spi CS Hold Time feature based on product flag - include proper spi header file depending on kernel version For details please refer to: https://gerrit.mot.com/2630767 Change-Id: I7d1e6e55ccde912442f11c71f1f92e5302318315 Reviewed-on: https://gerrit.mot.com/2637062 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Bruno Oliveira <brunosoe@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
687d73d12d
commit
e5de27e68e
1 changed files with 13 additions and 0 deletions
|
|
@ -26,7 +26,14 @@
|
|||
#include <linux/of_irq.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#ifdef CONFIG_SPI_SM8450
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
|
||||
#include <linux/spi/spi-msm-geni.h>
|
||||
#else
|
||||
#include <linux/spi/spi-geni-qcom.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_INPUT_TOUCHSCREEN_MMI
|
||||
#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL))
|
||||
|
|
@ -2753,7 +2760,9 @@ return:
|
|||
static int32_t nvt_ts_probe(struct spi_device *client)
|
||||
{
|
||||
int32_t ret = 0;
|
||||
#ifdef CONFIG_SPI_SM8450
|
||||
struct spi_geni_qcom_ctrl_data *spi_param = NULL;
|
||||
#endif
|
||||
#if ((TOUCH_KEY_NUM > 0) || WAKEUP_GESTURE)
|
||||
int32_t retry = 0;
|
||||
#endif
|
||||
|
|
@ -2799,12 +2808,14 @@ static int32_t nvt_ts_probe(struct spi_device *client)
|
|||
goto err_malloc_rbuf;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_SM8450
|
||||
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;
|
||||
}
|
||||
#endif
|
||||
|
||||
ts->client = client;
|
||||
spi_set_drvdata(client, ts);
|
||||
|
|
@ -3304,11 +3315,13 @@ err_gpio_config_failed:
|
|||
err_spi_setup:
|
||||
err_ckeck_full_duplex:
|
||||
spi_set_drvdata(client, NULL);
|
||||
#ifdef CONFIG_SPI_SM8450
|
||||
if (spi_param) {
|
||||
devm_kfree(&client->dev ,spi_param);
|
||||
spi_param = NULL;
|
||||
}
|
||||
err_malloc_spi_param:
|
||||
#endif
|
||||
if (ts->rbuf) {
|
||||
kfree(ts->rbuf);
|
||||
ts->rbuf = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue