tsu6721.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (C) 2013 Samsung Electronics
  3. * Jeongrae Kim <jryu.kim@samsung.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. *
  19. */
  20. #ifndef _TSU6721_H_
  21. #define _TSU6721_H_
  22. #include <linux/i2c/muic.h>
  23. enum {
  24. TSU6721_DETACHED,
  25. TSU6721_ATTACHED
  26. };
  27. extern struct switch_dev switch_dock;
  28. struct tsu6721_platform_data {
  29. void (*callback)(enum cable_type_t cable_type, int attached);
  30. void (*oxp_callback)(int state);
  31. void (*mhl_sel) (bool onoff);
  32. int (*dock_init) (void);
  33. int gpio_int;
  34. u32 irq_gpio_flags;
  35. int gpio_sda;
  36. u32 sda_gpio_flags;
  37. int gpio_scl;
  38. u32 scl_gpio_flags;
  39. int gpio_uart_on;
  40. u32 uarton_gpio_flags;
  41. };
  42. extern int poweroff_charging;
  43. extern int check_jig_state(void);
  44. extern struct tsu6721_platform_data tsu6721_pdata;
  45. extern void tsu6721_callback(enum cable_type_t cable_type, int attached);
  46. extern void tsu6721_oxp_callback(int state);
  47. extern int tsu6721_dock_init(void);
  48. #if defined(CONFIG_VIDEO_MHL_V2)
  49. extern int dock_det(void);
  50. #endif
  51. extern struct class *sec_class;
  52. #endif /* _TSU6721_H_ */