| # 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("ti-lp8556-bind") { |
| rules = "ti-lp8556.bind" |
| output = "ti-lp8556-bind.h" |
| tests = "ti-lp8556-bind-test.json" |
| deps = [ "//src/devices/bind/fuchsia.ti.platform" ] |
| } |
| |
| driver_module("ti-lp8556") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "ti-lp8556.cc" ] |
| deps = [ |
| ":ti-lp8556-bind", |
| "//sdk/banjo/fuchsia.hardware.i2c", |
| "//sdk/banjo/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_banjo_cpp", |
| "//sdk/fidl/fuchsia.hardware.backlight:fuchsia.hardware.backlight_llcpp", |
| "//sdk/fidl/fuchsia.hardware.power.sensor:fuchsia.hardware.power.sensor_llcpp", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/i2c/lib/device-protocol-i2c", |
| "//src/devices/i2c/lib/device-protocol-i2c-channel", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/hwreg", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/inspect", |
| ] |
| } |
| |
| test("ti-lp8556-test") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| output_name = "ti-lp8556-test" |
| sources = [ |
| "ti-lp8556-test.cc", |
| "ti-lp8556.cc", |
| ] |
| deps = [ |
| ":ti-lp8556-bind", |
| "//sdk/fidl/fuchsia.hardware.backlight:fuchsia.hardware.backlight_llcpp", |
| "//sdk/fidl/fuchsia.hardware.power.sensor:fuchsia.hardware.power.sensor_llcpp", |
| "//sdk/lib/inspect/testing/cpp:zxtest", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/i2c/lib/device-protocol-i2c", |
| "//src/devices/i2c/lib/device-protocol-i2c-channel", |
| "//src/devices/i2c/testing/mock-i2c", |
| "//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/fidl", |
| "//zircon/public/lib/hwreg", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/async-loop", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/inspect", |
| ] |
| |
| # 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("ti-lp8556-test-package") { |
| package_name = "ti-lp8556-test" |
| deps = [ ":ti-lp8556-test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":ti-lp8556-bind_test", |
| ":ti-lp8556-test-package", |
| ] |
| } |