linux/drivers/usb/core/phy.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * A wrapper for multiple PHYs which passes all phy_* function calls to
 * multiple (actual) PHY devices. This is comes handy when initializing
 * all PHYs on a HCD and to keep them all in the same state.
 *
 * Copyright (C) 2018 Martin Blumenstingl <[email protected]>
 */

#include <linux/device.h>
#include <linux/list.h>
#include <linux/phy/phy.h>
#include <linux/of.h>

#include "phy.h"

struct usb_phy_roothub {};

/* Allocate the roothub_entry by specific name of phy */
static int usb_phy_roothub_add_phy_by_name(struct device *dev, const char *name,
					   struct list_head *list)
{}

static int usb_phy_roothub_add_phy(struct device *dev, int index,
				   struct list_head *list)
{}

struct usb_phy_roothub *usb_phy_roothub_alloc(struct device *dev)
{}
EXPORT_SYMBOL_GPL();

/**
 * usb_phy_roothub_alloc_usb3_phy - alloc the roothub
 * @dev: the device of the host controller
 *
 * Allocate the usb phy roothub if the host use a generic usb3-phy.
 *
 * Return: On success, a pointer to the usb_phy_roothub. Otherwise,
 * %NULL if no use usb3 phy or %-ENOMEM if out of memory.
 */
struct usb_phy_roothub *usb_phy_roothub_alloc_usb3_phy(struct device *dev)
{}
EXPORT_SYMBOL_GPL();

int usb_phy_roothub_init(struct usb_phy_roothub *phy_roothub)
{}
EXPORT_SYMBOL_GPL();

int usb_phy_roothub_exit(struct usb_phy_roothub *phy_roothub)
{}
EXPORT_SYMBOL_GPL();

int usb_phy_roothub_set_mode(struct usb_phy_roothub *phy_roothub,
			     enum phy_mode mode)
{}
EXPORT_SYMBOL_GPL();

int usb_phy_roothub_calibrate(struct usb_phy_roothub *phy_roothub)
{}
EXPORT_SYMBOL_GPL();

/**
 * usb_phy_roothub_notify_connect() - connect notification
 * @phy_roothub: the phy of roothub, if the host use a generic phy.
 * @port: the port index for connect
 *
 * If the phy needs to get connection status, the callback can be used.
 * Returns: %0 if successful, a negative error code otherwise
 */
int usb_phy_roothub_notify_connect(struct usb_phy_roothub *phy_roothub, int port)
{}
EXPORT_SYMBOL_GPL();

/**
 * usb_phy_roothub_notify_disconnect() - disconnect notification
 * @phy_roothub: the phy of roothub, if the host use a generic phy.
 * @port: the port index for disconnect
 *
 * If the phy needs to get connection status, the callback can be used.
 * Returns: %0 if successful, a negative error code otherwise
 */
int usb_phy_roothub_notify_disconnect(struct usb_phy_roothub *phy_roothub, int port)
{}
EXPORT_SYMBOL_GPL();

int usb_phy_roothub_power_on(struct usb_phy_roothub *phy_roothub)
{}
EXPORT_SYMBOL_GPL();

void usb_phy_roothub_power_off(struct usb_phy_roothub *phy_roothub)
{}
EXPORT_SYMBOL_GPL();

int usb_phy_roothub_suspend(struct device *controller_dev,
			    struct usb_phy_roothub *phy_roothub)
{}
EXPORT_SYMBOL_GPL();

int usb_phy_roothub_resume(struct device *controller_dev,
			   struct usb_phy_roothub *phy_roothub)
{}
EXPORT_SYMBOL_GPL();