Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52209dab authored by Changmin Liu's avatar Changmin Liu
Browse files

input: gt9xx: fix compiling error



Fix compiling error for new kernel baseline.

CRs-Fixed: 1002114
Change-Id: I30797b4f524cfb1e1f27fd3ab0edc98047346b32
Signed-off-by: default avatarChangmin Liu <changmil@codeaurora.org>
parent 55cb63cb
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
/* drivers/input/touchscreen/goodix_tool.c
 *
 * 2010 - 2012 Goodix Technology.
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
@@ -69,10 +69,6 @@ static void tool_set_proc_name(char *procname)
	char month[4] = {0};
	int i = 0, n_month = 1, n_day = 0, n_year = 0, ret;

	snprintf(date, 20, "%s", __DATE__);

	/* pr_debug("compile date: %s", date); */

	ret = sscanf(date, "%s %d %d", month, &n_day, &n_year);
	if (!ret)
		return;
+8 −7
Original line number Diff line number Diff line
/* drivers/input/touchscreen/gt9xx.c
 *
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 *
 * Linux Foundation chooses to take subject only to the GPLv2 license
 * terms, and distributes only under these terms.
@@ -51,6 +51,8 @@
#include <linux/module.h>
#include <linux/input/mt.h>
#include <linux/debugfs.h>
#include <linux/interrupt.h>
#include <linux/delay.h>

#define GOODIX_DEV_NAME	"Goodix-CTP"
#define CFG_MAX_TOUCH_POINTS	5
@@ -650,7 +652,7 @@ void gtp_reset_guitar(struct goodix_ts_data *ts, int ms)
	else
		gpio_direction_output(ts->pdata->irq_gpio, 0);

	usleep(RESET_DELAY_T3_US);
	usleep_range(200, 250);
	gpio_direction_output(ts->pdata->reset_gpio, 1);
	msleep(RESET_DELAY_T4);

@@ -743,7 +745,7 @@ static u8 gtp_enter_sleep(struct goodix_ts_data *ts)
		}
		return 0;
	}
	usleep(5000);
	usleep_range(5000, 5500);
	while (retry++ < GTP_I2C_RETRY_5) {
		ret = gtp_i2c_write(ts->client, i2c_control_buf, 3);
		if (ret == 1) {
@@ -812,7 +814,7 @@ err_retry:
			} else {
				ret = gpio_direction_output(
						ts->pdata->irq_gpio, 1);
				usleep(5000);
				usleep_range(5000, 5500);
			}
		}
		ret = gtp_i2c_test(ts->client);
@@ -1174,11 +1176,10 @@ Output:
static int gtp_request_irq(struct goodix_ts_data *ts)
{
	int ret = 0;
	const u8 irq_table[] = GTP_IRQ_TAB;

	ret = request_threaded_irq(ts->client->irq, NULL,
			goodix_ts_irq_handler,
			irq_table[ts->int_trigger_type],
			ts->pdata->irq_gpio_flags,
			ts->client->name, ts);
	if (ret) {
		ts->use_irq = false;
@@ -1459,7 +1460,7 @@ static int goodix_power_init(struct goodix_ts_data *ts)
			"Regulator get failed vdd ret=%d\n", ret);
	}

	ts->vcc_i2c = regulator_get(&ts->client->dev, "vcc-i2c");
	ts->vcc_i2c = regulator_get(&ts->client->dev, "vcc_i2c");
	if (IS_ERR(ts->vcc_i2c)) {
		ret = PTR_ERR(ts->vcc_i2c);
		dev_info(&ts->client->dev,
+3 −3
Original line number Diff line number Diff line
/* drivers/input/touchscreen/gt9xx.h
 *
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 *
 * Linux Foundation chooses to take subject only to the GPLv2 license
 * terms, and distributes only under these terms.
@@ -116,7 +116,7 @@ extern u16 show_len;
extern u16 total_len;

/***************************PART1:ON/OFF define*******************************/
#define GTP_CUSTOM_CFG			0
#define GTP_CUSTOM_CFG			1
#define GTP_ESD_PROTECT			0

#define GTP_IRQ_TAB            {\
@@ -130,7 +130,7 @@ extern u16 total_len;
#define GTP_IRQ_TAB_RISING	0
#define GTP_IRQ_TAB_FALLING	1
#if GTP_CUSTOM_CFG
#define GTP_MAX_HEIGHT		800
#define GTP_MAX_HEIGHT	        864
#define GTP_MAX_WIDTH		480
#define GTP_INT_TRIGGER		GTP_IRQ_TAB_RISING
#else
+2 −2
Original line number Diff line number Diff line
/* drivers/input/touchscreen/gt9xx_update.c
 *
 * 2010 - 2012 Goodix Technology.
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
@@ -389,7 +389,7 @@ s32 gup_enter_update_mode(struct i2c_client *client)

	/* step1:RST output low last at least 2ms */
	gpio_direction_output(ts->pdata->reset_gpio, 0);
	usleep(20000);
	msleep(20);

	/* step2:select I2C slave addr,INT:0--0xBA;1--0x28. */
	gpio_direction_output(ts->pdata->irq_gpio,