core.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Definitions for DA9063 MFD driver
  3. *
  4. * Copyright 2012 Dialog Semiconductor Ltd.
  5. *
  6. * Author: Michal Hajduk <michal.hajduk@diasemi.com>
  7. * Krystian Garbaciak <krystian.garbaciak@diasemi.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the
  11. * Free Software Foundation; either version 2 of the License, or (at your
  12. * option) any later version.
  13. *
  14. */
  15. #ifndef __MFD_DA9063_CORE_H__
  16. #define __MFD_DA9063_CORE_H__
  17. #include <linux/interrupt.h>
  18. #include <linux/mfd/da9063/registers.h>
  19. /* DA9063 modules */
  20. #define DA9063_DRVNAME_CORE "da9063-core"
  21. #define DA9063_DRVNAME_REGULATORS "da9063-regulators"
  22. #define DA9063_DRVNAME_LEDS "da9063-leds"
  23. #define DA9063_DRVNAME_WATCHDOG "da9063-watchdog"
  24. #define DA9063_DRVNAME_HWMON "da9063-hwmon"
  25. #define DA9063_DRVNAME_ONKEY "da9063-onkey"
  26. #define DA9063_DRVNAME_RTC "da9063-rtc"
  27. #define DA9063_DRVNAME_VIBRATION "da9063-vibration"
  28. enum da9063_models {
  29. PMIC_DA9063 = 0x61,
  30. };
  31. struct da9063 {
  32. /* Device */
  33. struct device *dev;
  34. unsigned short model;
  35. unsigned short revision;
  36. unsigned int flags;
  37. /* Control interface */
  38. struct regmap *regmap;
  39. /* Interrupts */
  40. int chip_irq;
  41. unsigned int irq_base;
  42. };
  43. int da9063_device_init(struct da9063 *da9063, unsigned int irq);
  44. void da9063_device_exit(struct da9063 *da9063);
  45. #endif /* __MFD_DA9063_CORE_H__ */