Re: [Patch] NFC: trf7970a:

2016-04-21 Thread Mark Greer
On Mon, Apr 18, 2016 at 03:48:37PM -0400, Geoff Lansberry wrote: Hi Geoff. > The current version of the trf7970a driver is missing support for several > features that we needed to operate a custom board. > We feel that these features will be useful to others as well, and we want to > share

Re: [Patch] NFC: trf7970a:

2017-02-08 Thread Mark Greer
I just realized that the linux-nfc is not CC'd so adding it. On Wed, Feb 08, 2017 at 03:53:39PM -0700, Mark Greer wrote: > On Sun, Dec 18, 2016 at 08:07:33PM -0700, Mark Greer wrote: > > On Sat, Dec 17, 2016 at 04:19:04PM -0500, Geoff Lansberry wrote: > > > Mark, f

Re: [Patch] NFC: trf7970a:

2017-02-08 Thread Mark Greer
On Sun, Dec 18, 2016 at 08:07:33PM -0700, Mark Greer wrote: > On Sat, Dec 17, 2016 at 04:19:04PM -0500, Geoff Lansberry wrote: > > Mark, from our consultant: > > > > It isn't important whether the flood script is successful in writing > > or not. The point of it is to

Re: [Patch] NFC: trf7970a:

2017-02-09 Thread Mark Greer
On Thu, Feb 09, 2017 at 10:54:08AM -0500, Geoff Lansberry wrote: > On Wed, Feb 8, 2017 at 5:56 PM, Mark Greer <mgr...@animalcreek.com> wrote: > > > > I just realized that the linux-nfc is not CC'd so adding it. > > > > On Wed, Feb 08, 2017 at 03:53:39PM -0700, Ma

Re: [Patch] NFC: trf7970a:

2017-02-09 Thread Mark Greer
On Thu, Feb 09, 2017 at 07:41:11PM -0500, Geoff Lansberry wrote: > On Thu, Feb 9, 2017 at 4:27 PM, Mark Greer <mgr...@animalcreek.com> wrote: > > > > On Thu, Feb 09, 2017 at 10:54:08AM -0500, Geoff Lansberry wrote: > > > On Wed, Feb 8, 2017 at 5:56 PM, Mark Greer

Re: [PATCH v3 1/3] NFC: trf7970a: add device tree option for 27MHz clock

2017-01-19 Thread Mark Greer
.56MHz clock or the optional 27.12MHz clock. > > Signed-off-by: Geoff Lansberry <ge...@kuvee.com> > --- Acked-by: Mark Greer <mgr...@animalcreek.com>

Re: [PATCH v3 2/3] NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage

2017-01-20 Thread Mark Greer
26 > +- Acked-by: Mark Greer <mgr...@animalcreek.com>

Re: [Patch] NFC: trf7970a:

2016-12-13 Thread Mark Greer
On Thu, Apr 21, 2016 at 05:01:19PM -0700, Mark Greer wrote: > On Mon, Apr 18, 2016 at 03:48:37PM -0400, Geoff Lansberry wrote: > > Hi Geoff. > > > The current version of the trf7970a driver is missing support for several > > features that we needed to operate a cu

Re: [Patch] NFC: trf7970a:

2016-12-14 Thread Mark Greer
On Wed, Dec 14, 2016 at 11:17:33AM -0500, Geoff Lansberry wrote: > On Wed, Dec 14, 2016 at 10:57 AM, Mark Greer <mgr...@animalcreek.com> wrote: > > > > On Tue, Dec 13, 2016 at 08:50:04PM -0500, Geoff Lansberry wrote: > > > Hi Mark - Thanks for getting back to

Re: [Patch] NFC: trf7970a:

2016-12-14 Thread Mark Greer
On Tue, Dec 13, 2016 at 08:50:04PM -0500, Geoff Lansberry wrote: > Hi Mark - Thanks for getting back to me. It's funny that you ask, > because we are currently chasing a segfault that is happening in neard, but > may end up back in the trf7970a driver. Have you ever heard on anyone > having

Re: [PATCH 2/3] NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage

2016-12-15 Thread Mark Greer
On Thu, Dec 15, 2016 at 05:30:43PM -0500, Geoff Lansberry wrote: > From: Geoff Lansberry Missing commit description. > diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c > index 2d2a077..b4c37ab 100644 > --- a/drivers/nfc/trf7970a.c > +++ b/drivers/nfc/trf7970a.c >

