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

// SPDX-License-Identifier: GPL-2.0
/*
 * nokia.c -- Nokia Composite Gadget Driver
 *
 * Copyright (C) 2008-2010 Nokia Corporation
 * Contact: Felipe Balbi <[email protected]>
 *
 * This gadget driver borrows from serial.c which is:
 *
 * Copyright (C) 2003 Al Borchers ([email protected])
 * Copyright (C) 2008 by David Brownell
 * Copyright (C) 2008 by Nokia Corporation
 */

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

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

/* Defines */

#define NOKIA_VERSION_NUM
#define NOKIA_LONG_NAME

USB_GADGET_COMPOSITE_OPTIONS();

USB_ETHERNET_MODULE_PARAMETERS();

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_DEBUG */

FSG_MODULE_PARAMETERS();

#define NOKIA_VENDOR_ID
#define NOKIA_PRODUCT_ID

/* string IDs are assigned dynamically */

#define STRING_DESCRIPTION_IDX

static char manufacturer_nokia[] =;
static const char description_nokia[] =;

static struct usb_string strings_dev[] =;

static struct usb_gadget_strings stringtab_dev =;

static struct usb_gadget_strings *dev_strings[] =;

static struct usb_device_descriptor device_desc =;

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

/* Module */
MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();

/*-------------------------------------------------------------------------*/
static struct usb_function *f_acm_cfg1;
static struct usb_function *f_acm_cfg2;
static struct usb_function *f_ecm_cfg1;
static struct usb_function *f_ecm_cfg2;
static struct usb_function *f_obex1_cfg1;
static struct usb_function *f_obex2_cfg1;
static struct usb_function *f_obex1_cfg2;
static struct usb_function *f_obex2_cfg2;
static struct usb_function *f_phonet_cfg1;
static struct usb_function *f_phonet_cfg2;
static struct usb_function *f_msg_cfg1;
static struct usb_function *f_msg_cfg2;


static struct usb_configuration nokia_config_500ma_driver =;

static struct usb_configuration nokia_config_100ma_driver =;

static struct usb_function_instance *fi_acm;
static struct usb_function_instance *fi_ecm;
static struct usb_function_instance *fi_obex1;
static struct usb_function_instance *fi_obex2;
static struct usb_function_instance *fi_phonet;
static struct usb_function_instance *fi_msg;

static int nokia_bind_config(struct usb_configuration *c)
{}

static int nokia_bind(struct usb_composite_dev *cdev)
{}

static int nokia_unbind(struct usb_composite_dev *cdev)
{}

static struct usb_composite_driver nokia_driver =;

module_usb_composite_driver();