mc13783.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * Copyright 2009 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
  3. *
  4. * Initial development of this code was funded by
  5. * Phytec Messtechnik GmbH, http://www.phytec.de
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. #ifndef __INCLUDE_LINUX_MFD_MC13783_H
  22. #define __INCLUDE_LINUX_MFD_MC13783_H
  23. struct mc13783;
  24. struct regulator_init_data;
  25. struct mc13783_regulator_init_data {
  26. int id;
  27. struct regulator_init_data *init_data;
  28. };
  29. struct mc13783_platform_data {
  30. struct mc13783_regulator_init_data *regulators;
  31. int num_regulators;
  32. unsigned int flags;
  33. };
  34. /* mc13783_platform_data flags */
  35. #define MC13783_USE_TOUCHSCREEN (1 << 0)
  36. #define MC13783_USE_CODEC (1 << 1)
  37. #define MC13783_USE_ADC (1 << 2)
  38. #define MC13783_USE_RTC (1 << 3)
  39. #define MC13783_USE_REGULATOR (1 << 4)
  40. int mc13783_adc_do_conversion(struct mc13783 *mc13783, unsigned int mode,
  41. unsigned int channel, unsigned int *sample);
  42. void mc13783_adc_set_ts_status(struct mc13783 *mc13783, unsigned int status);
  43. #define MC13783_SW_SW1A 0
  44. #define MC13783_SW_SW1B 1
  45. #define MC13783_SW_SW2A 2
  46. #define MC13783_SW_SW2B 3
  47. #define MC13783_SW_SW3 4
  48. #define MC13783_SW_PLL 5
  49. #define MC13783_REGU_VAUDIO 6
  50. #define MC13783_REGU_VIOHI 7
  51. #define MC13783_REGU_VIOLO 8
  52. #define MC13783_REGU_VDIG 9
  53. #define MC13783_REGU_VGEN 10
  54. #define MC13783_REGU_VRFDIG 11
  55. #define MC13783_REGU_VRFREF 12
  56. #define MC13783_REGU_VRFCP 13
  57. #define MC13783_REGU_VSIM 14
  58. #define MC13783_REGU_VESIM 15
  59. #define MC13783_REGU_VCAM 16
  60. #define MC13783_REGU_VRFBG 17
  61. #define MC13783_REGU_VVIB 18
  62. #define MC13783_REGU_VRF1 19
  63. #define MC13783_REGU_VRF2 20
  64. #define MC13783_REGU_VMMC1 21
  65. #define MC13783_REGU_VMMC2 22
  66. #define MC13783_REGU_GPO1 23
  67. #define MC13783_REGU_GPO2 24
  68. #define MC13783_REGU_GPO3 25
  69. #define MC13783_REGU_GPO4 26
  70. #define MC13783_REGU_V1 27
  71. #define MC13783_REGU_V2 28
  72. #define MC13783_REGU_V3 29
  73. #define MC13783_REGU_V4 30
  74. #endif /* __INCLUDE_LINUX_MFD_MC13783_H */