Re: [PATCH 1/3] NFC: trf7970a: add device tree option for 27MHz clock

2016-12-15 Thread Mark Greer
Hi Geoff. On Thu, Dec 15, 2016 at 05:30:42PM -0500, Geoff Lansberry wrote: > From: Geoff Lansberry Please add an informative commit description to all of your commits. No matter how trivial this patch may seem to you now, it may not be to others (or to you in a few years). >

Re: [PATCH 3/3] nfc: trf7970a: Prevent repeated polling from crashing the kernel

2016-12-15 Thread Mark Greer
On Thu, Dec 15, 2016 at 05:30:44PM -0500, Geoff Lansberry wrote: > From: Jaret Cantu > > Repeated polling attempts cause a NULL dereference error to occur. > This is because the curent state of the trf7970a is reading but > a request has been made to send a command. > >

Re: [Patch] NFC: trf7970a:

2016-12-15 Thread Mark Greer
On Wed, Dec 14, 2016 at 03:31:23PM -0700, Mark Greer wrote: > I'll start on this > tonight but won't likely get far until tomorrow. In the meantime, > if you and/or your contractor make progress, please share. Geoff, Which version of neard are you using? 0.16? Mark --

Re: [Patch] NFC: trf7970a:

2016-12-14 Thread Mark Greer
On Wed, Dec 14, 2016 at 01:35:03PM -0500, Geoff Lansberry wrote: > On Wed, Dec 14, 2016 at 12:10 PM, Mark Greer <mgr...@animalcreek.com> wrote: > > On Wed, Dec 14, 2016 at 11:17:33AM -0500, Geoff Lansberry wrote: > >> On Wed, Dec 14, 2016 at 10:57 AM, Mark Greer

Re: [PATCH v3 3/3] nfc: trf7970a: Prevent repeated polling from crashing the kernel

2017-01-03 Thread Mark Greer
[Please stop top-posting. Bottom-post only to these lists.] Hi Geoff & happy new year. On Tue, Dec 27, 2016 at 09:18:32AM -0500, Geoff Lansberry wrote: > Mark - I will split this off soon. OK > In the meantime - here is some more info about how we use it. > > We do use NFC structures.I

Re: [PATCH v3 3/3] nfc: trf7970a: Prevent repeated polling from crashing the kernel

2017-01-03 Thread Mark Greer
On Tue, Jan 03, 2017 at 01:35:18PM -0500, Geoff Lansberry wrote: > On Tue, Jan 3, 2017 at 11:33 AM, Mark Greer <mgr...@animalcreek.com> wrote: > > On Tue, Dec 27, 2016 at 09:18:32AM -0500, Geoff Lansberry wrote: > >> In the meantime - here is some more info about how we

Re: [PATCH 1/3] NFC: trf7970a: add device tree option for 27MHz clock

2016-12-20 Thread Mark Greer
On Tue, Dec 20, 2016 at 01:29:13PM -0500, Geoff Lansberry wrote: > On Tue, Dec 20, 2016 at 1:11 PM, Mark Greer <mgr...@animalcreek.com> wrote: > > Hi Geoff. > > > > Please put the version in your subjects when submitting anything but the > > initial versio

Re: [PATCH 1/3] NFC: trf7970a: add device tree option for 27MHz clock

2016-12-20 Thread Mark Greer
Hi Geoff. Please put the version in your subjects when submitting anything but the initial version of a patch (e.g., [PATCH v2 1/3]). Which series do you want reviewed? Mark --

Re: [PATCH 3/3] nfc: trf7970a: Prevent repeated polling from crashing the kernel

2016-12-20 Thread Mark Greer
On Tue, Dec 20, 2016 at 11:16:32AM -0500, Geoff Lansberry wrote: > From: Jaret Cantu > > Repeated polling attempts cause a NULL dereference error to occur. > This is because the state of the trf7970a is currently reading but > another request has been made to send a

Re: nfc: trf7970a: Prevent repeated polling from crashing the kernel

2016-12-20 Thread Mark Greer
On Tue, Dec 20, 2016 at 02:13:52PM -0500, Justin Bronder wrote: > On 20/12/16 11:59 -0700, Mark Greer wrote: > > On Tue, Dec 20, 2016 at 11:16:32AM -0500, Geoff Lansberry wrote: > > > From: Jaret Cantu <jaret.ca...@timesys.com> > > > > > > Repeated polli

Re: [PATCH 2/3] NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage

