intel_pmic.h 927 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __INTEL_PMIC_H
  3. #define __INTEL_PMIC_H
  4. struct pmic_table {
  5. int address; /* operation region address */
  6. int reg; /* corresponding thermal register */
  7. int bit; /* control bit for power */
  8. };
  9. struct intel_pmic_opregion_data {
  10. int (*get_power)(struct regmap *r, int reg, int bit, u64 *value);
  11. int (*update_power)(struct regmap *r, int reg, int bit, bool on);
  12. int (*get_raw_temp)(struct regmap *r, int reg);
  13. int (*update_aux)(struct regmap *r, int reg, int raw_temp);
  14. int (*get_policy)(struct regmap *r, int reg, int bit, u64 *value);
  15. int (*update_policy)(struct regmap *r, int reg, int bit, int enable);
  16. struct pmic_table *power_table;
  17. int power_table_count;
  18. struct pmic_table *thermal_table;
  19. int thermal_table_count;
  20. };
  21. int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, struct regmap *regmap, struct intel_pmic_opregion_data *d);
  22. #endif