max77823.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * stbcfg01.h - Voltage regulator driver for the STBCFG01 driver
  3. *
  4. * Copyright (C) 2009-2010 Samsung Electrnoics
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #ifndef __LINUX_MFD_STBCFG01_H
  21. #define __LINUX_MFD_STBCFG01_H
  22. #include <linux/battery/sec_charger.h>
  23. #include <linux/battery/sec_fuelgauge.h>
  24. #include <linux/regulator/consumer.h>
  25. struct max77823_regulator_data {
  26. int id;
  27. struct regulator_init_data *initdata;
  28. };
  29. /* MAX77683 regulator IDs */
  30. enum max77823_regulators {
  31. MAX77823_ESAFEOUT1 = 0,
  32. MAX77823_ESAFEOUT2,
  33. MAX77823_CHARGER,
  34. MAX77823_REG_MAX,
  35. };
  36. struct max77823_platform_data {
  37. sec_battery_platform_data_t *charger_data;
  38. sec_battery_platform_data_t *fuelgauge_data;
  39. int irq_base;
  40. int irq_gpio;
  41. bool wakeup;
  42. struct mutex irqlock;
  43. struct max77823_regulator_data *regulators;
  44. int num_regulators;
  45. };
  46. extern struct max77823_regulator_data max77823_regulators[];
  47. extern int max77823_muic_set_safeout(int path);
  48. #endif /* __LINUX_MFD_MAX8998_H */