2016-12-20 Thread Mark Greer
On Tue, Dec 20, 2016 at 11:16:31AM -0500, Geoff Lansberry wrote: > From: Geoff Lansberry > > The TRF7970A has configuration options for supporting hardware designs > with 1.8 Volt or 3.3 Volt IO. This commit adds a device tree option, > using a fixed regulator binding, for

Re: [PATCH 2/3] NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage

2016-12-20 Thread Mark Greer
On Tue, Dec 20, 2016 at 11:13:23AM -0500, Geoff Lansberry wrote: > On Mon, Dec 19, 2016 at 5:35 PM, Rob Herring wrote: > > On Thu, Dec 15, 2016 at 05:30:43PM -0500, Geoff Lansberry wrote: > >> From: Geoff Lansberry > >> > >> --- > >>

Re: [Patch] NFC: trf7970a:

2016-12-18 Thread Mark Greer
On Sat, Dec 17, 2016 at 04:19:04PM -0500, Geoff Lansberry wrote: > Mark, from our consultant: > > It isn't important whether the flood script is successful in writing > or not. The point of it is to force a segfault by making many > requests. It needs to run for several hundred iterations

Re: [PATCH v3 3/3] nfc: trf7970a: Prevent repeated polling from crashing the kernel

2016-12-23 Thread Mark Greer
On Wed, Dec 21, 2016 at 11:18:34PM -0500, Geoff Lansberry wrote: > From: Jaret Cantu > > Repeated polling attempts cause a NULL dereference error to occur. > This is because the state of the trf7970a is currently reading but > another request has been made to send a

Re: [PATCH v3 3/3] nfc: trf7970a: Prevent repeated polling from crashing the kernel

2016-12-24 Thread Mark Greer
On Sat, Dec 24, 2016 at 11:17:18AM -0500, Geoff Lansberry wrote: > Mark - I'm sorry, but I did not write this code, and therefore was not > able to accurately describe it. It is fixing a different issue, not > the neard segfault that we are still chasing. Last week Jaret Cantu > sent a separate

Re: [Patch] NFC: trf7970a:

2016-12-16 Thread Mark Greer
On Thu, Dec 15, 2016 at 09:52:10PM -0700, Mark Greer wrote: > On Wed, Dec 14, 2016 at 03:31:23PM -0700, Mark Greer wrote: > > I'll start on this > > tonight but won't likely get far until tomorrow. In the meantime, > > if you and/or your contractor make progress, ple

Re: [PATCH 2/3] NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage

2016-12-21 Thread Mark Greer
On Wed, Dec 21, 2016 at 06:47:36AM -0500, Geoff Lansberry wrote: > Thanks Mark. Should I resubmit patches with the requested edits today, or > wait a bit for more comments? What is the desired etiquette? Its up to you. I don't think there are any hard & fast rules on this. If it were me, I

Re: [PATCH v3 0/7] NFC: trf7970a: Fixups & convert to desc-based GPIO

2017-04-24 Thread Mark Greer
[-CC: Lauro Ramos Venancio <lauro.venan...@openbossa.org> and Aloisio Almeida Jr <aloisio.alme...@openbossa.org>] [+CC: linux-wireless] On Fri, Jan 20, 2017 at 12:17:38PM -0700, Mark Greer wrote: > These trf7970a driver patches do the following things: > - a couple minor fix

Re: [PATCH 00/23] neard: Support TI Std & Pro tags, fixups, etc.

2017-07-25 Thread Mark Greer
On Thu, Jun 15, 2017 at 11:24:53AM -0700, Mark Greer wrote: > This is an assortment of commits that make some fixups, do some general > tightening of NDEF data checking, add support for TI Standard and Pro > Type 5 tags, and stop issuing the Read Multiple Blocks command when > formatt

[PATCH v5 2/9] NFC: trf7970a: Don't de-assert EN2 unless it was asserted

2017-04-25 Thread Mark Greer
When the trf7970a part has the bug related to 'en2-rf-quirk', the GPIO connected to the EN2 pin will not be asserted by the driver when powering up so it shouldn't be de-asserted when powering down. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- drivers/nfc/trf7970a.c | 6 --

[PATCH v5 5/9] NFC: trf7970a: Remove useless comment

2017-04-25 Thread Mark Greer
The last entry in the trf7970a_of_match[] table must be an empty entry to demarcate the end of the table. Currently, there is a comment indicating this but it is obvious so remove the comment. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- drivers/nfc/trf7970a.c | 2 +- 1 file c

