linux/drivers/usb/gadget/legacy/cdc2.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * cdc2.c -- CDC Composite driver, with ECM and ACM support
 *
 * Copyright (C) 2008 David Brownell
 * Copyright (C) 2008 Nokia Corporation
 */

#include <linux/kernel.h>
#include <linux/module.h>

#include "u_ether.h"
#include "u_serial.h"
#include "u_ecm.h"


#define DRIVER_DESC
#define DRIVER_VERSION

/*-------------------------------------------------------------------------*/

/* DO NOT REUSE THESE IDs with a protocol-incompatible driver!!  Ever!!
 * Instead:  allocate your own, using normal USB-IF procedures.
 */

/* Thanks to NetChip Technologies for donating this product ID.
 * It's for devices with only this composite CDC configuration.
 */
#define CDC_VENDOR_NUM
#define CDC_PRODUCT_NUM

USB_GADGET_COMPOSITE_OPTIONS();

USB_ETHERNET_MODULE_PARAMETERS();

/*-------------------------------------------------------------------------*/

static struct usb_device_descriptor device_desc =;

static const struct usb_descriptor_header *otg_desc[2];

/* string IDs are assigned dynamically */
static struct usb_string strings_dev[] =;

static struct usb_gadget_strings stringtab_dev =;

static struct usb_gadget_strings *dev_strings[] =;

/*-------------------------------------------------------------------------*/
static struct usb_function *f_acm;
static struct usb_function_instance *fi_serial;

static struct usb_function *f_ecm;
static struct usb_function_instance *fi_ecm;

/*
 * We _always_ have both CDC ECM and CDC ACM functions.
 */
static int cdc_do_config(struct usb_configuration *c)
{}

static struct usb_configuration cdc_config_driver =;

/*-------------------------------------------------------------------------*/

static int cdc_bind(struct usb_composite_dev *cdev)
{}

static int cdc_unbind(struct usb_composite_dev *cdev)
{}

static struct usb_composite_driver cdc_driver =;

module_usb_composite_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();