touchkey_hl.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef _LINUX_CYPRESS_TOUCHKEY_I2C_H
  2. #define _LINUX_CYPRESS_TOUCHKEY_I2C_H
  3. #include <linux/types.h>
  4. #ifdef CONFIG_HAS_EARLYSUSPEND
  5. #include <linux/earlysuspend.h>
  6. #endif
  7. #if defined(CONFIG_SEC_LOCALE_KOR_FRESCO)
  8. #define TK_USE_LDO_CONTROL
  9. #define TK_INFORM_CHARGER
  10. #endif
  11. #if defined(CONFIG_SEC_S_PROJECT)
  12. #define TK_USE_MAX_SUBPM_CONTROL
  13. #define TK_USE_LDO_CONTROL
  14. #define TK_LED_DIRECT_CONTORL // 0x08 firmware over..
  15. #endif
  16. #ifdef TK_INFORM_CHARGER
  17. struct touchkey_callbacks {
  18. void (*inform_charger)(struct touchkey_callbacks *, bool);
  19. };
  20. #endif
  21. struct touchkey_platform_data {
  22. int gpio_sda;
  23. int gpio_scl;
  24. int gpio_int;
  25. void (*init_platform_hw)(void);
  26. int (*suspend) (void);
  27. int (*resume) (void);
  28. int (*power_on) (bool);
  29. int (*led_power_on) (bool);
  30. int (*reset_platform_hw)(void);
  31. void (*register_cb)(void *);
  32. #ifdef GPIO_2TOUCH_RST
  33. int gpio_rst;
  34. int (*rst_reset)(void);
  35. #endif
  36. #ifdef GPIO_2_TOUCH_ID
  37. int gpio_id;
  38. #endif
  39. #ifdef TKEY_GRIP_MODE
  40. int gpio_grip;
  41. #endif
  42. #if defined(TK_USE_MAX_SUBPM_CONTROL)
  43. const char **name_of_supply;
  44. #endif
  45. };
  46. #endif /* _LINUX_CYPRESS_TOUCHKEY_I2C_H */