gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / drivers / nfc / st-nci / ndlc.h
blob066e2fd75238a42b4add18e638e125509a7ad5c4
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * NCI based Driver for STMicroelectronics NFC Chip
5 * Copyright (C) 2014-2015 STMicroelectronics SAS. All rights reserved.
6 */
8 #ifndef __LOCAL_NDLC_H_
9 #define __LOCAL_NDLC_H_
11 #include <linux/skbuff.h>
12 #include <net/nfc/nfc.h>
14 struct st_nci_se_status;
16 /* Low Level Transport description */
17 struct llt_ndlc {
18 struct nci_dev *ndev;
19 struct nfc_phy_ops *ops;
20 void *phy_id;
22 struct timer_list t1_timer;
23 bool t1_active;
25 struct timer_list t2_timer;
26 bool t2_active;
28 struct sk_buff_head rcv_q;
29 struct sk_buff_head send_q;
30 struct sk_buff_head ack_pending_q;
32 struct work_struct sm_work;
34 struct device *dev;
37 * < 0 if hardware error occurred
38 * and prevents normal operation.
40 int hard_fault;
41 int powered;
44 int ndlc_open(struct llt_ndlc *ndlc);
45 void ndlc_close(struct llt_ndlc *ndlc);
46 int ndlc_send(struct llt_ndlc *ndlc, struct sk_buff *skb);
47 void ndlc_recv(struct llt_ndlc *ndlc, struct sk_buff *skb);
48 int ndlc_probe(void *phy_id, struct nfc_phy_ops *phy_ops, struct device *dev,
49 int phy_headroom, int phy_tailroom, struct llt_ndlc **ndlc_id,
50 struct st_nci_se_status *se_status);
51 void ndlc_remove(struct llt_ndlc *ndlc);
52 #endif /* __LOCAL_NDLC_H__ */