OSDN Git Service

Revert "NFC: trf7970a: Handle extra byte in response to Type 5 RMB commands"
authorMark Greer <mgreer@animalcreek.com>
Thu, 15 Jun 2017 17:46:17 +0000 (10:46 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 22 Jun 2017 22:20:00 +0000 (00:20 +0200)
commita81d1ab3cad77e20c2df8baef0a35a4980fc511c
treee4a98dee491606a76bd7c8f749e95d80dec1044e
parent1b609e4384a10bc4139ab6ca63caa809eb2d5d0c
Revert "NFC: trf7970a: Handle extra byte in response to Type 5 RMB commands"

This reverts commit ab714817d7e891608d31f6996b1e4c43cf2bf342.

The original commit was designed to handle a bug in the trf7970a NFC
controller where an extra byte was returned in Read Multiple Blocks (RMB)
command responses.  However, it has become less clear whether it is a bug
in the trf7970a or in the tag.  In addition, it was assumed that the extra
byte was always returned but it turns out that is not always the case. The
result is that a byte of good data is trimmed off when the extra byte is
not present ultimately causing the neard deamon to fail the read.

Since the trf7970a driver does not have the context to know when to trim
the byte or not, remove the code from the trf7970a driver all together
(and move it up to the neard daemon).  This has the added benefit of
simplifying the kernel driver and putting the extra complexity into
userspace.

CC: Rob Herring <robh@kernel.org>
CC: devicetree@vger.kernel.org
Signed-off-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Documentation/devicetree/bindings/net/nfc/trf7970a.txt
drivers/nfc/trf7970a.c