[PATCH v5 9/9] NFC: trf7970a: Clean up coding style issues

2017-04-25 Thread Mark Greer
Clean up coding style issues according to scripts/Lindent. Some scripts/Lindent changes were reverted when it appeared to make the code less readable or when it made the line run over 80 characters. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- drivers/nfc/trf7970a.c

[PATCH v5 4/9] NFC: trf7970a: Only check 'en2-rf-quirk' if EN2 is specified

2017-04-25 Thread Mark Greer
The quirk indicated by the 'en2-rf-quirk' device tree property is only relevant when there is a GPIO connected to the EN2 pin of the trf7970a. This means we should only check for 'en2-rf-quirk' when EN2 is specified in the 'ti,enable-gpios' property of the device tree. Signed-off-by: Mark Greer

[PATCH v5 3/9] NFC: trf7970a: Fix inaccurate comment in trf7970a_probe()

2017-04-25 Thread Mark Greer
As of commit ce69b95ca4e4 ("NFC: Make EN2 pin optional in the TRF7970A driver"), only the GPIO for the 'EN' enable pin needs to be specified in the device tree so update the comments that says both 'EN' and 'EN2' must be specified. Signed-off-by: Mark Greer <mgr...@animalcreek.com&

[PATCH v5 6/9] NFC: trf7970a: Remove support for 'vin-voltage-override' DT property

2017-04-25 Thread Mark Greer
-voltage-override'. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- Documentation/devicetree/bindings/net/nfc/trf7970a.txt | 2 -- drivers/nfc/trf7970a.c | 11 +-- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Documentation/devi

[PATCH v5 8/9] NFC: trf7970a: Convert to descriptor based GPIO interface

2017-04-25 Thread Mark Greer
The trf7970a driver uses the deprecated integer-based GPIO consumer interface so convert it to use the new descriptor-based GPIO consumer interface. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- drivers/nfc/Kconfig| 2 +- drivers/nfc/trf7970a.

[PATCH v5 7/9] NFC: trf7970a: Enable pins are active high not active low

2017-04-25 Thread Mark Greer
The example DTS code for the trf7970a sets the GPIOs for the EN and EN2 pins to active low when they are really active high so correct the error. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- Documentation/devicetree/bindings/net/nfc/

[PATCH v5 1/9] MAINTAINERS: NFC: trf7970a: Add Mark Greer as maintainer

2017-04-25 Thread Mark Greer
Add Mark Greer as the maintainer of the trf7970a NFC driver. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a8eaa0a8e522..d7441b69f101 100644 --- a/MAINTAINERS +++ b/MAINT

[PATCH v5 0/9] NFC: trf7970a: Fixups & convert to desc-based GPIO

2017-04-25 Thread Mark Greer
These trf7970a driver patches do the following things: - add Mark Greer as the maintainer of the trf7970a driver - some minor fixups - remove support for 'vin-voltage-override' DT property - change the DTS example to indicate that EN and EN2 are active high GPIOs - convert the driver to use

Re: [PATCH] NFC: trf7970a: Correct register settings for 27MHz clock

2017-04-26 Thread Mark Greer
On Wed, Apr 26, 2017 at 09:48:33AM -0400, Geoff Lansberry wrote: > In prior commits the selected clock frequency does not propagate > correctly to what is written the the TRF7970A_MODULATOR_SYS_CLK_CTRL > register. > Also fixes a bug that causes the device tree property check to always > pass. >

Re: [PATCH v2] NFC: trf7970a: Correct register settings for 27MHz clock

2017-04-26 Thread Mark Greer
On Wed, Apr 26, 2017 at 09:41:48PM -0400, Geoff Lansberry wrote: Hi Geoff. > In prior commits the selected clock frequency does not propagate > correctly to what is written the the TRF7970A_MODULATOR_SYS_CLK_CTRL > register. > > Signed-off-by: Geoff Lansberry > --- >

Re: [PATCH v3] NFC: trf7970a: Correct register settings for 27MHz clock

2017-04-27 Thread Mark Greer
trf7970a_irq, > IRQF_TRIGGER_RISING | IRQF_ONESHOT, > -- > 2.7.4 With the suggested fix above: Acked-by: Mark Greer <mgr...@animalcreek.com>

[PATCH v4 4/9] NFC: trf7970a: Only check 'en2-rf-quirk' if EN2 is specified

