blob: 670f05c79aa027e96a708eb1d79487438cd47ffa [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-s905d2g-legacy-bind") {
rules = "aml-thermal-s905d2g-legacy.bind"
bind_output = "aml-thermal-s905d2g-legacy.bindbc"
tests = "aml-thermal-s905d2g-legacy-bind-test.json"
deps = [
"//sdk/fidl/fuchsia.hardware.clock:fuchsia.hardware.clock_bindlib",
"//sdk/fidl/fuchsia.hardware.pwm:fuchsia.hardware.pwm_bindlib",
"//src/devices/bind/fuchsia.amlogic.platform",
"//src/devices/bind/fuchsia.clock",
"//src/devices/bind/fuchsia.gpio",
"//src/devices/bind/fuchsia.platform",
"//src/devices/bind/fuchsia.pwm",
]
}
fuchsia_driver("aml-thermal-s905d2g-legacy-driver") {
output_name = "aml-thermal-s905d2g-legacy"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [
"aml-cpufreq.cc",
"aml-fclk-rates.c",
"aml-thermal.cc",
"aml-tsensor.cc",
"aml-voltage.cc",
]
public_deps = [ "//sdk/fidl/fuchsia.hardware.pwm:fuchsia.hardware.pwm_cpp" ]
deps = [
":aml-thermal-s905d2g-legacy-bind",
"//sdk/banjo/fuchsia.hardware.pwm:fuchsia.hardware.pwm_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.thermal:fuchsia.hardware.thermal_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.clock:fuchsia.hardware.clock_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-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-s905d2g-legacy") {
info = "aml-thermal-s905d2g-legacy-info.json"
component_name = "aml-thermal-s905d2g-legacy"
deps = [ ":aml-thermal-s905d2g-legacy-driver" ]
manifest = "meta/aml-thermal-s905d2g-legacy.cml"
}
fuchsia_driver_package("package") {
package_name = "aml-thermal-s905d2g-legacy"
driver_components = [ ":aml-thermal-s905d2g-legacy" ]
}
test("aml-thermal-s905d2g-legacy-test-bin") {
configs += [ "//build/config:all_source" ]
output_name = "aml-thermal-s905d2g-legacy-test"
sources = [
"aml-cpufreq.cc",
"aml-fclk-rates.c",
"aml-thermal-test.cc",
"aml-thermal.cc",
"aml-tsensor.cc",
"aml-voltage.cc",
]
deps = [
":aml-thermal-s905d2g-legacy-bind",
"//sdk/banjo/fuchsia.hardware.pwm:fuchsia.hardware.pwm_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.pwm:fuchsia.hardware.pwm_banjo_cpp_mock",
"//sdk/banjo/fuchsia.hardware.thermal:fuchsia.hardware.thermal_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.clock:fuchsia.hardware.clock_cpp",
"//sdk/fidl/fuchsia.hardware.pwm:fuchsia.hardware.pwm_cpp_testing",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp",
"//sdk/lib/async_patterns/testing/cpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/amlogic",
"//src/devices/lib/mmio",
"//src/devices/lib/mmio:test_helper",
"//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-default",
"//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-s905d2g-legacy-test") {
deps = [ ":aml-thermal-s905d2g-legacy-test-bin" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [
":aml-thermal-s905d2g-legacy-bind_test",
":aml-thermal-s905d2g-legacy-test",
]
}