1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2015 National Instruments
9 static int nulldev_serial_setbrg(struct udevice *dev, int baudrate)
14 static int nulldev_serial_getc(struct udevice *dev)
19 static int nulldev_serial_pending(struct udevice *dev, bool input)
24 static int nulldev_serial_putc(struct udevice *dev, const char ch)
29 static const struct udevice_id nulldev_serial_ids[] = {
30 { .compatible = "nulldev-serial" },
34 const struct dm_serial_ops nulldev_serial_ops = {
35 .putc = nulldev_serial_putc,
36 .pending = nulldev_serial_pending,
37 .getc = nulldev_serial_getc,
38 .setbrg = nulldev_serial_setbrg,
41 U_BOOT_DRIVER(serial_nulldev) = {
42 .name = "serial_nulldev",
44 .of_match = nulldev_serial_ids,
45 .ops = &nulldev_serial_ops,