fan53555.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * fan53555.h - Fairchild Regulator FAN53555 Driver
  3. *
  4. * Copyright (C) 2012 Marvell Technology Ltd.
  5. * Yunfan Zhang <yfzhang@marvell.com>
  6. *
  7. * This package is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. */
  12. #ifndef __FAN53555_H__
  13. /* VSEL ID */
  14. enum {
  15. FAN53555_VSEL_ID_0 = 0,
  16. FAN53555_VSEL_ID_1,
  17. };
  18. /* Transition slew rate limiting from a low to high voltage.
  19. * -----------------------
  20. * Bin |Slew Rate(mV/uS)
  21. * ------|----------------
  22. * 000 | 64.00
  23. * ------|----------------
  24. * 001 | 32.00
  25. * ------|----------------
  26. * 010 | 16.00
  27. * ------|----------------
  28. * 011 | 8.00
  29. * ------|----------------
  30. * 100 | 4.00
  31. * ------|----------------
  32. * 101 | 2.00
  33. * ------|----------------
  34. * 110 | 1.00
  35. * ------|----------------
  36. * 111 | 0.50
  37. * -----------------------
  38. */
  39. enum {
  40. FAN53555_SLEW_RATE_64MV = 0,
  41. FAN53555_SLEW_RATE_32MV,
  42. FAN53555_SLEW_RATE_16MV,
  43. FAN53555_SLEW_RATE_8MV,
  44. FAN53555_SLEW_RATE_4MV,
  45. FAN53555_SLEW_RATE_2MV,
  46. FAN53555_SLEW_RATE_1MV,
  47. FAN53555_SLEW_RATE_0_5MV,
  48. };
  49. struct fan53555_platform_data {
  50. struct regulator_init_data *regulator;
  51. unsigned int slew_rate;
  52. /* Sleep VSEL ID */
  53. unsigned int sleep_vsel_id;
  54. };
  55. #ifdef CONFIG_REGULATOR_FAN53555
  56. int __init fan53555_regulator_init(void);
  57. #else
  58. static inline int __init fan53555_regulator_init(void) { return 0; }
  59. #endif
  60. #endif /* __FAN53555_H__ */