blob: b077c804c49edfb7cb4ee9848e774d151d9f326c [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/bind/bind.gni")
import("//build/components.gni")
import("//build/drivers.gni")
import("//build/test.gni")
driver_bind_rules("aml-thermal-bind") {
rules = "aml-thermal.bind"
bind_output = "aml-thermal.bindbc"
tests = "bind-tests.json"
deps = [
"//src/devices/bind/fuchsia.amlogic.platform",
"//src/devices/bind/fuchsia.platform",
]
}
fuchsia_driver("aml-thermal-driver") {
output_name = "aml-thermal"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [
"aml-thermal.cc",
"aml-tsensor.cc",
]
deps = [
":aml-thermal-bind",
"//sdk/banjo/fuchsia.hardware.thermal:fuchsia.hardware.thermal_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/amlogic",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/hwreg",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/zx",
]
}
fuchsia_driver_component("aml-thermal") {
info = "aml-thermal-info.json"
component_name = "aml-thermal"
deps = [ ":aml-thermal-driver" ]
manifest = "meta/aml-thermal.cml"
}
fuchsia_driver_package("package") {
package_name = "aml-thermal"
driver_components = [ ":aml-thermal" ]
}
test("aml-thermal-test-bin") {
output_name = "aml-thermal-test"
configs += [ "//build/config:all_source" ]
sources = [
"aml-thermal-test.cc",
"aml-thermal.cc",
"aml-tsensor.cc",
]
deps = [
":aml-thermal-bind",
"//sdk/banjo/fuchsia.hardware.thermal:fuchsia.hardware.thermal_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/amlogic",
"//src/devices/lib/mmio",
"//src/devices/testing/mock-mmio-reg:mock-mmio-reg-zxtest",
"//src/devices/testing/no_ddk",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/hwreg",
"//zircon/system/ulib/mock-function",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("aml-thermal-test") {
deps = [ ":aml-thermal-test-bin" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [
":aml-thermal-bind_test",
":aml-thermal-test",
]
}