blob: 13231931c31638b291e05575edfe68f906caa3fc [file] [log] [blame]
# 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/drivers.gni")
driver_bind_rules("aml-thermistor-bind") {
rules = "thermistor.bind"
header_output = "aml-thermistor-bind.h"
bind_output = "astro-thermistor.bindbc"
tests = "bind-tests.json"
deps = [
"//src/devices/bind/fuchsia.amlogic.platform",
"//src/devices/bind/fuchsia.google.platform",
]
}
fuchsia_driver("aml-thermistor-driver") {
output_name = "astro-thermistor"
defines = [ "_ALL_SOURCE" ]
configs += [ "//build/config/fuchsia:enable_zircon_asserts" ]
sources = [
"thermistor-channel.cc",
"thermistor.cc",
]
deps = [
":aml-thermistor-bind",
"//sdk/fidl/fuchsia.hardware.adc:fuchsia.hardware.adc_llcpp",
"//sdk/fidl/fuchsia.hardware.temperature:fuchsia.hardware.temperature_llcpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/amlogic",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/devices/lib/thermal",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zx",
]
}
fuchsia_driver_component("aml-thermistor") {
info = "aml-thermistor-info.json"
component_name = "astro-thermistor"
deps = [ ":aml-thermistor-driver" ]
colocate = true
}
group("tests") {
testonly = true
deps = [
":aml-thermistor-bind_test",
"test:test-package",
]
}