xref: /kernel/linux/linux-5.10/drivers/nfc/fdp/fdp.h (revision 8c2ecf20)
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/* -------------------------------------------------------------------------
38c2ecf20Sopenharmony_ci * Copyright (C) 2014-2016, Intel Corporation
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * -------------------------------------------------------------------------
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef __LOCAL_FDP_H_
98c2ecf20Sopenharmony_ci#define __LOCAL_FDP_H_
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <net/nfc/nci_core.h>
128c2ecf20Sopenharmony_ci#include <linux/gpio/consumer.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_cistruct fdp_i2c_phy {
158c2ecf20Sopenharmony_ci	struct i2c_client *i2c_dev;
168c2ecf20Sopenharmony_ci	struct gpio_desc *power_gpio;
178c2ecf20Sopenharmony_ci	struct nci_dev *ndev;
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci	/* < 0 if i2c error occurred */
208c2ecf20Sopenharmony_ci	int hard_fault;
218c2ecf20Sopenharmony_ci	uint16_t next_read_size;
228c2ecf20Sopenharmony_ci};
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciint fdp_nci_probe(struct fdp_i2c_phy *phy, struct nfc_phy_ops *phy_ops,
258c2ecf20Sopenharmony_ci		  struct nci_dev **ndev, int tx_headroom, int tx_tailroom,
268c2ecf20Sopenharmony_ci		  u8 clock_type, u32 clock_freq, u8 *fw_vsc_cfg);
278c2ecf20Sopenharmony_civoid fdp_nci_remove(struct nci_dev *ndev);
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci#endif /* __LOCAL_FDP_H_ */
30