#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/debugfs.h>
#include <net/nfc/digital.h>
#define NFCSIM_ERR(d, fmt, args...) nfc_err(&d->nfc_digital_dev->nfc_dev->dev, \
"%s: " fmt, __func__, ## args)
#define NFCSIM_DBG(d, fmt, args...) dev_dbg(&d->nfc_digital_dev->nfc_dev->dev, \
"%s: " fmt, __func__, ## args)
#define NFCSIM_VERSION "0.2"
#define NFCSIM_MODE_NONE 0
#define NFCSIM_MODE_INITIATOR 1
#define NFCSIM_MODE_TARGET 2
#define NFCSIM_CAPABILITIES (NFC_DIGITAL_DRV_CAPS_IN_CRC | \
NFC_DIGITAL_DRV_CAPS_TG_CRC)
struct nfc_digital_dev *nfc_digital_dev;
struct work_struct recv_work;
struct delayed_work send_work;
struct nfcsim_link *link_in;
struct nfcsim_link *link_out;
nfc_digital_cmd_complete_t cb;
wait_queue_head_t recv_wait;
static struct nfcsim_link *nfcsim_link_new(void)
struct nfcsim_link *link;
link = kzalloc(sizeof(struct nfcsim_link), GFP_KERNEL);
init_waitqueue_head(&link->recv_wait);
static void nfcsim_link_free(struct nfcsim_link *link)
dev_kfree_skb(link->skb);