ssp_platformdata.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright (C) 2011 Samsung Electronics. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  16. * 02110-1301 USA
  17. */
  18. #ifndef _SSP_PLATFORMDATA_H_
  19. #define _SSP_PLATFORMDATA_H_
  20. /* Change revision */
  21. #define SSP_MCU_L0 0
  22. #define SSP_MCU_L5 1
  23. /* POSITION VALUES */
  24. /* K330 */
  25. #define K330_TOP_LEFT_UPPER 3
  26. #define K330_TOP_RIGHT_UPPER 0
  27. #define K330_TOP_RIGHT_LOWER 1
  28. #define K330_TOP_LEFT_LOWER 2
  29. #define K330_BOTTOM_LEFT_UPPER 5
  30. #define K330_BOTTOM_RIGHT_UPPER 4
  31. #define K330_BOTTOM_RIGHT_LOWER 7
  32. #define K330_BOTTOM_LEFT_LOWER 6
  33. /* MPU6500 */
  34. #define MPU6500_TOP_LEFT_UPPER 0
  35. #define MPU6500_TOP_RIGHT_UPPER 1
  36. #define MPU6500_TOP_RIGHT_LOWER 2
  37. #define MPU6500_TOP_LEFT_LOWER 3
  38. #define MPU6500_BOTTOM_LEFT_UPPER 4
  39. #define MPU6500_BOTTOM_RIGHT_UPPER 7
  40. #define MPU6500_BOTTOM_RIGHT_LOWER 6
  41. #define MPU6500_BOTTOM_LEFT_LOWER 5
  42. /* YAS532 */
  43. #define YAS532_TOP_LEFT_UPPER 1
  44. #define YAS532_TOP_RIGHT_UPPER 2
  45. #define YAS532_TOP_RIGHT_LOWER 3
  46. #define YAS532_TOP_LEFT_LOWER 0
  47. #define YAS532_BOTTOM_LEFT_UPPER 7
  48. #define YAS532_BOTTOM_RIGHT_UPPER 6
  49. #define YAS532_BOTTOM_RIGHT_LOWER 5
  50. #define YAS532_BOTTOM_LEFT_LOWER 4
  51. #ifdef CONFIG_SENSORS_SSP_SHTC1
  52. /**
  53. * struct cp_thm_adc_table - adc to temperature table for PAM thermistor
  54. * driver
  55. * @adc: adc value
  56. * @temperature: temperature(C) * 10
  57. */
  58. struct cp_thm_adc_table {
  59. unsigned int adc;
  60. int temperature;
  61. };
  62. #endif
  63. struct ssp_platform_data {
  64. int (*wakeup_mcu)(void);
  65. int (*check_mcu_ready)(void);
  66. int (*check_mcu_busy)(void);
  67. int (*set_mcu_reset)(int);
  68. int (*check_ap_rev)(void);
  69. int (*read_chg)(void);
  70. int (*check_changes)(void);
  71. void (*get_positions)(int *, int *);
  72. };
  73. #endif