Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / acpi / pmic / intel_pmic.h
blob006f0780ffabf08da221268a57ac43a75360203d
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __INTEL_PMIC_H
3 #define __INTEL_PMIC_H
5 #include <acpi/acpi_lpat.h>
7 struct pmic_table {
8 int address; /* operation region address */
9 int reg; /* corresponding thermal register */
10 int bit; /* control bit for power */
13 struct intel_pmic_opregion_data {
14 int (*get_power)(struct regmap *r, int reg, int bit, u64 *value);
15 int (*update_power)(struct regmap *r, int reg, int bit, bool on);
16 int (*get_raw_temp)(struct regmap *r, int reg);
17 int (*update_aux)(struct regmap *r, int reg, int raw_temp);
18 int (*get_policy)(struct regmap *r, int reg, int bit, u64 *value);
19 int (*update_policy)(struct regmap *r, int reg, int bit, int enable);
20 int (*exec_mipi_pmic_seq_element)(struct regmap *r, u16 i2c_address,
21 u32 reg_address, u32 value, u32 mask);
22 int (*lpat_raw_to_temp)(struct acpi_lpat_conversion_table *lpat_table,
23 int raw);
24 const struct pmic_table *power_table;
25 int power_table_count;
26 const struct pmic_table *thermal_table;
27 int thermal_table_count;
28 /* For generic exec_mipi_pmic_seq_element handling */
29 int pmic_i2c_address;
32 int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
33 struct regmap *regmap,
34 const struct intel_pmic_opregion_data *d);
36 #endif