2017-04-25 Thread Mark Greer
The quirk indicated by the 'en2-rf-quirk' device tree property is only relevant when there is a GPIO connected to the EN2 pin of the trf7970a. This means we should only check for 'en2-rf-quirk' when EN2 is specified in the 'ti,enable-gpios' property of the device tree. Signed-off-by: Mark Greer

[PATCH v4 9/9] NFC: trf7970a: Clean up coding style issues

2017-04-25 Thread Mark Greer
Clean up coding style issues according to scripts/Lindent. Some scripts/Lindent changes were reverted when it appeared to make the code less readable or when it made the line run over 80 characters. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- drivers/nfc/trf7970a.c

[PATCH v4 8/9] NFC: trf7970a: Convert to descriptor based GPIO interface

2017-04-25 Thread Mark Greer
The trf7970a driver uses the deprecated integer-based GPIO consumer interface so convert it to use the new descriptor-based GPIO consumer interface. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- drivers/nfc/Kconfig| 2 +- drivers/nfc/trf7970a.

[PATCH v4 6/9] NFC: trf7970a: Remove support for 'vin-voltage-override' DT property

2017-04-25 Thread Mark Greer
-voltage-override'. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- Documentation/devicetree/bindings/net/nfc/trf7970a.txt | 2 -- drivers/nfc/trf7970a.c | 11 +-- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Documentation/devi

[PATCH v4 5/9] NFC: trf7970a: Remove useless comment

2017-04-25 Thread Mark Greer
The last entry in the trf7970a_of_match[] table must be an empty entry to demarcate the end of the table. Currently, there is a comment indicating this but it is obvious so remove the comment. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- drivers/nfc/trf7970a.c | 2 +- 1 file c

[PATCH v4 7/9] NFC: trf7970a: Enable pins are active high not active low

2017-04-25 Thread Mark Greer
The example DTS code for the trf7970a sets the GPIOs for the EN and EN2 pins to active low when they are really active high so correct the error. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- Documentation/devicetree/bindings/net/nfc/

[PATCH v4 3/9] NFC: trf7970a: Fix inaccurate comment in trf7970a_probe()

2017-04-25 Thread Mark Greer
As of commit ce69b95ca4e4 ("NFC: Make EN2 pin optional in the TRF7970A driver"), only the GPIO for the 'EN' enable pin needs to be specified in the device tree so update the comments that says both 'EN' and 'EN2' must be specified. Signed-off-by: Mark Greer <mgr...@animalcreek.com&

[PATCH v4 1/9] MAINTAINERS: NFC: trf7970a: Add Mark Greer as maintainer

2017-04-25 Thread Mark Greer
Add Mark Greer as the maintainer of the trf7970a NFC driver. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a8eaa0a8e522..d7441b69f101 100644 --- a/MAINTAINERS +++ b/MAINT

[PATCH v4 2/9] NFC: trf7970a: Don't de-assert EN2 unless it was asserted

2017-04-25 Thread Mark Greer
When the trf7970a part has the bug related to 'en2-rf-quirk', the GPIO connected to the EN2 pin will not be asserted by the driver when powering up so it shouldn't be de-asserted when powering down. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- Note: I would rather use a

[PATCH v4 0/9] NFC: trf7970a: Fixups & convert to desc-based GPIO

2017-04-25 Thread Mark Greer
These trf7970a driver patches do the following things: - add Mark Greer as the maintainer of the trf7970a driver - some minor fixups - remove support for 'vin-voltage-override' DT property - change the DTS example to indicate that EN and EN2 are active high GPIOs - convert the driver to use

Re: [PATCH] NFC: trf7970a: fix check of clock frequencies, use && instead of ||

