sm5502.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 _SM5502_H_
  21. #define _SM5502_H_
  22. #include <linux/i2c/muic.h>
  23. enum {
  24. SM5502_NONE = -1,
  25. SM5502_DETACHED = 0,
  26. SM5502_ATTACHED = 1
  27. };
  28. extern struct switch_dev switch_dock;
  29. struct sm5502_platform_data {
  30. void (*callback)(enum cable_type_t cable_type, int attached);
  31. #if defined(CONFIG_MUIC_SM5502_SUPPORT_LANHUB_TA)
  32. void (*lanhub_cb)(enum cable_type_t cable_type, int attached, bool lanhub_ta);
  33. #endif
  34. void (*oxp_callback)(int state);
  35. void (*mhl_sel) (bool onoff);
  36. int (*dock_init) (void);
  37. int gpio_int;
  38. u32 irq_gpio_flags;
  39. int gpio_sda;
  40. u32 sda_gpio_flags;
  41. int gpio_scl;
  42. u32 scl_gpio_flags;
  43. int gpio_uart_on;
  44. u32 uarton_gpio_flags;
  45. };
  46. extern int check_sm5502_jig_state(void);
  47. extern struct sm5502_platform_data sm5502_pdata;
  48. extern void sm5502_callback(enum cable_type_t cable_type, int attached);
  49. #if defined(CONFIG_MUIC_SM5502_SUPPORT_LANHUB_TA)
  50. extern void sm5502_lanhub_callback(enum cable_type_t cable_type, int attached, bool lanhub_ta);
  51. #endif
  52. extern void sm5502_oxp_callback(int state);
  53. extern int sm5502_dock_init(void);
  54. #endif /* _SM5502_H_ */