#define pr_fmt(fmt) …
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/nfc.h>
#include <net/nfc/hci.h>
#include "pn544.h"
#define PN544_HCI_RESETVEN_TIME …
enum pn544_state { … };
#define FULL_VERSION_LEN …
#define PN544_WRITE …
#define PN544_TEST_SWP …
#define PN544_RF_READER_A_AUTO_ACTIVATION …
#define PN544_RF_READER_A_CMD_CONTINUE_ACTIVATION …
#define PN544_MIFARE_CMD …
#define PN544_RF_READER_CMD_PRESENCE_CHECK …
#define PN544_RF_READER_CMD_ACTIVATE_NEXT …
#define PN544_ID_MGMT_FULL_VERSION_SW …
#define PN544_RF_READER_ISO15693_GATE …
#define PN544_RF_READER_F_GATE …
#define PN544_FELICA_ID …
#define PN544_FELICA_RAW …
#define PN544_RF_READER_JEWEL_GATE …
#define PN544_JEWEL_RAW_CMD …
#define PN544_RF_READER_NFCIP1_INITIATOR_GATE …
#define PN544_RF_READER_NFCIP1_TARGET_GATE …
#define PN544_SYS_MGMT_GATE …
#define PN544_SYS_MGMT_INFO_NOTIFICATION …
#define PN544_POLLING_LOOP_MGMT_GATE …
#define PN544_DEP_MODE …
#define PN544_DEP_ATR_REQ …
#define PN544_DEP_ATR_RES …
#define PN544_DEP_MERGE …
#define PN544_PL_RDPHASES …
#define PN544_PL_EMULATION …
#define PN544_PL_NFCT_DEACTIVATED …
#define PN544_SWP_MGMT_GATE …
#define PN544_SWP_DEFAULT_MODE …
#define PN544_NFC_WI_MGMT_GATE …
#define PN544_NFC_ESE_DEFAULT_MODE …
#define PN544_HCI_EVT_SND_DATA …
#define PN544_HCI_EVT_ACTIVATED …
#define PN544_HCI_EVT_DEACTIVATED …
#define PN544_HCI_EVT_RCV_DATA …
#define PN544_HCI_EVT_CONTINUE_MI …
#define PN544_HCI_EVT_SWITCH_MODE …
#define PN544_HCI_CMD_ATTREQUEST …
#define PN544_HCI_CMD_CONTINUE_ACTIVATION …
static const struct nfc_hci_gate pn544_gates[] = …;
#define PN544_CMDS_HEADROOM …
struct pn544_hci_info { … };
static int pn544_hci_open(struct nfc_hci_dev *hdev)
{ … }
static void pn544_hci_close(struct nfc_hci_dev *hdev)
{ … }
static int pn544_hci_ready(struct nfc_hci_dev *hdev)
{ … }
static int pn544_hci_xmit(struct nfc_hci_dev *hdev, struct sk_buff *skb)
{ … }
static int pn544_hci_start_poll(struct nfc_hci_dev *hdev,
u32 im_protocols, u32 tm_protocols)
{ … }
static int pn544_hci_dep_link_up(struct nfc_hci_dev *hdev,
struct nfc_target *target, u8 comm_mode,
u8 *gb, size_t gb_len)
{ … }
static int pn544_hci_dep_link_down(struct nfc_hci_dev *hdev)
{ … }
static int pn544_hci_target_from_gate(struct nfc_hci_dev *hdev, u8 gate,
struct nfc_target *target)
{ … }
static int pn544_hci_complete_target_discovered(struct nfc_hci_dev *hdev,
u8 gate,
struct nfc_target *target)
{ … }
#define PN544_CB_TYPE_READER_F …
static void pn544_hci_data_exchange_cb(void *context, struct sk_buff *skb,
int err)
{ … }
#define MIFARE_CMD_AUTH_KEY_A …
#define MIFARE_CMD_AUTH_KEY_B …
#define MIFARE_CMD_HEADER …
#define MIFARE_UID_LEN …
#define MIFARE_KEY_LEN …
#define MIFARE_CMD_LEN …
static int pn544_hci_im_transceive(struct nfc_hci_dev *hdev,
struct nfc_target *target,
struct sk_buff *skb, data_exchange_cb_t cb,
void *cb_context)
{ … }
static int pn544_hci_tm_send(struct nfc_hci_dev *hdev, struct sk_buff *skb)
{ … }
static int pn544_hci_check_presence(struct nfc_hci_dev *hdev,
struct nfc_target *target)
{ … }
static int pn544_hci_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event,
struct sk_buff *skb)
{ … }
static int pn544_hci_fw_download(struct nfc_hci_dev *hdev,
const char *firmware_name)
{ … }
static int pn544_hci_discover_se(struct nfc_hci_dev *hdev)
{ … }
#define PN544_SE_MODE_OFF …
#define PN544_SE_MODE_ON …
static int pn544_hci_enable_se(struct nfc_hci_dev *hdev, u32 se_idx)
{ … }
static int pn544_hci_disable_se(struct nfc_hci_dev *hdev, u32 se_idx)
{ … }
static const struct nfc_hci_ops pn544_hci_ops = …;
int pn544_hci_probe(void *phy_id, const struct nfc_phy_ops *phy_ops,
char *llc_name, int phy_headroom, int phy_tailroom,
int phy_payload, fw_download_t fw_download,
struct nfc_hci_dev **hdev)
{ … }
EXPORT_SYMBOL(…);
void pn544_hci_remove(struct nfc_hci_dev *hdev)
{ … }
EXPORT_SYMBOL(…);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…);