60 lines
1.6 KiB
Python
60 lines
1.6 KiB
Python
load("//build/kernel/kleaf:kernel.bzl", "ddk_headers", "ddk_module")
|
|
load("//common_drivers:amlogic_utils.bzl", "m_k_files", "kernel_select")
|
|
|
|
m_k_files()
|
|
|
|
ddk_module(
|
|
name = "amlogic-thermal",
|
|
srcs = glob([
|
|
"**/*.h",
|
|
]),
|
|
conditional_srcs = {
|
|
"CONFIG_AMLOGIC_AMLOGIC_THERMAL": {
|
|
True: [
|
|
"thermal_init.c",
|
|
"meson_tsensor.c",
|
|
"amlogic_thermal.c",
|
|
"vir_tsens.c",
|
|
],
|
|
},
|
|
"CONFIG_AMLOGIC_COOLDEV": {
|
|
True: [
|
|
"meson_cooldev.c",
|
|
],
|
|
},
|
|
"CONFIG_AMLOGIC_GPU_THERMAL": {
|
|
True: [
|
|
"gpu_cooling.c",
|
|
],
|
|
},
|
|
"CONFIG_AMLOGIC_DDR_THERMAL": {
|
|
True: [
|
|
"ddr_params.c",
|
|
"ddr_control.c",
|
|
],
|
|
},
|
|
"CONFIG_AMLOGIC_CPUCORE_THERMAL": {
|
|
True: [
|
|
"cpucore_cooling.c",
|
|
],
|
|
},
|
|
},
|
|
hdrs = [
|
|
"//common:drivers/thermal/thermal_debugfs.h",
|
|
"//common:drivers/thermal/thermal_hwmon.h",
|
|
],
|
|
linux_includes = [
|
|
"../../../common/drivers/thermal",
|
|
],
|
|
local_defines = ["pr_fmt(fmt)=\"[thermal]: \" fmt"],
|
|
out = "amlogic-thermal.ko",
|
|
kernel_build = kernel_select(),
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//common_drivers/drivers/gki_tool:amlogic-gkitool",
|
|
"//common_drivers/drivers/secmon:amlogic-secmon",
|
|
"//common_drivers/drivers/debug:amlogic-debug-iotrace",
|
|
"//common_drivers/drivers/debug:amlogic-debug",
|
|
],
|
|
)
|