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 #include <ddk/binding.h> 5 #include <ddk/device.h> 6 #include <ddk/driver.h> 7 #include <ddk/platform-defs.h> 8 #include <stdlib.h> 9 #include <string.h> 10 11 extern zx_status_t rtl8211f_bind(void* ctx, zx_device_t* parent); 12 13 static zx_driver_ops_t rtl8211f_driver_ops = { 14 .version = DRIVER_OPS_VERSION, 15 .bind = rtl8211f_bind, 16 }; 17 18 // clang-format off 19 ZIRCON_DRIVER_BEGIN(rtl8211f, rtl8211f_driver_ops, "rtl8211-phy", "0.1", 3) 20 BI_ABORT_IF(NE, BIND_PLATFORM_DEV_VID, PDEV_VID_REALTEK), 21 BI_ABORT_IF(NE, BIND_PLATFORM_DEV_PID, PDEV_PID_RTL8211F), 22 BI_MATCH_IF(EQ, BIND_PLATFORM_DEV_DID, PDEV_DID_ETH_PHY), 23 ZIRCON_DRIVER_END(rtl8211f) 24