#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/firmware.h>
#include <linux/netdevice.h>
#include <linux/delay.h>
#include <linux/mmc/card.h>
#include <linux/mmc/sdio_func.h>
#include <linux/mmc/sdio_ids.h>
#include <linux/mmc/sdio.h>
#include <linux/mmc/host.h>
#include <linux/pm_runtime.h>
#include "host.h"
#include "decl.h"
#include "defs.h"
#include "dev.h"
#include "cmd.h"
#include "if_sdio.h"
static void if_sdio_interrupt(struct sdio_func *func);
static u8 user_rmmod;
static const struct sdio_device_id if_sdio_ids[] = …;
MODULE_DEVICE_TABLE(sdio, if_sdio_ids);
#define MODEL_8385 …
#define MODEL_8686 …
#define MODEL_8688 …
static const struct lbs_fw_table fw_table[] = …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
struct if_sdio_packet { … };
struct if_sdio_card { … };
static void if_sdio_finish_power_on(struct if_sdio_card *card);
static int if_sdio_power_off(struct if_sdio_card *card);
static u16 if_sdio_read_scratch(struct if_sdio_card *card, int *err)
{ … }
static u8 if_sdio_read_rx_unit(struct if_sdio_card *card)
{ … }
static u16 if_sdio_read_rx_len(struct if_sdio_card *card, int *err)
{ … }
static int if_sdio_handle_cmd(struct if_sdio_card *card,
u8 *buffer, unsigned size)
{ … }
static int if_sdio_handle_data(struct if_sdio_card *card,
u8 *buffer, unsigned size)
{ … }
static int if_sdio_handle_event(struct if_sdio_card *card,
u8 *buffer, unsigned size)
{ … }
static int if_sdio_wait_status(struct if_sdio_card *card, const u8 condition)
{ … }
static int if_sdio_card_to_host(struct if_sdio_card *card)
{ … }
static void if_sdio_host_to_card_worker(struct work_struct *work)
{ … }
#define FW_DL_READY_STATUS …
static int if_sdio_prog_helper(struct if_sdio_card *card,
const struct firmware *fw)
{ … }
static int if_sdio_prog_real(struct if_sdio_card *card,
const struct firmware *fw)
{ … }
static void if_sdio_do_prog_firmware(struct lbs_private *priv, int ret,
const struct firmware *helper,
const struct firmware *mainfw)
{ … }
static int if_sdio_prog_firmware(struct if_sdio_card *card)
{ … }
static void if_sdio_finish_power_on(struct if_sdio_card *card)
{ … }
static int if_sdio_power_on(struct if_sdio_card *card)
{ … }
static int if_sdio_power_off(struct if_sdio_card *card)
{ … }
static int if_sdio_host_to_card(struct lbs_private *priv,
u8 type, u8 *buf, u16 nb)
{ … }
static int if_sdio_enter_deep_sleep(struct lbs_private *priv)
{ … }
static int if_sdio_exit_deep_sleep(struct lbs_private *priv)
{ … }
static int if_sdio_reset_deep_sleep_wakeup(struct lbs_private *priv)
{ … }
static void if_sdio_reset_card_worker(struct work_struct *work)
{ … }
static void if_sdio_reset_card(struct lbs_private *priv)
{ … }
static int if_sdio_power_save(struct lbs_private *priv)
{ … }
static int if_sdio_power_restore(struct lbs_private *priv)
{ … }
static void if_sdio_interrupt(struct sdio_func *func)
{ … }
static int if_sdio_probe(struct sdio_func *func,
const struct sdio_device_id *id)
{ … }
static void if_sdio_remove(struct sdio_func *func)
{ … }
static int if_sdio_suspend(struct device *dev)
{ … }
static int if_sdio_resume(struct device *dev)
{ … }
static const struct dev_pm_ops if_sdio_pm_ops = …;
static struct sdio_driver if_sdio_driver = …;
static int __init if_sdio_init_module(void)
{ … }
static void __exit if_sdio_exit_module(void)
{ … }
module_init(…) …;
module_exit(if_sdio_exit_module);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;