1
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 <stdlib.h>
6#include <string.h>
7
8#include <ddk/binding.h>
9#include <ddk/device.h>
10#include <ddk/driver.h>
11#include <ddk/protocol/nand.h>
12
13extern zx_status_t nandpart_bind(void* ctx, zx_device_t* parent);
14
15static zx_driver_ops_t nandpart_driver_ops = {
16    .version = DRIVER_OPS_VERSION,
17    .bind = nandpart_bind,
18};
19
20ZIRCON_DRIVER_BEGIN(nandpart, nandpart_driver_ops, "zircon", "0.1", 2)
21    BI_ABORT_IF(NE, BIND_PROTOCOL, ZX_PROTOCOL_NAND),
22    BI_MATCH_IF(EQ, BIND_NAND_CLASS, NAND_CLASS_PARTMAP),
23ZIRCON_DRIVER_END(nandpart)
24