intel_soc_pmic.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Intel SoC PMIC Driver
  4. *
  5. * Copyright (C) 2012-2014 Intel Corporation. All rights reserved.
  6. *
  7. * Author: Yang, Bin <[email protected]>
  8. * Author: Zhu, Lejun <[email protected]>
  9. */
  10. #ifndef __INTEL_SOC_PMIC_H__
  11. #define __INTEL_SOC_PMIC_H__
  12. #include <linux/regmap.h>
  13. enum intel_cht_wc_models {
  14. INTEL_CHT_WC_UNKNOWN,
  15. INTEL_CHT_WC_GPD_WIN_POCKET,
  16. INTEL_CHT_WC_XIAOMI_MIPAD2,
  17. INTEL_CHT_WC_LENOVO_YOGABOOK1,
  18. };
  19. /**
  20. * struct intel_soc_pmic - Intel SoC PMIC data
  21. * @irq: Master interrupt number of the parent PMIC device
  22. * @regmap: Pointer to the parent PMIC device regmap structure
  23. * @irq_chip_data: IRQ chip data for the PMIC itself
  24. * @irq_chip_data_pwrbtn: Chained IRQ chip data for the Power Button
  25. * @irq_chip_data_tmu: Chained IRQ chip data for the Time Management Unit
  26. * @irq_chip_data_bcu: Chained IRQ chip data for the Burst Control Unit
  27. * @irq_chip_data_adc: Chained IRQ chip data for the General Purpose ADC
  28. * @irq_chip_data_chgr: Chained IRQ chip data for the External Charger
  29. * @irq_chip_data_crit: Chained IRQ chip data for the Critical Event Handler
  30. * @dev: Pointer to the parent PMIC device
  31. * @scu: Pointer to the SCU IPC device data structure
  32. */
  33. struct intel_soc_pmic {
  34. int irq;
  35. struct regmap *regmap;
  36. struct regmap_irq_chip_data *irq_chip_data;
  37. struct regmap_irq_chip_data *irq_chip_data_pwrbtn;
  38. struct regmap_irq_chip_data *irq_chip_data_tmu;
  39. struct regmap_irq_chip_data *irq_chip_data_bcu;
  40. struct regmap_irq_chip_data *irq_chip_data_adc;
  41. struct regmap_irq_chip_data *irq_chip_data_chgr;
  42. struct regmap_irq_chip_data *irq_chip_data_crit;
  43. struct device *dev;
  44. struct intel_scu_ipc_dev *scu;
  45. enum intel_cht_wc_models cht_wc_model;
  46. };
  47. int intel_soc_pmic_exec_mipi_pmic_seq_element(u16 i2c_address, u32 reg_address,
  48. u32 value, u32 mask);
  49. #endif /* __INTEL_SOC_PMIC_H__ */