diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2017-07-24 15:18:15 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2017-07-28 23:34:44 +0200 |
commit | 3b63db37ad7e4672684bd686fcc3fc07b84e4fb9 (patch) | |
tree | f9cf82aa7fd7d1f2161e0a2ab88c29326c8c45de /drivers/phy/nop-phy.c | |
parent | 2080d023d90e2972f82dfde624d209cf5a0c569c (diff) |
phy: add a NO-OP phy driver
This driver is used to stub PHY operations in a driver (USB, SATA).
This is useful when the 'client' driver (USB, SATA, ...) uses the PHY
framework and there is no actual PHY harwdare to drive.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'drivers/phy/nop-phy.c')
-rw-r--r-- | drivers/phy/nop-phy.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/phy/nop-phy.c b/drivers/phy/nop-phy.c new file mode 100644 index 0000000000..2201cc35bf --- /dev/null +++ b/drivers/phy/nop-phy.c @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/ + * Written by Jean-Jacques Hiblot <jjhiblot@ti.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <dm.h> +#include <dm/device.h> +#include <generic-phy.h> + +static const struct udevice_id nop_phy_ids[] = { + { .compatible = "nop-phy" }, + { } +}; + +static struct phy_ops nop_phy_ops = { +}; + +U_BOOT_DRIVER(nop_phy) = { + .name = "nop_phy", + .id = UCLASS_PHY, + .of_match = nop_phy_ids, + .ops = &nop_phy_ops, +}; |