1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <ddk/binding.h>
6 #include <ddk/debug.h>
7 #include <ddk/device.h>
8 #include <ddk/driver.h>
9 #include <ddk/platform-defs.h>
10 
11 extern zx_status_t hid_buttons_bind(void* ctx, zx_device_t* parent);
12 
13 static zx_driver_ops_t hid_buttons_driver_ops = {
14     .version = DRIVER_OPS_VERSION,
15     .bind = hid_buttons_bind,
16 };
17 
18 // clang-format off
19 ZIRCON_DRIVER_BEGIN(hid_buttons, hid_buttons_driver_ops, "zircon", "0.1", 3)
20     BI_ABORT_IF(NE, BIND_PLATFORM_DEV_VID, PDEV_VID_GENERIC),
21     BI_ABORT_IF(NE, BIND_PLATFORM_DEV_PID, PDEV_PID_GENERIC),
22     BI_MATCH_IF(EQ, BIND_PLATFORM_DEV_DID, PDEV_DID_HID_BUTTONS),
23 ZIRCON_DRIVER_END(hid_buttons)
24 // clang-format on
25