lp8755.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * LP8755 High Performance Power Management Unit Driver:System Interface Driver
  3. *
  4. * Copyright (C) 2012 Texas Instruments
  5. *
  6. * Author: Daniel(Geon Si) Jeong <daniel.jeong@ti.com>
  7. * G.Shark Jeong <gshark.jeong@gmail.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. *
  13. */
  14. #ifndef _LP8755_H
  15. #define _LP8755_H
  16. #include <linux/regulator/consumer.h>
  17. #define LP8755_NAME "lp8755-regulator"
  18. /*
  19. *PWR FAULT : power fault detected
  20. *OCP : over current protect activated
  21. *OVP : over voltage protect activated
  22. *TEMP_WARN : thermal warning
  23. *TEMP_SHDN : thermal shutdonw detected
  24. *I_LOAD : current measured
  25. */
  26. #define LP8755_EVENT_PWR_FAULT REGULATOR_EVENT_FAIL
  27. #define LP8755_EVENT_OCP REGULATOR_EVENT_OVER_CURRENT
  28. #define LP8755_EVENT_OVP 0x10000
  29. #define LP8755_EVENT_TEMP_WARN 0x2000
  30. #define LP8755_EVENT_TEMP_SHDN REGULATOR_EVENT_OVER_TEMP
  31. #define LP8755_EVENT_I_LOAD 0x40000
  32. enum lp8755_bucks {
  33. LP8755_BUCK0 = 0,
  34. LP8755_BUCK1,
  35. LP8755_BUCK2,
  36. LP8755_BUCK3,
  37. LP8755_BUCK4,
  38. LP8755_BUCK5,
  39. LP8755_BUCK_MAX,
  40. };
  41. /**
  42. * multiphase configuration options
  43. */
  44. enum lp8755_mphase_config {
  45. MPHASE_CONF0,
  46. MPHASE_CONF1,
  47. MPHASE_CONF2,
  48. MPHASE_CONF3,
  49. MPHASE_CONF4,
  50. MPHASE_CONF5,
  51. MPHASE_CONF6,
  52. MPHASE_CONF7,
  53. MPHASE_CONF8,
  54. MPHASE_CONF_MAX
  55. };
  56. /**
  57. * struct lp8755_platform_data
  58. * @mphase_type : Multiphase Switcher Configurations.
  59. * @buck_data : buck0~6 init voltage in uV
  60. */
  61. struct lp8755_platform_data {
  62. int mphase;
  63. struct regulator_init_data *buck_data[LP8755_BUCK_MAX];
  64. };
  65. #endif