xref: /openbmc/linux/drivers/nfc/fdp/fdp.h (revision 0e96cf7f)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* -------------------------------------------------------------------------
3  * Copyright (C) 2014-2016, Intel Corporation
4  *
5  * -------------------------------------------------------------------------
6  */
7 
8 #ifndef __LOCAL_FDP_H_
9 #define __LOCAL_FDP_H_
10 
11 #include <net/nfc/nci_core.h>
12 #include <linux/gpio/consumer.h>
13 
14 struct fdp_i2c_phy {
15 	struct i2c_client *i2c_dev;
16 	struct gpio_desc *power_gpio;
17 	struct nci_dev *ndev;
18 
19 	/* < 0 if i2c error occurred */
20 	int hard_fault;
21 	uint16_t next_read_size;
22 };
23 
24 int fdp_nci_probe(struct fdp_i2c_phy *phy, struct nfc_phy_ops *phy_ops,
25 		  struct nci_dev **ndev, int tx_headroom, int tx_tailroom,
26 		  u8 clock_type, u32 clock_freq, u8 *fw_vsc_cfg);
27 void fdp_nci_remove(struct nci_dev *ndev);
28 int fdp_nci_recv_frame(struct nci_dev *ndev, struct sk_buff *skb);
29 
30 #endif /* __LOCAL_FDP_H_ */
31