aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc/fdp/fdp.h
blob: 9bd1f3f23e2d1ff20a1938280d2883b2108c7c77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* -------------------------------------------------------------------------
 * Copyright (C) 2014-2016, Intel Corporation
 *
 * -------------------------------------------------------------------------
 */

#ifndef __LOCAL_FDP_H_
#define __LOCAL_FDP_H_

#include <net/nfc/nci_core.h>
#include <linux/gpio/consumer.h>

struct fdp_i2c_phy {
	struct i2c_client *i2c_dev;
	struct gpio_desc *power_gpio;
	struct nci_dev *ndev;

	/* < 0 if i2c error occurred */
	int hard_fault;
	uint16_t next_read_size;
};

int fdp_nci_probe(struct fdp_i2c_phy *phy, struct nfc_phy_ops *phy_ops,
		  struct nci_dev **ndev, int tx_headroom, int tx_tailroom,
		  u8 clock_type, u32 clock_freq, u8 *fw_vsc_cfg);
void fdp_nci_remove(struct nci_dev *ndev);
int fdp_nci_recv_frame(struct nci_dev *ndev, struct sk_buff *skb);

#endif /* __LOCAL_FDP_H_ */