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

// SPDX-License-Identifier: GPL-2.0+
/*
 * acm_ms.c -- Composite driver, with ACM and mass storage support
 *
 * Copyright (C) 2008 David Brownell
 * Copyright (C) 2008 Nokia Corporation
 * Author: David Brownell
 * Modified: Klaus Schwarzkopf <[email protected]>
 *
 * Heavily based on multi.c and cdc2.c
 */

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

#include "u_serial.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.
 */
#define ACM_MS_VENDOR_NUM
#define ACM_MS_PRODUCT_NUM

#include "f_mass_storage.h"

/*-------------------------------------------------------------------------*/
USB_GADGET_COMPOSITE_OPTIONS();

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[] =;

/****************************** Configurations ******************************/

static struct fsg_module_parameters fsg_mod_data =;
#ifdef CONFIG_USB_GADGET_DEBUG_FILES

static unsigned int fsg_num_buffers =;

#else

/*
 * Number of buffers we will use.
 * 2 is usually enough for good buffering pipeline
 */
#define fsg_num_buffers

#endif /* CONFIG_USB_GADGET_DEBUG_FILES */

FSG_MODULE_PARAMETERS();

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

static struct usb_function_instance *fi_msg;
static struct usb_function *f_msg;

/*
 * We _always_ have both ACM and mass storage functions.
 */
static int acm_ms_do_config(struct usb_configuration *c)
{}

static struct usb_configuration acm_ms_config_driver =;

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

static int acm_ms_bind(struct usb_composite_dev *cdev)
{}

static int acm_ms_unbind(struct usb_composite_dev *cdev)
{}

static struct usb_composite_driver acm_ms_driver =;

module_usb_composite_driver();

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