2017-04-27 Thread Mark Greer
> From: Colin Ian King Hi Colin. [I completely missed this patch and don't have it to directly respond to anymore so I probably missed some addresses from the CC list.] > The "or" condition (clk_freq != TRF7970A_27MHZ_CLOCK_FREQUENCY) || > (clk_freq !=

Re: [PATCH v4] NFC: trf7970a: Correct register settings for 27MHz clock

2017-04-27 Thread Mark Greer
On Thu, Apr 27, 2017 at 05:28:46PM -0400, Geoff Lansberry wrote: > In prior commits the selected clock frequency does not propagate > correctly to what is written to the TRF7970A_MODULATOR_SYS_CLK_CTRL > register. > > Signed-off-by: Geoff Lansberry <ge...@kuvee.com> > -

[PATCH 1/3] NFC: digital: NFC-A SEL_RES must be one byte

2017-06-15 Thread Mark Greer
Section 4.8.2 (SEL_RES Response) of NFC Forum's NFC Digital Protocol Technical Specification dated 2010-11-17 clearly states that the size of a SEL_RES Response is one byte. Enforce this restriction in the code. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- net/nfc/digital_techno

[PATCH 0/3] NFC: Misc. kernel updates and trf7970a erratum handling

2017-06-15 Thread Mark Greer
Add a couple minor fixups and remove the trf7970a erratum handling in which the last byte in the response to a Type 5 Read Multiple Blocks command is discarded. That handling is moved to the neard daemon where there is enough context to do it properly. Mark Greer (3): NFC: digital: NFC

[PATCH 05/23] ndef: Discard records containing errors

2017-06-15 Thread Mark Greer
in the same NDEF message). Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- src/ndef.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ndef.c b/src/ndef.c index 7a3c76b..38dcf72 100644 --- a/src/ndef.c +++ b/src/ndef.c @@ -2845,7 +2845,6 @@ GList *near_ndef_par

[PATCH 10/23] adapter: Clear timer handle when DEP timer stopped

2017-06-15 Thread Mark Greer
__near_adapter_set_dep_state() stops the neard DEP timer but doesn't clear the timer handle. This can cause neard to try to stop the timer when it isn't running. To fix that, clear the handle so neard doesn't try to stop an already stopped timer. Signed-off-by: Mark Greer <

[PATCH 02/23] ndef: Fix use of uninitialized variable in property_get_type()

2017-06-15 Thread Mark Greer
' is set to NULL when the record type is invalid. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- src/ndef.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ndef.c b/src/ndef.c index b90205b..99f3bc3 100644 --- a/src/ndef.c +++ b/src/ndef.c @@ -342,6 +342,7 @@ static gb

[PATCH 20/23] nfctype5: Discard extra byte in RMB response data

2017-06-15 Thread Mark Greer
Sometimes there can be an extra byte in the response data for Read Multiple Blocks (RMB) commands so discard it whenever that happens. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- plugins/nfctype5.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff

[PATCH 06/23] ndef: Validate text data in WKT Text records

2017-06-15 Thread Mark Greer
Ensure that the text encodings in WKT Text records are valid. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- src/ndef.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/ndef.c b/src/ndef.c index 38dcf72..fb17be9 100644 --- a/src/

[PATCH 22/23] nfctools: Move nciattach macros & enums to nciattach.c

2017-06-15 Thread Mark Greer
that uses them. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- include/nfc_copy.h | 12 tools/nciattach.c | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/nfc_copy.h b/include/nfc_copy.h index 9e21738..0b25f5c 100644 --- a/i

[PATCH 01/23] ndef: Add default language ("en") for Text records

2017-06-15 Thread Mark Greer
ic English) which will be used in these situations. There is no particular reason to choose English other than it is the native language of the patch author and it is the language neard is coded in. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- This is identical to an earlier

[PATCH 16/23] nfctype5: Rework code that identifies ST Micro Type 5 tags

2017-06-15 Thread Mark Greer
Rework the code that identifies ST Micro Type 5 tags to make it conform better to established coding style in the file and to make it easier to add check for tags from other manufacturers. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- plugins/nfctype5.

[PATCH 03/23] ndef: Unrecognized WKTs should return RECORD_TYPE_UNKNOWN

2017-06-15 Thread Mark Greer
-off-by: Mark Greer <mgr...@animalcreek.com> --- src/ndef.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ndef.c b/src/ndef.c index 99f3bc3..03d6b13 100644 --- a/src/ndef.c +++ b/src/ndef.c @@ -928,6 +928,7 @@ static enum record_type get_record_type(enum record_t

[PATCH 09/23] adapter: Clear timeout handle when check presence timer stopped

2017-06-15 Thread Mark Greer
__near_adapter_stop_check_presence() stops the neard check presence timer but doesn't clear the timer handle. This can cause neard to try to stop the timer when it isn't running. To fix that, clear the handle so neard doesn't try to stop an already stopped timer. Signed-off-by: Mark Greer <

[PATCH 19/23] nfctype5: Don't issue RMB command when formatting

2017-06-15 Thread Mark Greer
bit in the CC). This has the benefit of formatting Type 5 tags that don't support RMB at the cost of forcing future readers to use a series of Read Single Block commands for multi-block reads (i.e., slower than a single multi-block read). Signed-off-by: Mark Greer <mgr...@animalcreek.

