blob: 4dd82670309ddaf3b628244b7df0154622b3442e [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/config/fuchsia/rules.gni")
import("//build/test.gni")
import("//src/sys/build/components.gni")
bind_rules("aml-thermal-s905d2g-bind") {
rules = "aml-thermal.bind"
output = "aml-thermal-s905d2g-bind.h"
tests = "bind-tests.json"
deps = [
"//src/devices/bind/amlogic.platform",
"//src/devices/bind/fuchsia.platform",
]
}
driver_module("aml-thermal-s905d2g") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [
"aml-thermal.cc",
"aml-tsensor.cc",
]
deps = [
":aml-thermal-s905d2g-bind",
"//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.i2c",
"//sdk/banjo/fuchsia.hardware.platform.device",
"//sdk/banjo/fuchsia.hardware.pwm",
"//sdk/banjo/fuchsia.hardware.thermal",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/lib/amlogic",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/hwreg",
"//zircon/public/lib/sync",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fidl-utils",
]
}
test("aml-thermal-s905d2g-test-bin") {
configs += [ "//build/unification/config:zircon-migrated" ]
output_name = "aml-thermal-s905d2g-test"
configs += [ "//build/config:all_source" ]
sources = [
"aml-thermal-test.cc",
"aml-thermal.cc",
"aml-tsensor.cc",
]
deps = [
":aml-thermal-s905d2g-bind",
"//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.i2c",
"//sdk/banjo/fuchsia.hardware.platform.device",
"//sdk/banjo/fuchsia.hardware.pwm",
"//sdk/banjo/fuchsia.hardware.pwm:fuchsia.hardware.pwm_mock",
"//sdk/banjo/fuchsia.hardware.thermal",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/lib/amlogic",
"//src/devices/lib/mmio",
"//src/devices/testing/fake_ddk",
"//src/devices/testing/mock-mmio-reg",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/hwreg",
"//zircon/public/lib/mock-function",
"//zircon/public/lib/sync",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fidl-utils",
]
}
fuchsia_unittest_package("aml-thermal-s905d2g-test") {
deps = [ ":aml-thermal-s905d2g-test-bin" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [
":aml-thermal-s905d2g-bind_test",
":aml-thermal-s905d2g-test",
]
}