Christophe Ricard | 35630df | 2014-05-25 22:35:38 +0200 | [diff] [blame] | 1 | /* |
| 2 | * NCI based Driver for STMicroelectronics NFC Chip |
| 3 | * |
| 4 | * Copyright (C) 2014 STMicroelectronics SAS. All rights reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms and conditions of the GNU General Public License, |
| 8 | * version 2, as published by the Free Software Foundation. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
Christophe Ricard | ed06aeef | 2015-06-09 22:26:05 +0200 | [diff] [blame] | 19 | #ifndef __LOCAL_ST_NCI_H_ |
| 20 | #define __LOCAL_ST_NCI_H_ |
Christophe Ricard | 35630df | 2014-05-25 22:35:38 +0200 | [diff] [blame] | 21 | |
Christophe Ricard | ed06aeef | 2015-06-09 22:26:05 +0200 | [diff] [blame] | 22 | #include "st-nci_se.h" |
Christophe Ricard | 35630df | 2014-05-25 22:35:38 +0200 | [diff] [blame] | 23 | #include "ndlc.h" |
| 24 | |
| 25 | /* Define private flags: */ |
Christophe Ricard | ed06aeef | 2015-06-09 22:26:05 +0200 | [diff] [blame] | 26 | #define ST_NCI_RUNNING 1 |
Christophe Ricard | 35630df | 2014-05-25 22:35:38 +0200 | [diff] [blame] | 27 | |
Christophe Ricard | ed06aeef | 2015-06-09 22:26:05 +0200 | [diff] [blame] | 28 | #define ST_NCI_CORE_PROP 0x01 |
| 29 | #define ST_NCI_SET_NFC_MODE 0x02 |
Christophe Ricard | 41fc2f5 | 2015-06-06 13:16:52 +0200 | [diff] [blame] | 30 | |
| 31 | struct nci_mode_set_cmd { |
| 32 | u8 cmd_type; |
| 33 | u8 mode; |
| 34 | } __packed; |
Christophe Ricard | dbd70b4 | 2015-06-06 13:16:47 +0200 | [diff] [blame] | 35 | |
| 36 | struct nci_mode_set_rsp { |
| 37 | u8 status; |
| 38 | } __packed; |
| 39 | |
Christophe Ricard | ed06aeef | 2015-06-09 22:26:05 +0200 | [diff] [blame] | 40 | struct st_nci_info { |
Christophe Ricard | 35630df | 2014-05-25 22:35:38 +0200 | [diff] [blame] | 41 | struct llt_ndlc *ndlc; |
| 42 | unsigned long flags; |
Christophe Ricard | ed06aeef | 2015-06-09 22:26:05 +0200 | [diff] [blame] | 43 | struct st_nci_se_info se_info; |
Christophe Ricard | 35630df | 2014-05-25 22:35:38 +0200 | [diff] [blame] | 44 | }; |
| 45 | |
Christophe Ricard | ed06aeef | 2015-06-09 22:26:05 +0200 | [diff] [blame] | 46 | void st_nci_remove(struct nci_dev *ndev); |
| 47 | int st_nci_probe(struct llt_ndlc *ndlc, int phy_headroom, |
Christophe Ricard | 35630df | 2014-05-25 22:35:38 +0200 | [diff] [blame] | 48 | int phy_tailroom); |
| 49 | |
Christophe Ricard | ed06aeef | 2015-06-09 22:26:05 +0200 | [diff] [blame] | 50 | #endif /* __LOCAL_ST_NCI_H_ */ |