lp8755.h 1.5 KB

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