sm5504.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (C) 2013 Samsung Electronics
  3. * Nitin Chaudhary <nc.chaudhary@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 _SM5504_H_
  21. #define _SM5504_H_
  22. #include <linux/i2c/muic.h>
  23. enum {
  24. SM5504_NONE = -1,
  25. SM5504_DETACHED = 0,
  26. SM5504_ATTACHED = 1
  27. };
  28. struct sm5504_platform_data {
  29. void (*callback)(enum cable_type_t cable_type, int attached);
  30. #if defined(CONFIG_MUIC_SM5504_SUPPORT_LANHUB_TA)
  31. void (*lanhub_cb)(enum cable_type_t cable_type, int attached, bool lanhub_ta);
  32. #endif
  33. void (*oxp_callback)(int state);
  34. void (*mhl_sel) (bool onoff);
  35. int (*dock_init) (void);
  36. int gpio_int;
  37. u32 irq_gpio_flags;
  38. int gpio_sda;
  39. u32 sda_gpio_flags;
  40. int gpio_scl;
  41. u32 scl_gpio_flags;
  42. int gpio_uart_on;
  43. u32 uarton_gpio_flags;
  44. };
  45. /*SM5504 Callback functions in sec-switch.c*/
  46. extern int check_sm5504_jig_state(void);
  47. extern struct sm5504_platform_data sm5504_pdata;
  48. extern void sm5504_callback(enum cable_type_t cable_type, int attached);
  49. extern void sm5504_oxp_callback(int state);
  50. extern int sm5504_dock_init(void);
  51. #if defined(CONFIG_MUIC_SM5504_SUPPORT_LANHUB_TA)
  52. extern void sm5504_lanhub_callback(enum cable_type_t cable_type, int attached, bool lanhub_ta);
  53. #endif
  54. #endif /* _SM5504_H_ */