| # 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("ti_tas58xx-bind") { |
| rules = "meta/ti_tas58xx.bind" |
| bind_output = "tas58xx.bindbc" |
| tests = "meta/tests.json" |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.gpio:fuchsia.hardware.gpio_bindlib", |
| "//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_bindlib", |
| "//src/devices/bind/fuchsia.gpio", |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/fuchsia.ti.platform", |
| ] |
| } |
| |
| fuchsia_cc_driver("tas58xx-driver") { |
| legacy = true |
| output_name = "tas58xx" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ |
| "tas58xx-inspect.cc", |
| "tas58xx.cc", |
| ] |
| deps = [ |
| ":ti_tas58xx-bind", |
| "//sdk/fidl/fuchsia.hardware.gpio:fuchsia.hardware.gpio_cpp", |
| "//sdk/lib/async:async-cpp", |
| "//sdk/lib/inspect/component/cpp", |
| "//src/devices/i2c/lib/i2c-channel-legacy", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/ti", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//src/media/audio/lib/simple-codec", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/trace", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_driver_component("tas58xx") { |
| component_name = "tas58xx" |
| deps = [ ":tas58xx-driver" ] |
| info = "meta/tas58xx-info.json" |
| manifest = "meta/tas58xx.cml" |
| } |
| |
| fuchsia_driver_package("package") { |
| package_name = "tas58xx" |
| export_to_bazel = true |
| driver_components = [ ":tas58xx" ] |
| } |
| |
| test("tas58xx-test") { |
| output_name = "tas58xx-test" |
| configs += [ "//build/config:all_source" ] |
| sources = [ |
| "tas58xx-inspect.cc", |
| "tas58xx-test.cc", |
| "tas58xx.cc", |
| ] |
| deps = [ |
| ":ti_tas58xx-bind", |
| "//sdk/fidl/fuchsia.hardware.gpio:fuchsia.hardware.gpio_cpp", |
| "//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_cpp", |
| "//sdk/lib/async-loop:async-loop-cpp", |
| "//sdk/lib/async-loop:async-loop-default", |
| "//sdk/lib/async_patterns/testing/cpp", |
| "//sdk/lib/inspect/component/cpp", |
| "//sdk/lib/inspect/testing/cpp", |
| "//src/devices/gpio/testing/fake-gpio", |
| "//src/devices/i2c/lib/i2c-channel-legacy", |
| "//src/devices/i2c/testing/mock-i2c:mock-i2c-gtest", |
| "//src/devices/lib/ti", |
| "//src/devices/testing/mock-ddk", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/predicates", |
| "//src/media/audio/lib/simple-codec", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/trace", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_unittest_package("tas58xx-test-package") { |
| package_name = "tas58xx-test" |
| deps = [ ":tas58xx-test" ] |
| |
| test_specs = { |
| environments = basic_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":tas58xx-test-package", |
| ":ti_tas58xx-bind_test", |
| ] |
| } |