fixed.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * fixed.h
  3. *
  4. * Copyright 2008 Wolfson Microelectronics PLC.
  5. *
  6. * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
  7. *
  8. * Copyright (c) 2009 Nokia Corporation
  9. * Roger Quadros <ext-roger.quadros@nokia.com>
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of the
  14. * License, or (at your option) any later version.
  15. */
  16. #ifndef __REGULATOR_FIXED_H
  17. #define __REGULATOR_FIXED_H
  18. struct regulator_init_data;
  19. /**
  20. * struct fixed_voltage_config - fixed_voltage_config structure
  21. * @supply_name: Name of the regulator supply
  22. * @microvolts: Output voltage of regulator
  23. * @gpio: GPIO to use for enable control
  24. * set to -EINVAL if not used
  25. * @startup_delay: Start-up time in microseconds
  26. * @enable_high: Polarity of enable GPIO
  27. * 1 = Active high, 0 = Active low
  28. * @enabled_at_boot: Whether regulator has been enabled at
  29. * boot or not. 1 = Yes, 0 = No
  30. * This is used to keep the regulator at
  31. * the default state
  32. * @init_data: regulator_init_data
  33. *
  34. * This structure contains fixed voltage regulator configuration
  35. * information that must be passed by platform code to the fixed
  36. * voltage regulator driver.
  37. */
  38. struct fixed_voltage_config {
  39. const char *supply_name;
  40. int microvolts;
  41. int gpio;
  42. unsigned startup_delay;
  43. unsigned enable_high:1;
  44. unsigned enabled_at_boot:1;
  45. struct regulator_init_data *init_data;
  46. };
  47. #endif