]> git.baikalelectronics.ru Git - kernel.git/commit
NFC: Add NFC_CMD_DEACTIVATE_TARGET support
authorMark Greer <mgreer@animalcreek.com>
Fri, 16 Jun 2017 03:34:22 +0000 (20:34 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 9 Nov 2017 23:03:39 +0000 (00:03 +0100)
commit9d2c4214cc3e9f4237359b09d975819f1337b709
tree66b92544d76b7033e73a78897169612109eefe29
parentee5918c909bc5935b31e522ecd90ce0da29b2537
NFC: Add NFC_CMD_DEACTIVATE_TARGET support

Once an NFC target (i.e., a tag) is found, it remains active until
there is a failure reading or writing it (often caused by the target
moving out of range).  While the target is active, the NFC adapter
and antenna must remain powered.  This wastes power when the target
remains in range but the client application no longer cares whether
it is there or not.

To mitigate this, add a new netlink command that allows userspace
to deactivate an active target.  When issued, this command will cause
the NFC subsystem to act as though the target was moved out of range.
Once the command has been executed, the client application can power
off the NFC adapter to reduce power consumption.

Signed-off-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
include/uapi/linux/nfc.h
net/nfc/netlink.c