[PATCH 18/23] nfctype5: Remove useless initialization

2017-06-15 Thread Mark Greer
There is no point in assigning 'local_data' to 'cookie' when 'cookie' is going to be reassigned before it is used. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- plugins/nfctype5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/nfctype5.c b/p

[PATCH 23/23] nfc_copy: Update nfc_copy.h to match Linux kernel's version

2017-06-15 Thread Mark Greer
neard's version of Linux's include/uapi/linux/nfc.h file has become stale so update it to match the most current. The update changes a few macro names which are used by neard so update those names in the neard code as well. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- i

[PATCH 15/23] nfctype5: Remove superfluous parentheses

2017-06-15 Thread Mark Greer
Remove the superfluous parentheses around calls to t5_manufacturer_stmicro(). Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- plugins/nfctype5.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/nfctype5.c b/plugins/nfctype5.c index 29e1d0c..9d09bf8

[PATCH 00/23] neard: Support TI Std & Pro tags, fixups, etc.

2017-06-15 Thread Mark Greer
descriptions. For convenience, a branch with these commits is available in the submit/updates-v1 branch here: https://github.com/animalcreek/neard.git Mark Greer (23): ndef: Add default language ("en") for Text records ndef: Fix use of uninitialized variable in property_get_typ

[PATCH 07/23] adapter: Return '-errno' when socket() call fails

2017-06-15 Thread Mark Greer
near_adapter_connect() incorrectly returns '-1' when the socket() call fails. Instead, it should return '-errno' which is the real error code. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- src/adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapt

[PATCH 12/23] nfctype2: Don't read tags with bad magic number

2017-06-15 Thread Mark Greer
NFC Type 2 tags that have a bad magic number need to be reformatted so do not try to read them. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- plugins/nfctype2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/nfctype2.c b/plugins/nfctype2.c index 559ecb0..f0f1158

[PATCH 08/23] adapter: Return '-errno' when connect() call fails

2017-06-15 Thread Mark Greer
near_adapter_connect() incorrectly returns '-1' when the connect() call fails. Instead, it should return '-errno' which is the real error code. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- src/adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ada

[PATCH 11/23] adapter: Do not poll when there is an active tag

2017-06-15 Thread Mark Greer
and reports it to the poll requestor. At this point, the tag is active but neard no longer has any knowledge of it. Fix this by returning EBUSY when there is an active tag and a new poll request is received. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- src/adapter.c | 3 +++ 1 file c

[PATCH 04/23] ndef: Verify RTD record type name encodings

2017-06-15 Thread Mark Greer
type name encodings are valid before determining their type. Conveniently, isprint() does the correct checking. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- src/ndef.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/ndef.c b/src/ndef.c index 03d6b13..7a3c76b

[PATCH 13/23] nfctype5: Reduce noise when tag is moved out of range

2017-06-15 Thread Mark Greer
The NFC Type 5 tag code prints a message whenever it receives an error. This makes it extra noisy compared to the other tag types whenever a tag is moved out of range. Instead, reduce that noise by turning the error message into a debug message. Signed-off-by: Mark Greer <mgr...@animalcreek.

[PATCH 2/3] NFC: digital: NFC-DEP Target WT(nfcdep,max) is now 14

2017-06-15 Thread Mark Greer
Version 1.1 of the NFC Forum's NFC Digital Protocol Technical Specification dated 2014-07-14 specifies that the NFC-DEP Protocol's Target WT(nfcdep,max) value is 14. In version 1.0 it was 8 so change the value in the Linux NFC-DEP Protocol code accordingly. Signed-off-by: Mark Greer <

[PATCH 3/3] Revert "NFC: trf7970a: Handle extra byte in response to Type 5 RMB commands"

2017-06-15 Thread Mark Greer
org> CC: devicet...@vger.kernel.org Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- .../devicetree/bindings/net/nfc/trf7970a.txt | 4 drivers/nfc/trf7970a.c | 25 -- 2 files changed, 4 insertions(+), 25 deletions(-)

[PATCH 14/23] nfctype5: Add space between 'if' and first '('

2017-06-15 Thread Mark Greer
Add a space between the 'if' and first parenthesis in 'if' statements as no space is both annoying and contrary to neard coding style. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- plugins/nfctype5.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/p

