Linux Audio

Check our new training course

Loading...
v6.8
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef __INTEL_PMIC_H
 3#define __INTEL_PMIC_H
 4
 5#include <acpi/acpi_lpat.h>
 6
 7struct pmic_table {
 8	int address;	/* operation region address */
 9	int reg;	/* corresponding thermal register */
10	int bit;	/* control bit for power */
11};
12
13struct 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	struct pmic_table *power_table;
25	int power_table_count;
26	struct pmic_table *thermal_table;
27	int thermal_table_count;
28	/* For generic exec_mipi_pmic_seq_element handling */
29	int pmic_i2c_address;
30};
31
32int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
33					struct regmap *regmap,
34					const struct intel_pmic_opregion_data *d);
35
36#endif
v4.6
 
 1#ifndef __INTEL_PMIC_H
 2#define __INTEL_PMIC_H
 3
 
 
 4struct pmic_table {
 5	int address;	/* operation region address */
 6	int reg;	/* corresponding thermal register */
 7	int bit;	/* control bit for power */
 8};
 9
10struct intel_pmic_opregion_data {
11	int (*get_power)(struct regmap *r, int reg, int bit, u64 *value);
12	int (*update_power)(struct regmap *r, int reg, int bit, bool on);
13	int (*get_raw_temp)(struct regmap *r, int reg);
14	int (*update_aux)(struct regmap *r, int reg, int raw_temp);
15	int (*get_policy)(struct regmap *r, int reg, u64 *value);
16	int (*update_policy)(struct regmap *r, int reg, int enable);
 
 
 
 
17	struct pmic_table *power_table;
18	int power_table_count;
19	struct pmic_table *thermal_table;
20	int thermal_table_count;
 
 
21};
22
23int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, struct regmap *regmap, struct intel_pmic_opregion_data *d);
 
 
24
25#endif