NFC: Add NFC hardware check and get info ioctl

Add nfc hardware check in probe and NFCC_GET_INFO ioctl.

Change-Id: If1269ac0b3a786039001d4c759e9c423ddc149db
Signed-off-by: Karthik Poosa <kpoosa2@codeaurora.org>
This commit is contained in:
Karthik Poosa 2020-01-07 23:14:06 +05:30
commit eb81b68b14
7 changed files with 393 additions and 45 deletions

View file

@ -0,0 +1,26 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
*/
#ifndef _UAPI_NFCINFO_H_
#define _UAPI_NFCINFO_H_
#include <linux/ioctl.h>
#define NFCC_MAGIC 0xE9
#define NFCC_GET_INFO _IOW(NFCC_MAGIC, 0x09, unsigned int)
struct nqx_devinfo {
unsigned char chip_type;
unsigned char rom_version;
unsigned char fw_major;
unsigned char fw_minor;
};
union nqx_uinfo {
unsigned int i;
struct nqx_devinfo info;
};
#endif