Linux Audio

Check our new training course

Loading...
v4.6
 
 1/*
 2 * NCI based driver for Samsung S3FWRN5 NFC chip
 3 *
 4 * Copyright (C) 2015 Samsung Electrnoics
 5 * Robert Baldyga <r.baldyga@samsung.com>
 6 *
 7 * This program is free software; you can redistribute it and/or modify it
 8 * under the terms and conditions of the GNU General Public License,
 9 * version 2 or later, as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef __LOCAL_S3FWRN5_NCI_H_
21#define __LOCAL_S3FWRN5_NCI_H_
22
23#include "s3fwrn5.h"
24
25#define NCI_PROP_AGAIN		0x01
26
27#define NCI_PROP_GET_RFREG	0x21
28#define NCI_PROP_SET_RFREG	0x22
29
30struct nci_prop_set_rfreg_cmd {
31	__u8 index;
32	__u8 data[252];
33};
34
35struct nci_prop_set_rfreg_rsp {
36	__u8 status;
37};
38
39#define NCI_PROP_GET_RFREG_VER	0x24
40
41struct nci_prop_get_rfreg_ver_rsp {
42	__u8 status;
43	__u8 data[8];
44};
45
46#define NCI_PROP_SET_RFREG_VER	0x25
47
48struct nci_prop_set_rfreg_ver_cmd {
49	__u8 data[8];
50};
51
52struct nci_prop_set_rfreg_ver_rsp {
53	__u8 status;
54};
55
56#define NCI_PROP_START_RFREG	0x26
57
58struct nci_prop_start_rfreg_rsp {
59	__u8 status;
60};
61
62#define NCI_PROP_STOP_RFREG	0x27
63
64struct nci_prop_stop_rfreg_cmd {
65	__u16 checksum;
66};
67
68struct nci_prop_stop_rfreg_rsp {
69	__u8 status;
70};
71
72#define NCI_PROP_FW_CFG		0x28
73
74struct nci_prop_fw_cfg_cmd {
75	__u8 clk_type;
76	__u8 clk_speed;
77	__u8 clk_req;
78};
79
80struct nci_prop_fw_cfg_rsp {
81	__u8 status;
82};
83
84#define NCI_PROP_WR_RESET	0x2f
85
86void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n);
87int s3fwrn5_nci_rf_configure(struct s3fwrn5_info *info, const char *fw_name);
88
89#endif /* __LOCAL_S3FWRN5_NCI_H_ */
v6.13.7
 1/* SPDX-License-Identifier: GPL-2.0-or-later */
 2/*
 3 * NCI based driver for Samsung S3FWRN5 NFC chip
 4 *
 5 * Copyright (C) 2015 Samsung Electrnoics
 6 * Robert Baldyga <r.baldyga@samsung.com>
 
 
 
 
 
 
 
 
 
 
 
 
 7 */
 8
 9#ifndef __LOCAL_S3FWRN5_NCI_H_
10#define __LOCAL_S3FWRN5_NCI_H_
11
12#include "s3fwrn5.h"
13
 
 
 
14#define NCI_PROP_SET_RFREG	0x22
15
16struct nci_prop_set_rfreg_cmd {
17	__u8 index;
18	__u8 data[252];
19};
20
21struct nci_prop_set_rfreg_rsp {
22	__u8 status;
23};
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25#define NCI_PROP_START_RFREG	0x26
26
27struct nci_prop_start_rfreg_rsp {
28	__u8 status;
29};
30
31#define NCI_PROP_STOP_RFREG	0x27
32
33struct nci_prop_stop_rfreg_cmd {
34	__u16 checksum;
35};
36
37struct nci_prop_stop_rfreg_rsp {
38	__u8 status;
39};
40
41#define NCI_PROP_FW_CFG		0x28
42
43struct nci_prop_fw_cfg_cmd {
44	__u8 clk_type;
45	__u8 clk_speed;
46	__u8 clk_req;
47};
48
49struct nci_prop_fw_cfg_rsp {
50	__u8 status;
51};
52
53extern const struct nci_driver_ops s3fwrn5_nci_prop_ops[4];
 
 
54int s3fwrn5_nci_rf_configure(struct s3fwrn5_info *info, const char *fw_name);
55
56#endif /* __LOCAL_S3FWRN5_NCI_H_ */