Synaptics updated driver code to V2

TP:
copy the <include/linux/input/synapics_tcm.h> to current path,
and solve the problem that the definition cannot be found.

Change-Id: I019fbcbb8df0c9435231f975b62e348a60bbb366
Reviewed-on: https://gerrit.mot.com/1470093
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
litong 2019-12-11 13:55:26 +08:00 • committed by litong20
commit 8b0324bd48
2 changed files with 65 additions and 1 deletions

View file

@ -43,7 +43,7 @@
#include <linux/input.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/input/synaptics_tcm.h>
#include "synaptics_tcm.h"
#ifdef CONFIG_FB
#include <linux/fb.h>
#include <linux/notifier.h>

View file

@ -0,0 +1,64 @@
/*
* Synaptics TCM touchscreen driver
*
* Copyright (C) 2017-2018 Synaptics Incorporated. All rights reserved.
*
* Copyright (C) 2017-2018 Scott Lin <scott.lin@tw.synaptics.com>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION DOES
* NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES, SYNAPTICS'
* TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT EXCEED ONE HUNDRED U.S.
* DOLLARS.
*/
#ifndef _SYNAPTICS_TCM_H_
#define _SYNAPTICS_TCM_H_
#define I2C_MODULE_NAME "synaptics_tcm_i2c"
#define SPI_MODULE_NAME "synaptics_tcm_spi"
struct syna_tcm_board_data {
bool x_flip;
bool y_flip;
bool swap_axes;
int irq_gpio;
int irq_on_state;
int power_gpio;
int power_on_state;
int reset_gpio;
int reset_on_state;
int tpio_reset_gpio;
unsigned int spi_mode;
unsigned int power_delay_ms;
unsigned int reset_delay_ms;
unsigned int reset_active_ms;
unsigned int byte_delay_us;
unsigned int block_delay_us;
unsigned int ubl_i2c_addr;
unsigned int ubl_max_freq;
unsigned int ubl_byte_delay_us;
unsigned long irq_flags;
const char *pwr_reg_name;
const char *bus_reg_name;
};
#endif