blob: f87dd56b15c8709b4303e5dd86c2bbfa5273f4e8 [file] [log] [blame]
/*
* 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_
/*
* 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_platform_data - dsx platform data
* @x_flip: x flip flag
* @y_flip: y flip flag
* @i2c_pull_up: pull up i2c bus with regulator
* @power_down_enable: enable complete regulator shutdown in suspend
* @irq_gpio: attention interrupt gpio
* @irq_flags: flags used by the irq
* @reset_flags: flags used by reset line
* @reset_gpio: reset gpio
* @disp_maxx: display panel maximum values on the x
* @disp_maxy: display panel maximum values on the y
* @disp_minx: display panel minimum values on the x
* @disp_miny: display panel minimum values on the y
* @panel_maxx: touch panel maximum values on the x
* @panel_maxy: touch panel maximum values on the y
* @panel_minx: touch panel minimum values on the x
* @panel_miny: touch panel minimum values on the y
* @reset_delay: reset delay
* @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 regulator_en;
bool purge_enabled;
bool reset_on_resume;
bool one_touch_enabled;
bool normal_mode;
bool hw_reset;
unsigned irq_gpio;
unsigned long irq_flags;
unsigned reset_gpio;
int (*gpio_config)(struct synaptics_dsx_platform_data *pdata,
bool configure);
struct synaptics_dsx_cap_button_map *cap_button_map;
};
#endif