Updated corresponding to - NFC_AR_00_1E800_13.0B.00_OpnSrc
merged NFC_AR_00_1E800_13.0B.00_OpnSrc
This commit is contained in:
13
nfc/common.c
13
nfc/common.c
@@ -649,6 +649,19 @@ long nfc_dev_ioctl(struct file *pfile, unsigned int cmd, unsigned long arg)
|
||||
case NFC_SET_PWR:
|
||||
ret = nfc_ioctl_power_states(nfc_dev, arg);
|
||||
break;
|
||||
case NFC_SET_RESET_READ_PENDING:
|
||||
if (arg == NFC_SET_READ_PENDING) {
|
||||
nfc_dev->cold_reset.is_nfc_read_pending = true;
|
||||
/* Set default NFC state as NCI for Nfc read pending request */
|
||||
nfc_dev->nfc_state = NFC_STATE_NCI;
|
||||
}
|
||||
else if (arg == NFC_RESET_READ_PENDING){
|
||||
nfc_dev->cold_reset.is_nfc_read_pending = false;
|
||||
}
|
||||
else {
|
||||
ret = -EINVAL;
|
||||
}
|
||||
break;
|
||||
case ESE_SET_PWR:
|
||||
ret = nfc_ese_pwr(nfc_dev, arg);
|
||||
break;
|
||||
|
14
nfc/common.h
14
nfc/common.h
@@ -100,10 +100,11 @@
|
||||
// Ioctls
|
||||
// The type should be aligned with MW HAL definitions
|
||||
|
||||
#define NFC_SET_PWR _IOW(NFC_MAGIC, 0x01, uint32_t)
|
||||
#define ESE_SET_PWR _IOW(NFC_MAGIC, 0x02, uint32_t)
|
||||
#define ESE_GET_PWR _IOR(NFC_MAGIC, 0x03, uint32_t)
|
||||
#define NFC_SECURE_ZONE _IOW(NFC_MAGIC, 0x0A, uint32_t)
|
||||
#define NFC_SET_PWR _IOW(NFC_MAGIC, 0x01, uint32_t)
|
||||
#define ESE_SET_PWR _IOW(NFC_MAGIC, 0x02, uint32_t)
|
||||
#define ESE_GET_PWR _IOR(NFC_MAGIC, 0x03, uint32_t)
|
||||
#define NFC_SET_RESET_READ_PENDING _IOW(NFC_MAGIC, 0x04, uint32_t)
|
||||
#define NFC_SECURE_ZONE _IOW(NFC_MAGIC, 0x0A, uint32_t)
|
||||
|
||||
#define DTS_IRQ_GPIO_STR "qcom,sn-irq"
|
||||
#define DTS_VEN_GPIO_STR "qcom,sn-ven"
|
||||
@@ -177,6 +178,11 @@ enum nfcc_ioctl_request {
|
||||
NFC_DISABLE,
|
||||
};
|
||||
|
||||
enum nfc_read_pending {
|
||||
NFC_RESET_READ_PENDING,
|
||||
NFC_SET_READ_PENDING,
|
||||
};
|
||||
|
||||
/* nfc platform interface type */
|
||||
enum interface_flags {
|
||||
/* I2C physical IF for NFCC */
|
||||
|
@@ -71,6 +71,7 @@ struct cold_reset {
|
||||
bool rsp_pending;
|
||||
/* Is NFC enabled from UI */
|
||||
bool is_nfc_enabled;
|
||||
bool is_nfc_read_pending;
|
||||
};
|
||||
|
||||
struct nfc_dev;
|
||||
|
Reference in New Issue
Block a user