thermal: add Intel BXT WhiskeyCove PMIC thermal driver
PATCH v2 1/1 thermal: add Intel BXT WhiskeyCove PMIC thermal driver
This change add support for pmic thermal driver which is intended to handle the alert interrupts triggered upon thermal trip point cross and notify the thermal framework appropriately with the zone, temp, crossed trip and event details.
Signed-off-by Yegnesh S Iyer <[email protected]>
Signed-off-by Bin Gao <[email protected]>
---
Changes in v2:
- Removed unnecessary request_threaded_irq() - we should be only using devm_request_threaded_irq() with virq
drivers/thermal/Kconfig | 10 +++ drivers/thermal/Makefile | 1 + drivers/thermal/intel_pmic_thermal.c | 155 +++++++++++++++++++++++++++++++++++ include/linux/mfd/intel_soc_pmic.h | 21 +++++ 4 files changed, 187 insertions(+) create mode 100644 drivers/thermal/intel_pmic_thermal.c
drivers/thermal/Kconfig +10 -0
@@ -332,6 +332,16 @@ menu "ACPI INT340X thermal drivers" source drivers/thermal/int340x_thermal/Kconfig endmenu +config INTEL_PMIC_THERMAL + tristate "Intel PMIC thermal driver" + depends on X86 && INTEL_SOC_PMIC && REGMAP + help + Select this driver for Intel PMIC with ADC channels monitoring system + temperature measurements and alerts. + This driver is used for monitoring the ADC channels of PMIC and handles + the alert trip point interrupts and notifies the thermal framework with + the trip point and temperature details of the zone. + config INTEL_PCH_THERMAL tristate "Intel PCH Thermal Reporting Driver" depends on X86 && PCI
drivers/thermal/Makefile +1 -0
@@ -45,6 +45,7 @@ obj-$(CONFIG_INTEL_SOC_DTS_THERMAL) += intel_soc_dts_thermal.o obj-$(CONFIG_INTEL_QUARK_DTS_THERMAL) += intel_quark_dts_thermal.o obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/ obj-$(CONFIG_INT340X_THERMAL) += int340x_thermal/ +obj-$(CONFIG_INTEL_PMIC_THERMAL) += intel_pmic_thermal.o obj-$(CONFIG_INTEL_PCH_THERMAL) += intel_pch_thermal.o obj-$(CONFIG_ST_THERMAL) += st/ obj-$(CONFIG_TEGRA_SOCTHERM) += tegra/
drivers/thermal/intel_pmic_thermal.c new file +155 -0
155 lines not on this page · raw message
include/linux/mfd/intel_soc_pmic.h +21 -0
@@ -21,6 +21,27 @@#include <linux/regmap.h> +struct trip_config_map { +u16 irq_reg; +u16 irq_en; +u16 evt_stat; +u8 irq_mask; +u8 irq_en_mask; +u8 evt_mask; +u8 trip_num; +}; + +struct thermal_irq_map { +char handle[20 ]; +int num_trips; +struct trip_config_map *trip_config; +}; + +struct pmic_thermal_data { +struct thermal_irq_map *maps; +int num_maps; +}; +struct intel_soc_pmic {int irq;struct regmap *regmap;
Signature · 1 line
1.9.1
Hi
drivers/thermal/intel_pmic_thermal.c line 134
Quoted 5 lines
drivers/thermal/intel_pmic_thermal.c new file +5
-0+static int pmic_thermal_remove (struct platform_device *pdev) +{ +return 0 ; +} +
Why this remove function still requires?
Regards
Manish Badarkhe