[PATCH 17/23] nfctype5: Add support for TI Standard and Pro Type 5 tag

2017-06-15 Thread Mark Greer
Information command to get it. With this change, Standard and Pro tags can now be formatted, read, and written. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- plugins/nfctype5.c | 61 -- 1 file changed, 59 insertions(+), 2 deletions(-)

[PATCH 21/23] nfctype5: Fix formatting

2017-06-15 Thread Mark Greer
of a variable - no space between '*' and name in declarations/definitions Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- plugins/nfctype5.c | 118 ++--- 1 file changed, 58 insertions(+), 60 deletions(-) diff --git a/plugins/nfctyp

[PATCH 1/2] NFC: digital: Abort cmd when deactivating target

2017-06-15 Thread Mark Greer
When deactivating an active target, the outstanding command should be aborted. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- net/nfc/digital_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/nfc/digital_core.c b/net/nfc/digital_core.c index 0fd5518bf252..145dd74927c4

[PATCH 2/2] NFC: Add NFC_CMD_DEACTIVATE_TARGET support

2017-06-15 Thread Mark Greer
executed, the client application can power off the NFC adapter to reduce power consumption. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- I'm not really sure what the correct argument for the mode parameter of digital_activate_target() is. I do not have any NCI controllers t

[PATCH 0/2] NFC: Add deactivate target functionality

2017-06-15 Thread Mark Greer
active target which will then allow the adapter to be powered down. To be fully operational, this requires companion patches for neard. Those patches will be submitted shortly. Mark Greer (2): NFC: digital: Abort cmd when deactivating target NFC: Add NFC_CMD_DEACTIVATE_TARGET support include

[PATCH 0/4] neard: Add support for deactivating tags

2017-06-15 Thread Mark Greer
fixups, etc." which can be viewed here: https://lists.01.org/pipermail/linux-nfc/2017-June/004392.html For convenience, these commits are available in the 'submit/deactivate_tag-v1' branch of this repo on github: https://github.com/animalcreek/neard.git Mark Gr

[PATCH 3/4] tag: Add Tag deactivate support

2017-06-15 Thread Mark Greer
). Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- doc/tag-api.txt| 8 include/nfc_copy.h | 2 ++ src/near.h | 1 + src/netlink.c | 33 + src/tag.c | 29 + 5 files changed, 73 inse

[PATCH 4/4] test: Add option to deactivate tag

2017-06-15 Thread Mark Greer
Add the 'deactivate' option to test-tag which deactivates the specified tag. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- test/test-tag | 13 + 1 file changed, 13 insertions(+) diff --git a/test/test-tag b/test/test-tag index fd80132..cb2c9e8 100755 --- a/test/te

[PATCH 1/4] adapter: Make adapter_start_poll() global

2017-06-15 Thread Mark Greer
An upcoming commit will need to call adapter_start_poll() from the tag code so make it global. To be consistent with the names of other global routines in adapter.c, add the '__near_' prefix. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- src/adapter.c | 22 +++--

[PATCH 2/4] adapter: Add call indicating whether constant poll is enabled

2017-06-15 Thread Mark Greer
Add a routine that returns a boolean indicating whether the adapter constant poll option is enabled or not. Signed-off-by: Mark Greer <mgr...@animalcreek.com> --- src/adapter.c | 5 + src/near.h| 1 + 2 files changed, 6 insertions(+) diff --git a/src/adapter.c b/src/adapter.c

Re: RTL usb adapter question

2017-10-25 Thread Mark Greer
On Wed, Oct 25, 2017 at 01:43:55PM -0500, David Ashley wrote: > I'm trying to understand how the linux kernel loads RTL8188CUS firmware > rtlwifi: Loading alternative firmware rtlwifi/rtl8192cufw.bin > when that file isn't available anywhere in my embedded system's filesystem. > > Basically I'm

Re: [RESEND][PATCH 2/4] NFC: st21nfca: Fix memory OOB and leak issues in connectivity events handler

2018-04-20 Thread Mark Greer
On Fri, Apr 20, 2018 at 03:39:46PM +0300, Andy Shevchenko wrote: > On Wed, 2018-04-18 at 15:35 +0530, Amit Pundir wrote: > > > if (skb->data[transaction->aid_len + 2] != > > - NFC_EVT_TRANSACTION_PARAMS_TAG) > > + NFC_EVT_TRANSACTION_PARAMS_TAG || > > +