#include <linux/module.h>
#include <linux/highmem.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/workqueue.h>
#include <linux/memstick.h>
#include <linux/kthread.h>
#include <linux/rtsx_usb.h>
#include <linux/pm_runtime.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/completion.h>
#include <asm/unaligned.h>
struct rtsx_usb_ms { … };
static inline struct device *ms_dev(struct rtsx_usb_ms *host)
{ … }
static inline void ms_clear_error(struct rtsx_usb_ms *host)
{ … }
#ifdef DEBUG
static void ms_print_debug_regs(struct rtsx_usb_ms *host)
{ … }
#else
static void ms_print_debug_regs(struct rtsx_usb_ms *host)
{
}
#endif
static int ms_pull_ctl_disable_lqfp48(struct rtsx_ucr *ucr)
{ … }
static int ms_pull_ctl_disable_qfn24(struct rtsx_ucr *ucr)
{ … }
static int ms_pull_ctl_enable_lqfp48(struct rtsx_ucr *ucr)
{ … }
static int ms_pull_ctl_enable_qfn24(struct rtsx_ucr *ucr)
{ … }
static int ms_power_on(struct rtsx_usb_ms *host)
{ … }
static int ms_power_off(struct rtsx_usb_ms *host)
{ … }
static int ms_transfer_data(struct rtsx_usb_ms *host, unsigned char data_dir,
u8 tpc, u8 cfg, struct scatterlist *sg)
{ … }
static int ms_write_bytes(struct rtsx_usb_ms *host, u8 tpc,
u8 cfg, u8 cnt, u8 *data, u8 *int_reg)
{ … }
static int ms_read_bytes(struct rtsx_usb_ms *host, u8 tpc,
u8 cfg, u8 cnt, u8 *data, u8 *int_reg)
{ … }
static int rtsx_usb_ms_issue_cmd(struct rtsx_usb_ms *host)
{ … }
static void rtsx_usb_ms_handle_req(struct work_struct *work)
{ … }
static void rtsx_usb_ms_request(struct memstick_host *msh)
{ … }
static int rtsx_usb_ms_set_param(struct memstick_host *msh,
enum memstick_param param, int value)
{ … }
#ifdef CONFIG_PM_SLEEP
static int rtsx_usb_ms_suspend(struct device *dev)
{ … }
static int rtsx_usb_ms_resume(struct device *dev)
{ … }
#endif
#ifdef CONFIG_PM
static int rtsx_usb_ms_runtime_suspend(struct device *dev)
{ … }
static int rtsx_usb_ms_runtime_resume(struct device *dev)
{ … }
#endif
static const struct dev_pm_ops rtsx_usb_ms_pm_ops = …;
static void rtsx_usb_ms_poll_card(struct work_struct *work)
{ … }
static int rtsx_usb_ms_drv_probe(struct platform_device *pdev)
{ … }
static void rtsx_usb_ms_drv_remove(struct platform_device *pdev)
{ … }
static struct platform_device_id rtsx_usb_ms_ids[] = …;
MODULE_DEVICE_TABLE(platform, rtsx_usb_ms_ids);
static struct platform_driver rtsx_usb_ms_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;