thermal: Import xiaomi changes from ziyi-s-oss
Also ran clang-format on mi_thermal_interface Change-Id: I2b3ec37595c66ab9b6387a9184337ccc770047d6
This commit is contained in:
parent
29ce3e039e
commit
94a527b3ed
@ -476,6 +476,13 @@ depends on (ARCH_QCOM && OF) || COMPILE_TEST
|
||||
source "drivers/thermal/qcom/Kconfig"
|
||||
endmenu
|
||||
|
||||
config MI_THERMAL_INTERFACE
|
||||
tristate "xiaomi thermal control interface"
|
||||
depends on THERMAL
|
||||
default n
|
||||
help
|
||||
This is xiaomi thermal control interface.
|
||||
|
||||
config ZX2967_THERMAL
|
||||
tristate "Thermal sensors on zx2967 SoC"
|
||||
depends on ARCH_ZX || COMPILE_TEST
|
||||
@ -510,4 +517,21 @@ config KHADAS_MCU_FAN_THERMAL
|
||||
If you say yes here you get support for the FAN controlled
|
||||
by the Microcontroller found on the Khadas VIM boards.
|
||||
|
||||
config MI_THERMAL_MULTI_CHARGE
|
||||
tristate "enable multi charge themral interface"
|
||||
help
|
||||
Enable multi charge function in kernel, add two sysfs nodes in
|
||||
thermal_message.
|
||||
|
||||
config HAVE_CHARGE_TEMP
|
||||
tristate "enable have charge temp node in thermal interface"
|
||||
help
|
||||
Enable display charge temp node in kernel, add one node in thermal_message
|
||||
|
||||
endif
|
||||
|
||||
config HAVE_MULTI_SCREEN
|
||||
bool "Have multi screen"
|
||||
default n
|
||||
help
|
||||
Enable register two screen in driver
|
||||
|
@ -62,3 +62,5 @@ obj-$(CONFIG_UNIPHIER_THERMAL) += uniphier_thermal.o
|
||||
obj-$(CONFIG_AMLOGIC_THERMAL) += amlogic_thermal.o
|
||||
obj-$(CONFIG_SPRD_THERMAL) += sprd_thermal.o
|
||||
obj-$(CONFIG_KHADAS_MCU_FAN_THERMAL) += khadas_mcu_fan.o
|
||||
#xiaomi thermal control interface
|
||||
obj-$(CONFIG_MI_THERMAL_INTERFACE) += mi_thermal_interface.o
|
||||
|
@ -96,16 +96,18 @@ static int devfreq_cooling_set_cur_state(struct thermal_cooling_device *cdev,
|
||||
if (state == dfc->cooling_state)
|
||||
return 0;
|
||||
|
||||
dev_dbg(dev, "Setting cooling state %lu\n", state);
|
||||
printk(KERN_ERR "[ABCD] Setting cooling state %lu\n", state);
|
||||
|
||||
if (state >= dfc->freq_table_size)
|
||||
return -EINVAL;
|
||||
|
||||
freq = dfc->freq_table[state];
|
||||
|
||||
printk(KERN_ERR "[ABCD] Setting cooling freq %lu\n", freq);
|
||||
dev_pm_qos_update_request(&dfc->req_max_freq,
|
||||
DIV_ROUND_UP(freq, HZ_PER_KHZ));
|
||||
|
||||
printk(KERN_ERR "[ABCD] Setting cooling freq DIV %lu\n", DIV_ROUND_UP(freq, HZ_PER_KHZ));
|
||||
dfc->cooling_state = state;
|
||||
|
||||
return 0;
|
||||
|
1126
drivers/thermal/mi_thermal_interface.c
Normal file
1126
drivers/thermal/mi_thermal_interface.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -890,7 +890,13 @@ static int bcl_version_init(struct bcl_device *bcl_perph)
|
||||
|
||||
static void bcl_configure_bcl_peripheral(struct bcl_device *bcl_perph)
|
||||
{
|
||||
struct device_node *np;
|
||||
bcl_write_register(bcl_perph, BCL_MONITOR_EN, BIT(7));
|
||||
|
||||
np = of_find_node_by_name(NULL, "bcl-ibat");
|
||||
if (np) {
|
||||
bcl_write_register(bcl_perph, 0x59, 0x7E);
|
||||
}
|
||||
}
|
||||
|
||||
static int bcl_remove(struct platform_device *pdev)
|
||||
|
4
include/linux/soc/qcom/panel_event_notifier.h
Normal file → Executable file
4
include/linux/soc/qcom/panel_event_notifier.h
Normal file → Executable file
@ -24,6 +24,10 @@ enum panel_event_notifier_client {
|
||||
PANEL_EVENT_NOTIFIER_CLIENT_SECONDARY_TOUCH,
|
||||
PANEL_EVENT_NOTIFIER_CLIENT_ECM,
|
||||
PANEL_EVENT_NOTIFIER_CLIENT_BATTERY_CHARGER,
|
||||
PANEL_EVENT_NOTIFIER_CLIENT_THERMAL,
|
||||
PANEL_EVENT_NOTIFIER_CLIENT_THERMAL_SECOND,
|
||||
PANEL_EVENT_NOTIFIER_CLIENT_CHARGE,
|
||||
PANEL_EVENT_NOTIFIER_CLIENT_CHARGE_SECOND,
|
||||
PANEL_EVENT_NOTIFIER_CLIENT_FINGERPRINT,
|
||||
PANEL_EVENT_NOTIFIER_CLIENT_MAX
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user