#include <linux/acpi.h>
#include <linux/init.h>
#include <linux/mfd/axp20x.h>
#include <linux/regmap.h>
#include <linux/platform_device.h>
#include <asm/iosf_mbi.h>
#include "intel_pmic.h"
#define XPOWER_GPADC_LOW …
#define XPOWER_GPI1_CTRL …
#define GPI1_LDO_MASK …
#define GPI1_LDO_ON …
#define GPI1_LDO_OFF …
#define AXP288_ADC_TS_CURRENT_ON_OFF_MASK …
#define AXP288_ADC_TS_CURRENT_OFF …
#define AXP288_ADC_TS_CURRENT_ON_WHEN_CHARGING …
#define AXP288_ADC_TS_CURRENT_ON_ONDEMAND …
#define AXP288_ADC_TS_CURRENT_ON …
static const struct pmic_table power_table[] = …;
static const struct pmic_table thermal_table[] = …;
static int intel_xpower_pmic_get_power(struct regmap *regmap, int reg,
int bit, u64 *value)
{ … }
static int intel_xpower_pmic_update_power(struct regmap *regmap, int reg,
int bit, bool on)
{ … }
static int intel_xpower_pmic_get_raw_temp(struct regmap *regmap, int reg)
{ … }
static int intel_xpower_exec_mipi_pmic_seq_element(struct regmap *regmap,
u16 i2c_address, u32 reg_address,
u32 value, u32 mask)
{ … }
static int intel_xpower_lpat_raw_to_temp(struct acpi_lpat_conversion_table *lpat_table,
int raw)
{ … }
static const struct intel_pmic_opregion_data intel_xpower_pmic_opregion_data = …;
static acpi_status intel_xpower_pmic_gpio_handler(u32 function,
acpi_physical_address address, u32 bit_width, u64 *value,
void *handler_context, void *region_context)
{ … }
static int intel_xpower_pmic_opregion_probe(struct platform_device *pdev)
{ … }
static struct platform_driver intel_xpower_pmic_opregion_driver = …;
builtin_platform_driver(…) …;