max8997_muic.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (C) 2012 Samsung Electronics
  3. * Lukasz Majewski <l.majewski@samsung.com>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef __MAX8997_MUIC_H_
  24. #define __MAX8997_MUIC_H_
  25. #include <power/power_chrg.h>
  26. /* MAX8997_MUIC_STATUS2 */
  27. #define MAX8997_MUIC_CHG_NO 0x00
  28. #define MAX8997_MUIC_CHG_USB 0x01
  29. #define MAX8997_MUIC_CHG_USB_D 0x02
  30. #define MAX8997_MUIC_CHG_TA 0x03
  31. #define MAX8997_MUIC_CHG_TA_500 0x04
  32. #define MAX8997_MUIC_CHG_TA_1A 0x05
  33. #define MAX8997_MUIC_CHG_MASK 0x07
  34. /* MAX 8997 MUIC registers */
  35. enum {
  36. MAX8997_MUIC_ID = 0x00,
  37. MAX8997_MUIC_INT1 = 0x01,
  38. MAX8997_MUIC_INT2 = 0x02,
  39. MAX8997_MUIC_INT3 = 0x03,
  40. MAX8997_MUIC_STATUS1 = 0x04,
  41. MAX8997_MUIC_STATUS2 = 0x05,
  42. MAX8997_MUIC_STATUS3 = 0x06,
  43. MAX8997_MUIC_INTMASK1 = 0x07,
  44. MAX8997_MUIC_INTMASK2 = 0x08,
  45. MAX8997_MUIC_INTMASK3 = 0x09,
  46. MAX8997_MUIC_CDETCTRL = 0x0A,
  47. MAX8997_MUIC_CONTROL1 = 0x0C,
  48. MAX8997_MUIC_CONTROL2 = 0x0D,
  49. MAX8997_MUIC_CONTROL3 = 0x0E,
  50. MUIC_NUM_OF_REGS = 0x0F,
  51. };
  52. #define MAX8997_MUIC_I2C_ADDR (0x4A >> 1)
  53. int power_muic_init(unsigned int bus);
  54. #endif /* __MAX8997_MUIC_H_ */