| // Copyright 2023 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. |
| |
| composite adc_buttons; |
| |
| using fuchsia.adc; |
| using fuchsia.hardware.adc; |
| using fuchsia.platform; |
| using fuchsia.devicetree; |
| |
| primary node "pdev" { |
| if fuchsia.devicetree.FIRST_COMPATIBLE == "fuchsia,adc-buttons" { |
| true; |
| } else { |
| fuchsia.BIND_PROTOCOL == fuchsia.platform.BIND_PROTOCOL.DEVICE; |
| fuchsia.BIND_PLATFORM_DEV_VID == fuchsia.platform.BIND_PLATFORM_DEV_VID.GENERIC; |
| fuchsia.BIND_PLATFORM_DEV_PID == fuchsia.platform.BIND_PLATFORM_DEV_PID.GENERIC; |
| fuchsia.BIND_PLATFORM_DEV_DID == fuchsia.platform.BIND_PLATFORM_DEV_DID.ADC_BUTTONS; |
| } |
| } |
| |
| optional node "adc-0" { |
| fuchsia.hardware.adc.Service == fuchsia.hardware.adc.Service.ZirconTransport; |
| fuchsia.adc.FUNCTION == fuchsia.adc.FUNCTION.BUTTON; |
| fuchsia.adc.CHANNEL == 0; |
| } |
| |
| optional node "adc-1" { |
| fuchsia.hardware.adc.Service == fuchsia.hardware.adc.Service.ZirconTransport; |
| fuchsia.adc.FUNCTION == fuchsia.adc.FUNCTION.BUTTON; |
| fuchsia.adc.CHANNEL == 1; |
| } |
| |
| optional node "adc-2" { |
| fuchsia.hardware.adc.Service == fuchsia.hardware.adc.Service.ZirconTransport; |
| fuchsia.adc.FUNCTION == fuchsia.adc.FUNCTION.BUTTON; |
| fuchsia.adc.CHANNEL == 2; |
| } |
| |
| optional node "adc-3" { |
| fuchsia.hardware.adc.Service == fuchsia.hardware.adc.Service.ZirconTransport; |
| fuchsia.adc.FUNCTION == fuchsia.adc.FUNCTION.BUTTON; |
| fuchsia.adc.CHANNEL == 3; |
| } |
| |