
It is not necessary to download these values to the maXTouch chip on every probe, since they are stored in NVRAM. It makes life difficult when tuning the device to keep them in sync with the config array/file, and requires a new kernel build for minor tweaks. These parameters only represent a tiny subset of the available configuration options, tracking all of these options in platform data would be a endless task. In addition, different versions of maXTouch chips may have these values in different places or may not even have them at all. Having these values also makes life more complex for device tree and other platforms where having to define a static configuration isn't helpful. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Acked-by: Benson Leung <bleung@chromium.org> Acked-by: Yufeng Shen <miletus@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
/*
|
|
* Atmel maXTouch Touchscreen driver
|
|
*
|
|
* Copyright (C) 2010 Samsung Electronics Co.Ltd
|
|
* Author: Joonyoung Shim <jy0922.shim@samsung.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.
|
|
*/
|
|
|
|
#ifndef __LINUX_ATMEL_MXT_TS_H
|
|
#define __LINUX_ATMEL_MXT_TS_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/* For key_map array */
|
|
#define MXT_NUM_GPIO 4
|
|
|
|
/* Orient */
|
|
#define MXT_NORMAL 0x0
|
|
#define MXT_DIAGONAL 0x1
|
|
#define MXT_HORIZONTAL_FLIP 0x2
|
|
#define MXT_ROTATED_90_COUNTER 0x3
|
|
#define MXT_VERTICAL_FLIP 0x4
|
|
#define MXT_ROTATED_90 0x5
|
|
#define MXT_ROTATED_180 0x6
|
|
#define MXT_DIAGONAL_COUNTER 0x7
|
|
|
|
/* The platform data for the Atmel maXTouch touchscreen driver */
|
|
struct mxt_platform_data {
|
|
const u8 *config;
|
|
size_t config_length;
|
|
|
|
unsigned int x_size;
|
|
unsigned int y_size;
|
|
unsigned char orient;
|
|
|
|
unsigned long irqflags;
|
|
bool is_tp;
|
|
const unsigned int key_map[MXT_NUM_GPIO];
|
|
};
|
|
|
|
#endif /* __LINUX_ATMEL_MXT_TS_H */
|