linux/drivers/usb/chipidea/udc.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * udc.h - ChipIdea UDC structures
 *
 * Copyright (C) 2008 Chipidea - MIPS Technologies, Inc. All rights reserved.
 *
 * Author: David Lopo
 */

#ifndef __DRIVERS_USB_CHIPIDEA_UDC_H
#define __DRIVERS_USB_CHIPIDEA_UDC_H

#include <linux/list.h>

#define CTRL_PAYLOAD_MAX
#define RX
#define TX

/* DMA layout of transfer descriptors */
struct ci_hw_td {} __attribute__ ((packed, aligned));

/* DMA layout of queue heads */
struct ci_hw_qh {} __attribute__ ((packed, aligned));

struct td_node {};

/**
 * struct ci_hw_req - usb request representation
 * @req: request structure for gadget drivers
 * @queue: link to QH list
 * @tds: link to TD list
 */
struct ci_hw_req {};

#ifdef CONFIG_USB_CHIPIDEA_UDC

int ci_hdrc_gadget_init(struct ci_hdrc *ci);
void ci_hdrc_gadget_destroy(struct ci_hdrc *ci);

#else

static inline int ci_hdrc_gadget_init(struct ci_hdrc *ci)
{
	return -ENXIO;
}

static inline void ci_hdrc_gadget_destroy(struct ci_hdrc *ci)
{

}

#endif

#endif /* __DRIVERS_USB_CHIPIDEA_UDC_H */