| // 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. |
| |
| composite buttons; |
| |
| using fuchsia.gpio; |
| using fuchsia.hardware.gpio; |
| using fuchsia.platform; |
| using fuchsia.devicetree; |
| |
| primary node "platform-device" { |
| if fuchsia.devicetree.FIRST_COMPATIBLE == "fuchsia,gpio-buttons" { |
| true; |
| } else { |
| fuchsia.BIND_PROTOCOL == fuchsia.platform.BIND_PROTOCOL.DEVICE; |
| fuchsia.BIND_PLATFORM_DEV_DID == fuchsia.platform.BIND_PLATFORM_DEV_DID.BUTTONS; |
| } |
| } |
| |
| optional node "mic-privacy" { |
| fuchsia.hardware.gpio.Service == fuchsia.hardware.gpio.Service.ZirconTransport; |
| fuchsia.gpio.FUNCTION == fuchsia.gpio.FUNCTION.MIC_MUTE; |
| } |
| |
| optional node "volume-up" { |
| fuchsia.hardware.gpio.Service == fuchsia.hardware.gpio.Service.ZirconTransport; |
| fuchsia.gpio.FUNCTION == fuchsia.gpio.FUNCTION.VOLUME_UP; |
| } |
| |
| optional node "volume-down" { |
| fuchsia.hardware.gpio.Service == fuchsia.hardware.gpio.Service.ZirconTransport; |
| fuchsia.gpio.FUNCTION == fuchsia.gpio.FUNCTION.VOLUME_DOWN; |
| } |
| |
| optional node "volume-both" { |
| fuchsia.hardware.gpio.Service == fuchsia.hardware.gpio.Service.ZirconTransport; |
| fuchsia.gpio.FUNCTION == fuchsia.gpio.FUNCTION.VOLUME_BOTH; |
| } |
| |
| optional node "power" { |
| fuchsia.hardware.gpio.Service == fuchsia.hardware.gpio.Service.ZirconTransport; |
| fuchsia.gpio.FUNCTION == fuchsia.gpio.FUNCTION.POWER; |
| } |