blob: 5adeb65b6b3f73ca36a824b3b6e7726f591172ee [file] [log] [blame]
/*
* 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_
/*
* 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 int nbuttons;
unsigned int *map;
};
/*
* struct synaptics_dsx_platform_data - dsx platform 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
* @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_platform_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 char *regulator_name;
int (*gpio_config)(int gpio, bool configure, int dir, int state);
struct synaptics_dsx_cap_button_map *cap_button_map;
};
#endif