146b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg/*
246b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg * include/linux/synaptics_i2c_rmi.h - platform data structure for f75375s sensor
346b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg *
446b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg * Copyright (C) 2008 Google, Inc.
546b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg *
646b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg * This software is licensed under the terms of the GNU General Public
746b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg * License version 2, as published by the Free Software Foundation, and
846b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg * may be copied, distributed, and modified under those terms.
946b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg *
1046b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg * This program is distributed in the hope that it will be useful,
1146b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg * but WITHOUT ANY WARRANTY; without even the implied warranty of
1246b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1346b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg * GNU General Public License for more details.
1446b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg *
1546b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg */
1646b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg
1746b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg#ifndef _LINUX_SYNAPTICS_I2C_RMI_H
1846b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg#define _LINUX_SYNAPTICS_I2C_RMI_H
1946b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg
2046b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg#define SYNAPTICS_I2C_RMI_NAME "synaptics-rmi-ts"
2146b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg
2246b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevågenum {
2346b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	SYNAPTICS_FLIP_X = 1UL << 0,
2446b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	SYNAPTICS_FLIP_Y = 1UL << 1,
2546b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	SYNAPTICS_SWAP_XY = 1UL << 2,
2646b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	SYNAPTICS_SNAP_TO_INACTIVE_EDGE = 1UL << 3,
2746b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg};
2846b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg
2946b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevågstruct synaptics_i2c_rmi_platform_data {
3046b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t version;	/* Use this entry for panels with */
3146b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg				/* (major << 8 | minor) version or above. */
3246b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg				/* If non-zero another array entry follows */
3346b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	int (*power)(int on);	/* Only valid in first array entry */
3446b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t flags;
3546b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	unsigned long irqflags;
3646b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t inactive_left; /* 0x10000 = screen width */
3746b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t inactive_right; /* 0x10000 = screen width */
3846b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t inactive_top; /* 0x10000 = screen height */
3946b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t inactive_bottom; /* 0x10000 = screen height */
4046b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t snap_left_on; /* 0x10000 = screen width */
4146b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t snap_left_off; /* 0x10000 = screen width */
4246b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t snap_right_on; /* 0x10000 = screen width */
4346b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t snap_right_off; /* 0x10000 = screen width */
4446b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t snap_top_on; /* 0x10000 = screen height */
4546b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t snap_top_off; /* 0x10000 = screen height */
4646b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t snap_bottom_on; /* 0x10000 = screen height */
4746b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t snap_bottom_off; /* 0x10000 = screen height */
4846b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t fuzz_x; /* 0x10000 = screen width */
4946b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	uint32_t fuzz_y; /* 0x10000 = screen height */
5046b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	int fuzz_p;
5146b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	int fuzz_w;
5246b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg	int8_t sensitivity_adjust;
5346b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg};
5446b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg
5546b612beaa176bb35c1007864c5f56895a5d7336Arve Hjønnevåg#endif /* _LINUX_SYNAPTICS_I2C_RMI_H */
56