blob: 7e7fdb03526b1ca68405908fc3b172a5627464b5 [file] [log] [blame]
# SPDX-License-Identifier: GPL-2.0-or-later
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("//build/kernel/kleaf:kernel.bzl", "kernel_module")
filegroup(
name = "headers",
srcs = glob([
"**/*.h",
]),
visibility = [
"//private/devices/google:__subpackages__",
"//private/google-modules/touch:__subpackages__",
],
)
filegroup(
name = "touch.common.kconfig",
srcs = [
"Kconfig",
],
visibility = [
"//private/devices/google:__subpackages__",
"//private/google-modules/soc/gs:__pkg__",
],
)
string_flag(
name = "touch_udfps_notification",
build_setting_default = "disabled",
)
config_setting(
name = "touch_udfps_notification_enabled",
flag_values = {
":touch_udfps_notification": "enabled",
},
)
config_setting(
name = "touch_udfps_notification_disabled",
flag_values = {
":touch_udfps_notification": "disabled",
},
)
kernel_module(
name = "touch.common",
srcs = glob([
"**/*.c",
"**/*.h",
]) + [
"Kbuild",
"//private/google-modules/aoc:headers",
"//private/google-modules/display/common:headers",
"//private/google-modules/display/samsung:headers",
"//private/google-modules/display/samsung/include:headers",
"//private/google-modules/fingerprint/qcom/qfs4008:headers",
"//private/google-modules/soc/gs:gs_soc_headers",
],
outs = [
"goog_touch_interface.ko",
"heatmap.ko",
"touch_bus_negotiator.ko",
"touch_offload.ko",
],
kernel_build = "//private/google-modules/soc/gs:gs_kernel_build",
visibility = [
"//private/devices/google:__subpackages__",
"//private/google-modules/soc/gs:__pkg__",
"//private/google-modules/touch:__subpackages__",
],
deps = [
"//private/google-modules/aoc",
"//private/google-modules/display/common/gs_drm",
"//private/google-modules/display/samsung:display.samsung",
"//private/google-modules/soc/gs:gs_soc_module",
] + select({
"//private/google-modules/touch/common:touch_udfps_notification_enabled": [
"//private/google-modules/fingerprint/qcom/qfs4008:qbt_handler",
],
"//private/google-modules/touch/common:touch_udfps_notification_disabled": [],
}),
)