Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Intel SoC PMIC Driver
0004  *
0005  * Copyright (C) 2012-2014 Intel Corporation. All rights reserved.
0006  *
0007  * Author: Yang, Bin <bin.yang@intel.com>
0008  * Author: Zhu, Lejun <lejun.zhu@linux.intel.com>
0009  */
0010 
0011 #ifndef __INTEL_SOC_PMIC_H__
0012 #define __INTEL_SOC_PMIC_H__
0013 
0014 #include <linux/regmap.h>
0015 
0016 enum intel_cht_wc_models {
0017     INTEL_CHT_WC_UNKNOWN,
0018     INTEL_CHT_WC_GPD_WIN_POCKET,
0019     INTEL_CHT_WC_XIAOMI_MIPAD2,
0020     INTEL_CHT_WC_LENOVO_YOGABOOK1,
0021 };
0022 
0023 /**
0024  * struct intel_soc_pmic - Intel SoC PMIC data
0025  * @irq: Master interrupt number of the parent PMIC device
0026  * @regmap: Pointer to the parent PMIC device regmap structure
0027  * @irq_chip_data: IRQ chip data for the PMIC itself
0028  * @irq_chip_data_pwrbtn: Chained IRQ chip data for the Power Button
0029  * @irq_chip_data_tmu: Chained IRQ chip data for the Time Management Unit
0030  * @irq_chip_data_bcu: Chained IRQ chip data for the Burst Control Unit
0031  * @irq_chip_data_adc: Chained IRQ chip data for the General Purpose ADC
0032  * @irq_chip_data_chgr: Chained IRQ chip data for the External Charger
0033  * @irq_chip_data_crit: Chained IRQ chip data for the Critical Event Handler
0034  * @dev: Pointer to the parent PMIC device
0035  * @scu: Pointer to the SCU IPC device data structure
0036  */
0037 struct intel_soc_pmic {
0038     int irq;
0039     struct regmap *regmap;
0040     struct regmap_irq_chip_data *irq_chip_data;
0041     struct regmap_irq_chip_data *irq_chip_data_pwrbtn;
0042     struct regmap_irq_chip_data *irq_chip_data_tmu;
0043     struct regmap_irq_chip_data *irq_chip_data_bcu;
0044     struct regmap_irq_chip_data *irq_chip_data_adc;
0045     struct regmap_irq_chip_data *irq_chip_data_chgr;
0046     struct regmap_irq_chip_data *irq_chip_data_crit;
0047     struct device *dev;
0048     struct intel_scu_ipc_dev *scu;
0049     enum intel_cht_wc_models cht_wc_model;
0050 };
0051 
0052 int intel_soc_pmic_exec_mipi_pmic_seq_element(u16 i2c_address, u32 reg_address,
0053                           u32 value, u32 mask);
0054 
0055 #endif  /* __INTEL_SOC_PMIC_H__ */