esxxx.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * esxxx.h - header for esxxx I2C interface
  3. *
  4. * Copyright (C) 2011-2012 Audience, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. *
  20. */
  21. #ifndef __ESXXX_H__
  22. #define __ESXXX_H__
  23. #include <linux/types.h>
  24. #if defined(CONFIG_SND_SOC_ES705)
  25. struct esxxx_accdet_config {
  26. int btn_serial_cfg;
  27. int btn_parallel_cfg;
  28. int btn_detection_rate;
  29. int btn_press_settling_time;
  30. int btn_bounce_time;
  31. int btn_long_press_time;
  32. };
  33. struct esxxx_platform_data {
  34. int irq_base, irq_end;
  35. int reset_gpio;
  36. int wakeup_gpio;
  37. int uart_gpio; /* uart switch */
  38. int uart_tx_gpio;
  39. int uart_rx_gpio;
  40. int gpioa_gpio;
  41. int gpiob_gpio;
  42. int accdet_gpio;
  43. int int_gpio;
  44. struct esxxx_accdet_config accdet_cfg;
  45. int (*esxxx_clk_cb) (int);
  46. };
  47. #else
  48. struct esxxx_platform_data {
  49. unsigned int irq_base, irq_end;
  50. unsigned int reset_gpio;
  51. unsigned int wakeup_gpio;
  52. unsigned int gpioa_gpio;
  53. unsigned int gpiob_gpio;
  54. unsigned int accdet_gpio;
  55. unsigned int int_gpio;
  56. struct slim_device intf_device;
  57. };
  58. #endif
  59. #endif /* __ESXXX_H__ */