summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlexandra Chin <alexandra.chin@tw.synaptics.com>2013-12-13 16:44:36 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:57:50 -0700
commit7ef5f9cf4e6464f7128dccd58481977a91d69400 (patch)
tree8f4b4b58011203a42a56790f9c675c77b45cf148 /include/linux
parent12cf0ae81919bbcba57aa4b0e3f421b9939a5494 (diff)
input: synaptics_dsx: Add support for synaptics_dsx touch
Change-Id: I1df8a7465fdb5c18cf69e0908347fc78ce7dd07c Git-commit: 67b7a9d78725d5de2a1899095eb0026e15343a62 Git-repo: git://github.com/synaptics-touch/synaptics-dsx-v2.1 Signed-off-by: Alexandra Chin <alexandra.chin@tw.synaptics.com> Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Diffstat (limited to 'include/linux')
-rwxr-xr-xinclude/linux/input/synaptics_dsx_v2.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/include/linux/input/synaptics_dsx_v2.h b/include/linux/input/synaptics_dsx_v2.h
new file mode 100755
index 000000000000..dc6e6be28ceb
--- /dev/null
+++ b/include/linux/input/synaptics_dsx_v2.h
@@ -0,0 +1,80 @@
+/*
+ * Synaptics DSX touchscreen driver
+ *
+ * Copyright (C) 2012 Synaptics Incorporated
+ *
+ * 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.
+ */
+
+#ifndef _SYNAPTICS_DSX_H_
+#define _SYNAPTICS_DSX_H_
+
+#define PLATFORM_DRIVER_NAME "synaptics_dsx"
+#define I2C_DRIVER_NAME "synaptics_dsx_i2c"
+#define SPI_DRIVER_NAME "synaptics_dsx_spi"
+
+/*
+ * struct synaptics_dsx_cap_button_map - 0d button map
+ * @nbuttons: number of 0d buttons
+ * @map: pointer to array of button types
+ */
+struct synaptics_dsx_cap_button_map {
+ unsigned char nbuttons;
+ unsigned char *map;
+};
+
+/*
+ * struct synaptics_dsx_board_data - dsx board data
+ * @x_flip: x flip flag
+ * @y_flip: y flip flag
+ * @irq_gpio: attention interrupt gpio
+ * @power_gpio: power switch gpio
+ * @power_on_state: power switch active state
+ * @reset_gpio: reset gpio
+ * @reset_on_state: reset active state
+ * @irq_flags: irq flags
+ * @panel_x: x-axis resolution of display panel
+ * @panel_y: y-axis resolution of display panel
+ * @power_delay_ms: delay time to wait after power-on
+ * @reset_delay_ms: delay time to wait after reset
+ * @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
+ * @regulator_name: pointer to name of regulator
+ * @gpio_config: pointer to gpio configuration function
+ * @cap_button_map: pointer to 0d button map
+ */
+struct synaptics_dsx_board_data {
+ bool x_flip;
+ bool y_flip;
+ bool swap_axes;
+ int irq_gpio;
+ int power_gpio;
+ int power_on_state;
+ int reset_gpio;
+ int reset_on_state;
+ unsigned long irq_flags;
+ 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;
+ unsigned char *regulator_name;
+ int (*gpio_config)(int gpio, bool configure, int dir, int state);
+ struct synaptics_dsx_cap_button_map *cap_button_map;
+};
+
+#endif