#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/mfd/core.h>
#include <linux/mfd/dln2.h>
#include <linux/rculist.h>
struct dln2_header { … };
struct dln2_response { … };
#define DLN2_GENERIC_MODULE_ID …
#define DLN2_GENERIC_CMD(cmd) …
#define CMD_GET_DEVICE_VER …
#define CMD_GET_DEVICE_SN …
#define DLN2_HW_ID …
#define DLN2_USB_TIMEOUT …
#define DLN2_MAX_RX_SLOTS …
#define DLN2_MAX_URBS …
#define DLN2_RX_BUF_SIZE …
enum dln2_handle { … };
struct dln2_rx_context { … };
struct dln2_mod_rx_slots { … };
struct dln2_dev { … };
struct dln2_event_cb_entry { … };
int dln2_register_event_cb(struct platform_device *pdev, u16 id,
dln2_event_cb_t event_cb)
{ … }
EXPORT_SYMBOL(…);
void dln2_unregister_event_cb(struct platform_device *pdev, u16 id)
{ … }
EXPORT_SYMBOL(…);
static bool dln2_transfer_complete(struct dln2_dev *dln2, struct urb *urb,
u16 handle, u16 rx_slot)
{ … }
static void dln2_run_event_callbacks(struct dln2_dev *dln2, u16 id, u16 echo,
void *data, int len)
{ … }
static void dln2_rx(struct urb *urb)
{ … }
static void *dln2_prep_buf(u16 handle, u16 cmd, u16 echo, const void *obuf,
int *obuf_len, gfp_t gfp)
{ … }
static int dln2_send_wait(struct dln2_dev *dln2, u16 handle, u16 cmd, u16 echo,
const void *obuf, int obuf_len)
{ … }
static bool find_free_slot(struct dln2_dev *dln2, u16 handle, int *slot)
{ … }
static int alloc_rx_slot(struct dln2_dev *dln2, u16 handle)
{ … }
static void free_rx_slot(struct dln2_dev *dln2, u16 handle, int slot)
{ … }
static int _dln2_transfer(struct dln2_dev *dln2, u16 handle, u16 cmd,
const void *obuf, unsigned obuf_len,
void *ibuf, unsigned *ibuf_len)
{ … }
int dln2_transfer(struct platform_device *pdev, u16 cmd,
const void *obuf, unsigned obuf_len,
void *ibuf, unsigned *ibuf_len)
{ … }
EXPORT_SYMBOL(…);
static int dln2_check_hw(struct dln2_dev *dln2)
{ … }
static int dln2_print_serialno(struct dln2_dev *dln2)
{ … }
static int dln2_hw_init(struct dln2_dev *dln2)
{ … }
static void dln2_free_rx_urbs(struct dln2_dev *dln2)
{ … }
static void dln2_stop_rx_urbs(struct dln2_dev *dln2)
{ … }
static void dln2_free(struct dln2_dev *dln2)
{ … }
static int dln2_setup_rx_urbs(struct dln2_dev *dln2,
struct usb_host_interface *hostif)
{ … }
static int dln2_start_rx_urbs(struct dln2_dev *dln2, gfp_t gfp)
{ … }
enum { … };
static struct dln2_platform_data dln2_pdata_gpio = …;
static struct mfd_cell_acpi_match dln2_acpi_match_gpio = …;
static struct dln2_platform_data dln2_pdata_i2c = …;
static struct mfd_cell_acpi_match dln2_acpi_match_i2c = …;
static struct dln2_platform_data dln2_pdata_spi = …;
static struct mfd_cell_acpi_match dln2_acpi_match_spi = …;
static struct dln2_platform_data dln2_pdata_adc = …;
static struct mfd_cell_acpi_match dln2_acpi_match_adc = …;
static const struct mfd_cell dln2_devs[] = …;
static void dln2_stop(struct dln2_dev *dln2)
{ … }
static void dln2_disconnect(struct usb_interface *interface)
{ … }
static int dln2_probe(struct usb_interface *interface,
const struct usb_device_id *usb_id)
{ … }
static int dln2_suspend(struct usb_interface *iface, pm_message_t message)
{ … }
static int dln2_resume(struct usb_interface *iface)
{ … }
static const struct usb_device_id dln2_table[] = …;
MODULE_DEVICE_TABLE(usb, dln2_table);
static struct usb_driver dln2_driver = …;
module_usb_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;