| # 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("as370_power-bind") { |
| rules = "as370_power.bind" |
| output = "as370_power-bind.h" |
| tests = "tests.json" |
| deps = [ "//src/devices/bind/fuchsia.synaptics.platform" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":as370-power-test" ] |
| } |
| |
| driver_module("as370-power") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "as370-power.cc" ] |
| deps = [ |
| ":as370_power-bind", |
| "//sdk/banjo/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.platform.device", |
| "//sdk/banjo/fuchsia.hardware.powerimpl", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/i2c/lib/device-protocol-i2c", |
| "//src/devices/lib/as370", |
| "//src/devices/lib/driver", |
| "//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", |
| ] |
| } |
| |
| test("as370-power-test-bin") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| output_name = "as370-power-test" |
| sources = [ |
| "as370-power-test.cc", |
| "as370-power.cc", |
| ] |
| deps = [ |
| ":as370_power-bind", |
| "//sdk/banjo/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.platform.device", |
| "//sdk/banjo/fuchsia.hardware.powerimpl", |
| "//sdk/lib/fdio", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/i2c/lib/device-protocol-i2c", |
| "//src/devices/i2c/testing/mock-i2c", |
| "//src/devices/lib/as370", |
| "//src/devices/testing/no_ddk", |
| "//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", |
| ] |
| } |
| |
| fuchsia_unittest_package("as370-power-test") { |
| deps = [ ":as370-power-test-bin" ] |
| } |