/include/linux/i2c/atmel_mxt_ts.h

https://github.com/airy09/android_kernel_sony_apq8064 · C Header · 82 lines · 50 code · 12 blank · 20 comment · 0 complexity · 064292b60d150c805af5de92dbecc8c2 MD5 · raw file

  1. /*
  2. * Atmel maXTouch Touchscreen driver
  3. *
  4. * Copyright (C) 2010 Samsung Electronics Co.Ltd
  5. * Author: Joonyoung Shim <jy0922.shim@samsung.com>
  6. * Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the
  10. * Free Software Foundation; either version 2 of the License, or (at your
  11. * option) any later version.
  12. */
  13. #ifndef __LINUX_ATMEL_MXT_TS_H
  14. #define __LINUX_ATMEL_MXT_TS_H
  15. #include <linux/types.h>
  16. /* Orient */
  17. #define MXT_NORMAL 0x0
  18. #define MXT_DIAGONAL 0x1
  19. #define MXT_HORIZONTAL_FLIP 0x2
  20. #define MXT_ROTATED_90_COUNTER 0x3
  21. #define MXT_VERTICAL_FLIP 0x4
  22. #define MXT_ROTATED_90 0x5
  23. #define MXT_ROTATED_180 0x6
  24. #define MXT_DIAGONAL_COUNTER 0x7
  25. /* MXT_TOUCH_KEYARRAY_T15 */
  26. #define MXT_KEYARRAY_MAX_KEYS 32
  27. /* Bootoader IDs */
  28. #define MXT_BOOTLOADER_ID_224 0x0A
  29. #define MXT_BOOTLOADER_ID_224E 0x06
  30. #define MXT_BOOTLOADER_ID_1386 0x01
  31. #define MXT_BOOTLOADER_ID_1386E 0x10
  32. /* Config data for a given maXTouch controller with a specific firmware */
  33. struct mxt_config_info {
  34. const u8 *config;
  35. size_t config_length;
  36. u8 family_id;
  37. u8 variant_id;
  38. u8 version;
  39. u8 build;
  40. u8 bootldr_id;
  41. /* Points to the firmware name to be upgraded to */
  42. const char *fw_name;
  43. };
  44. /* The platform data for the Atmel maXTouch touchscreen driver */
  45. struct mxt_platform_data {
  46. const struct mxt_config_info *config_array;
  47. size_t config_array_size;
  48. /* touch panel's minimum and maximum coordinates */
  49. u32 panel_minx;
  50. u32 panel_maxx;
  51. u32 panel_miny;
  52. u32 panel_maxy;
  53. /* display's minimum and maximum coordinates */
  54. u32 disp_minx;
  55. u32 disp_maxx;
  56. u32 disp_miny;
  57. u32 disp_maxy;
  58. unsigned long irqflags;
  59. bool i2c_pull_up;
  60. bool digital_pwr_regulator;
  61. int reset_gpio;
  62. u32 reset_gpio_flags;
  63. int irq_gpio;
  64. u32 irq_gpio_flags;
  65. int *key_codes;
  66. u8(*read_chg) (void);
  67. int (*init_hw) (bool);
  68. int (*power_on) (bool);
  69. };
  70. #endif /* __LINUX_ATMEL_MXT_TS_H */