blob: 193b16bd81be5500ba3da84e3669a0a0e96e080e [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("ti_tas58xx-bind") {
rules = "ti_tas58xx.bind"
header_output = "ti_tas58xx-bind.h"
bind_output = "tas58xx.bindbc"
tests = "tests.json"
deps = [ "//src/devices/bind/fuchsia.ti.platform" ]
}
fuchsia_driver("tas58xx-driver") {
output_name = "tas58xx"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [ "tas58xx.cc" ]
deps = [
":ti_tas58xx-bind",
"//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp",
"//src/devices/i2c/lib/device-protocol-i2c-channel",
"//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:trace-driver",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
}
fuchsia_driver_component("tas58xx") {
component_name = "tas58xx"
deps = [ ":tas58xx-driver" ]
info = "tas58xx-info.json"
colocate = true
}
test("tas58xx-test") {
output_name = "tas58xx-test"
configs += [ "//build/config:all_source" ]
sources = [
"tas58xx-test.cc",
"tas58xx.cc",
]
deps = [
":ti_tas58xx-bind",
"//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_llcpp",
"//src/devices/i2c/lib/device-protocol-i2c-channel",
"//src/devices/i2c/testing/mock-i2c",
"//src/devices/lib/ti",
"//src/devices/testing/mock-ddk",
"//src/lib/ddk",
"//src/lib/ddktl",
"//src/media/audio/lib/simple-codec",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/trace:trace-driver",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("tas58xx-test-package") {
package_name = "tas58xx-test"
deps = [ ":tas58xx-test" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [
":tas58xx-test-package",
":ti_tas58xx-bind_test",
]
}