#include <linux/module.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/usb.h>
#include <linux/platform_device.h>
#include <linux/mfd/core.h>
#include <linux/rtsx_usb.h>
static int polling_pipe = …;
module_param(polling_pipe, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(…) …;
static const struct mfd_cell rtsx_usb_cells[] = …;
static void rtsx_usb_sg_timed_out(struct timer_list *t)
{ … }
static int rtsx_usb_bulk_transfer_sglist(struct rtsx_ucr *ucr,
unsigned int pipe, struct scatterlist *sg, int num_sg,
unsigned int length, unsigned int *act_len, int timeout)
{ … }
int rtsx_usb_transfer_data(struct rtsx_ucr *ucr, unsigned int pipe,
void *buf, unsigned int len, int num_sg,
unsigned int *act_len, int timeout)
{ … }
EXPORT_SYMBOL_GPL(…);
static inline void rtsx_usb_seq_cmd_hdr(struct rtsx_ucr *ucr,
u16 addr, u16 len, u8 seq_type)
{ … }
static int rtsx_usb_seq_write_register(struct rtsx_ucr *ucr,
u16 addr, u16 len, u8 *data)
{ … }
static int rtsx_usb_seq_read_register(struct rtsx_ucr *ucr,
u16 addr, u16 len, u8 *data)
{ … }
int rtsx_usb_read_ppbuf(struct rtsx_ucr *ucr, u8 *buf, int buf_len)
{ … }
EXPORT_SYMBOL_GPL(…);
int rtsx_usb_write_ppbuf(struct rtsx_ucr *ucr, u8 *buf, int buf_len)
{ … }
EXPORT_SYMBOL_GPL(…);
int rtsx_usb_ep0_write_register(struct rtsx_ucr *ucr, u16 addr,
u8 mask, u8 data)
{ … }
EXPORT_SYMBOL_GPL(…);
int rtsx_usb_ep0_read_register(struct rtsx_ucr *ucr, u16 addr, u8 *data)
{ … }
EXPORT_SYMBOL_GPL(…);
void rtsx_usb_add_cmd(struct rtsx_ucr *ucr, u8 cmd_type, u16 reg_addr,
u8 mask, u8 data)
{ … }
EXPORT_SYMBOL_GPL(…);
int rtsx_usb_send_cmd(struct rtsx_ucr *ucr, u8 flag, int timeout)
{ … }
EXPORT_SYMBOL_GPL(…);
int rtsx_usb_get_rsp(struct rtsx_ucr *ucr, int rsp_len, int timeout)
{ … }
EXPORT_SYMBOL_GPL(…);
static int rtsx_usb_get_status_with_bulk(struct rtsx_ucr *ucr, u16 *status)
{ … }
int rtsx_usb_get_card_status(struct rtsx_ucr *ucr, u16 *status)
{ … }
EXPORT_SYMBOL_GPL(…);
static int rtsx_usb_write_phy_register(struct rtsx_ucr *ucr, u8 addr, u8 val)
{ … }
int rtsx_usb_write_register(struct rtsx_ucr *ucr, u16 addr, u8 mask, u8 data)
{ … }
EXPORT_SYMBOL_GPL(…);
int rtsx_usb_read_register(struct rtsx_ucr *ucr, u16 addr, u8 *data)
{ … }
EXPORT_SYMBOL_GPL(…);
static inline u8 double_ssc_depth(u8 depth)
{ … }
static u8 revise_ssc_depth(u8 ssc_depth, u8 div)
{ … }
int rtsx_usb_switch_clock(struct rtsx_ucr *ucr, unsigned int card_clock,
u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk)
{ … }
EXPORT_SYMBOL_GPL(…);
int rtsx_usb_card_exclusive_check(struct rtsx_ucr *ucr, int card)
{ … }
EXPORT_SYMBOL_GPL(…);
static int rtsx_usb_reset_chip(struct rtsx_ucr *ucr)
{ … }
static int rtsx_usb_init_chip(struct rtsx_ucr *ucr)
{ … }
static int rtsx_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void rtsx_usb_disconnect(struct usb_interface *intf)
{ … }
#ifdef CONFIG_PM
static int rtsx_usb_suspend(struct usb_interface *intf, pm_message_t message)
{ … }
static int rtsx_usb_resume_child(struct device *dev, void *data)
{ … }
static int rtsx_usb_resume(struct usb_interface *intf)
{ … }
static int rtsx_usb_reset_resume(struct usb_interface *intf)
{ … }
#else
#define rtsx_usb_suspend …
#define rtsx_usb_resume …
#define rtsx_usb_reset_resume …
#endif
static int rtsx_usb_pre_reset(struct usb_interface *intf)
{ … }
static int rtsx_usb_post_reset(struct usb_interface *intf)
{ … }
static const struct usb_device_id rtsx_usb_usb_ids[] = …;
MODULE_DEVICE_TABLE(usb, rtsx_usb_usb_ids);
static struct usb_driver rtsx_usb_driver = …;
module_usb_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;