sec_jack.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (C) 2012 Samsung Electronics, Inc.
  3. *
  4. * This software is licensed under the terms of the GNU General Public
  5. * License version 2, as published by the Free Software Foundation, and
  6. * may be copied, distributed, and modified under those terms.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. */
  14. #ifndef __ASM_ARCH_SEC_HEADSET_H
  15. #define __ASM_ARCH_SEC_HEADSET_H
  16. #ifdef __KERNEL__
  17. enum {
  18. SEC_JACK_NO_DEVICE = 0x0,
  19. SEC_HEADSET_4POLE = 0x01 << 0,
  20. SEC_HEADSET_3POLE = 0x01 << 1,
  21. #if defined(CONFIG_MACH_KLTE_JPN)
  22. SEC_EXTERNAL_ANTENNA = 0x01 << 2,
  23. #endif
  24. };
  25. struct sec_jack_zone {
  26. unsigned int adc_high;
  27. unsigned int delay_us;
  28. unsigned int check_count;
  29. unsigned int jack_type;
  30. };
  31. struct sec_jack_buttons_zone {
  32. unsigned int code;
  33. unsigned int adc_low;
  34. unsigned int adc_high;
  35. };
  36. struct sec_jack_platform_data {
  37. int det_gpio;
  38. int send_end_gpio;
  39. int ear_micbias_gpio;
  40. const char *ear_micbias_ldo;
  41. int fsa_en_gpio;
  42. bool det_active_high;
  43. bool send_end_active_high;
  44. struct qpnp_vadc_chip *vadc_dev;
  45. struct sec_jack_zone jack_zones[4];
  46. #if defined(CONFIG_SAMSUNG_JACK_VOICE_BTN)
  47. struct sec_jack_buttons_zone jack_buttons_zones[4];
  48. #else
  49. struct sec_jack_buttons_zone jack_buttons_zones[3];
  50. #endif
  51. int mpp_ch_scale[3];
  52. };
  53. #endif
  54. #endif