| # Copyright 2020 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("vs680-thermal-bind") { |
| rules = "vs680-thermal.bind" |
| output = "vs680-thermal-bind.h" |
| tests = "vs680-thermal-bind-test.json" |
| deps = [ "//src/devices/bind/fuchsia.synaptics.platform" ] |
| } |
| |
| driver_module("vs680-thermal") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "vs680-thermal.cc" ] |
| deps = [ |
| ":vs680-thermal-bind", |
| "//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.platform.device", |
| "//sdk/banjo/fuchsia.hardware.power", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_llcpp", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/lib/as370", |
| "//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/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/fidl-utils", |
| ] |
| } |
| |
| test("vs680-thermal-test-bin") { |
| configs += [ "//build/config:all_source" ] |
| output_name = "vs680-thermal-test" |
| sources = [ |
| "vs680-thermal-test.cc", |
| "vs680-thermal.cc", |
| ] |
| deps = [ |
| ":vs680-thermal-bind", |
| "//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp_mock", |
| "//sdk/banjo/fuchsia.hardware.platform.device", |
| "//sdk/banjo/fuchsia.hardware.power", |
| "//sdk/banjo/fuchsia.hardware.power:fuchsia.hardware.power_mock", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_llcpp", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/lib/as370", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/devices/testing/fake_ddk", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/hwreg", |
| "//zircon/public/lib/mock-function", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/fidl-utils", |
| "//zircon/system/ulib/mmio-ptr:mmio-ptr-fake", |
| ] |
| |
| # TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated. |
| # Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>). |
| # See linked bug for details. |
| configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ] |
| } |
| |
| fuchsia_unittest_package("vs680-thermal-test") { |
| deps = [ ":vs680-thermal-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":vs680-thermal-bind_test", |
| ":vs680-thermal-test", |
| ] |
| } |