drivers/nfc/s3fwrn5/s3fwrn5.h
Source file repositories/reference/linux-study-clean/drivers/nfc/s3fwrn5/s3fwrn5.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/nfc/s3fwrn5/s3fwrn5.h- Extension
.h- Size
- 1842 bytes
- Lines
- 88
- Domain
- Driver Families
- Bucket
- drivers/nfc
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/nfc.hnet/nfc/nci_core.hfirmware.h
Detected Declarations
struct s3fwrn5_phy_opsstruct s3fwrn5_infoenum s3fwrn5_modefunction s3fwrn5_set_modefunction s3fwrn5_get_modefunction s3fwrn5_set_wakefunction s3fwrn5_write
Annotated Snippet
struct s3fwrn5_phy_ops {
void (*set_wake)(void *id, bool sleep);
void (*set_mode)(void *id, enum s3fwrn5_mode);
enum s3fwrn5_mode (*get_mode)(void *id);
int (*write)(void *id, struct sk_buff *skb);
};
struct s3fwrn5_info {
struct nci_dev *ndev;
void *phy_id;
struct device *pdev;
const struct s3fwrn5_phy_ops *phy_ops;
struct s3fwrn5_fw_info fw_info;
struct mutex mutex;
};
static inline int s3fwrn5_set_mode(struct s3fwrn5_info *info,
enum s3fwrn5_mode mode)
{
if (!info->phy_ops->set_mode)
return -EOPNOTSUPP;
info->phy_ops->set_mode(info->phy_id, mode);
return 0;
}
static inline enum s3fwrn5_mode s3fwrn5_get_mode(struct s3fwrn5_info *info)
{
if (!info->phy_ops->get_mode)
return -EOPNOTSUPP;
return info->phy_ops->get_mode(info->phy_id);
}
static inline int s3fwrn5_set_wake(struct s3fwrn5_info *info, bool wake)
{
if (!info->phy_ops->set_wake)
return -EOPNOTSUPP;
info->phy_ops->set_wake(info->phy_id, wake);
return 0;
}
static inline int s3fwrn5_write(struct s3fwrn5_info *info, struct sk_buff *skb)
{
if (!info->phy_ops->write)
return -EOPNOTSUPP;
return info->phy_ops->write(info->phy_id, skb);
}
int s3fwrn5_probe(struct nci_dev **ndev, void *phy_id, struct device *pdev,
const struct s3fwrn5_phy_ops *phy_ops);
void s3fwrn5_remove(struct nci_dev *ndev);
int s3fwrn5_recv_frame(struct nci_dev *ndev, struct sk_buff *skb,
enum s3fwrn5_mode mode);
#endif /* __LOCAL_S3FWRN5_H_ */
Annotation
- Immediate include surface: `linux/nfc.h`, `net/nfc/nci_core.h`, `firmware.h`.
- Detected declarations: `struct s3fwrn5_phy_ops`, `struct s3fwrn5_info`, `enum s3fwrn5_mode`, `function s3fwrn5_set_mode`, `function s3fwrn5_get_mode`, `function s3fwrn5_set_wake`, `function s3fwrn5_write`.
- Atlas domain: Driver Families / drivers/nfc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.