Merge tag 'v4.4-rc2' into drm-intel-next-queued
[sfrench/cifs-2.6.git] / drivers / nfc / fdp / fdp.h
1 /* -------------------------------------------------------------------------
2  * Copyright (C) 2014-2016, Intel Corporation
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  * -------------------------------------------------------------------------
14  */
15
16 #ifndef __LOCAL_FDP_H_
17 #define __LOCAL_FDP_H_
18
19 #include <net/nfc/nci_core.h>
20 #include <linux/gpio/consumer.h>
21
22 struct fdp_i2c_phy {
23         struct i2c_client *i2c_dev;
24         struct gpio_desc *power_gpio;
25         struct nci_dev *ndev;
26
27         /* < 0 if i2c error occurred */
28         int hard_fault;
29         uint16_t next_read_size;
30 };
31
32 int fdp_nci_probe(struct fdp_i2c_phy *phy, struct nfc_phy_ops *phy_ops,
33                   struct nci_dev **ndev, int tx_headroom, int tx_tailroom,
34                   u8 clock_type, u32 clock_freq, u8 *fw_vsc_cfg);
35 void fdp_nci_remove(struct nci_dev *ndev);
36 int fdp_nci_recv_frame(struct nci_dev *ndev, struct sk_buff *skb);
37
38 #endif /* __LOCAL_FDP_H_ */