diff options
author | Mao Li <maol@codeaurora.org> | 2016-01-15 14:07:20 +0800 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:21:11 -0700 |
commit | 1420512d46d00daea068d1c447f843d6097978f1 (patch) | |
tree | dc64a6d8b9ac809abfe5c9b9a3ec3813edfc09ba /include/linux/input | |
parent | 4101688009d0f5e540f49dc0ecbb4051f70b076b (diff) |
input: touchpanel: Add Synaptics latest version 2.6 touchpanel driver
This is the reference driver source code for synaptics touch driver,
the version is 2.6.
All the new files are copied from the git commit:
7b6b9d126aca1f371e8abf3ae56d7a5a4e538f13
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_active_pen.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_active_pen.c;
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c;
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.h
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.h;
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_fw_update.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_fw_update.c;
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_gesture.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_gesture.c;
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_i2c.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_i2c.c;
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_proximity.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_proximity.c;
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_dev.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_rmi_dev.c;
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_hid_i2c.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_rmi_hid_i2c.c;
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_spi.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_spi.c;
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_test_reporting.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_test_reporting.c
drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_video.c
is copied from
kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_video.c
include/linux/input/synaptics_dsx_v2_6.h
is copied from
kernel/include/linux/input/synaptics_dsx.h
Change-Id: Ifda2c38ca5b4a82c3363d8c59ae9da3839568e82
Signed-off-by: Mao Li <maol@codeaurora.org>
Diffstat (limited to 'include/linux/input')
-rw-r--r-- | include/linux/input/synaptics_dsx_v2_6.h | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/include/linux/input/synaptics_dsx_v2_6.h b/include/linux/input/synaptics_dsx_v2_6.h new file mode 100644 index 000000000000..7deef3551b83 --- /dev/null +++ b/include/linux/input/synaptics_dsx_v2_6.h @@ -0,0 +1,111 @@ +/* + * Synaptics DSX touchscreen driver + * + * Copyright (C) 2012-2015 Synaptics Incorporated. All rights reserved. + * + * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> + * Copyright (C) 2012 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_DSX_H_ +#define _SYNAPTICS_DSX_H_ + +#define PLATFORM_DRIVER_NAME "synaptics_dsx" +#define STYLUS_DRIVER_NAME "synaptics_dsx_stylus" +#define ACTIVE_PEN_DRIVER_NAME "synaptics_dsx_active_pen" +#define PROXIMITY_DRIVER_NAME "synaptics_dsx_proximity" +#define GESTURE_DRIVER_NAME "synaptics_dsx_gesture" +#define I2C_DRIVER_NAME "synaptics_dsx_i2c" +#define SPI_DRIVER_NAME "synaptics_dsx_spi" + +/* + * struct synaptics_dsx_button_map - button map + * @nbuttons: number of buttons + * @map: pointer to array of button codes + */ +struct synaptics_dsx_button_map { + unsigned char nbuttons; + unsigned int *map; +}; + +/* + * struct synaptics_dsx_board_data - DSX board data + * @x_flip: x flip flag + * @y_flip: y flip flag + * @swap_axes: swap axes flag + * @irq_gpio: attention interrupt GPIO + * @irq_on_state: attention interrupt active state + * @power_gpio: power switch GPIO + * @power_on_state: power switch active state + * @reset_gpio: reset GPIO + * @reset_on_state: reset active state + * @max_y_for_2d: maximum y value for 2D area when virtual buttons are present + * @irq_flags: IRQ flags + * @i2c_addr: I2C slave address + * @ub_i2c_addr: microbootloader mode I2C slave address + * @device_descriptor_addr: HID device descriptor address + * @panel_x: x-axis resolution of display panel + * @panel_y: y-axis resolution of display panel + * @power_delay_ms: delay time to wait after powering up device + * @reset_delay_ms: delay time to wait after resetting device + * @reset_active_ms: reset active time + * @byte_delay_us: delay time between two bytes of SPI data + * @block_delay_us: delay time between two SPI transfers + * @pwr_reg_name: pointer to name of regulator for power control + * @bus_reg_name: pointer to name of regulator for bus pullup control + * @cap_button_map: pointer to 0D button map + * @vir_button_map: pointer to virtual button map + */ +struct synaptics_dsx_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 max_y_for_2d; + unsigned long irq_flags; + unsigned short i2c_addr; + unsigned short ub_i2c_addr; + unsigned short device_descriptor_addr; + unsigned int panel_x; + unsigned int panel_y; + 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; + const char *pwr_reg_name; + const char *bus_reg_name; + struct synaptics_dsx_button_map *cap_button_map; + struct synaptics_dsx_button_map *vir_button_map; +}; + +#endif |