intel_pmic.h 870 B

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