aboutsummaryrefslogtreecommitdiff
path: root/include/linux/nfc/fdp.h
blob: 513324f18c3502d5191694cd0bfaa760ffe3207c (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/* -------------------------------------------------------------------------
 * Copyright (C) 2013-2014 Inside Secure
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 * ------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------
 * Copyright (C) 2014-2016, Intel Corporation
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * ------------------------------------------------------------------------- */

/*
 * FDP driver module.
 *
 */

#include <linux/ioctl.h>

 /*
  * If set to 0, a free major number will be allocated for the driver.
  *   If set to a value different from 0, the specified value will be used as a major value
  */

#define FIELDSPEAK_MAJOR          0

/*
 * Use 'm' as magic number
 *
 * May be customized if conflict occurs
 */

#define FIELDSPEAK_IOC_MAGIC     'o'

/**
  * OPEN_NFC_IOC_RESET is used to request Open NFC driver to reset the NFC Controller.
  *
  * Note : The reset IOCTL is asynchronous. The Open NFC stack checks the completion of
  * the reset by selecting the fd for writing (using select()).
  */

#define FIELDSPEAK_IOC_RESET       _IO(FIELDSPEAK_IOC_MAGIC, 0)


#define FIELDSPEAK_MAX_IOCTL_VALUE   0


/* NFC controller (FDP) GPIOs */
#define NFC_HOST_INT_GPIO               "NFC-intr"
#define NFC_RESET_GPIO                  "NFC-enable"

struct fdp_i2c_platform_data {
	unsigned int irq_gpio;
	unsigned int rst_gpio;
	unsigned int max_i2c_xfer_size;
};

/* EOF */