From: Lars Poeschel <poeschel@lemonage.de>
To: "Rymarkiewicz, WaldemarX" <waldemarx.rymarkiewicz@intel.com>
Cc: Lars Poeschel <larsi@wh2.tu-dresden.de>,
"lauro.venancio@openbossa.org" <lauro.venancio@openbossa.org>,
"aloisio.almeida@openbossa.org" <aloisio.almeida@openbossa.org>,
"sameo@linux.intel.com" <sameo@linux.intel.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"jslaby@suse.cz" <jslaby@suse.cz>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linux-nfc@lists.01.org" <linux-nfc@lists.01.org>
Subject: Re: [linux-nfc] [PATCH RFC] nfc: add a driver for pn532 connected on uart
Date: Fri, 23 Aug 2013 11:28:47 +0200 [thread overview]
Message-ID: <201308231128.47731.poeschel@lemonage.de> (raw)
In-Reply-To: <A4DEEF93D8D14A418311321B77DB71E9C9D773@IRSMSX104.ger.corp.intel.com>
On Friday 23 August 2013 at 07:23:00, Rymarkiewicz, WaldemarX wrote:
> Hi Lars,
>
> >This adds a driver for the nxp pn532 nfc chip.
> >It is not meant for merging. Instead it is meant to show that some
> >progress has been made and what the current state is and to help
> >testing.
> >Although I can do some basic things with this driver I expect it to
> >contain lots of bugs. Be aware!
> >This driver is heavily based on the pn533 driver and duplicates much
> >code. This has do be factored out some time.
>
> I'm not sure if this is expected approach adding new drivers. You
> duplicates most of pn533 code which is not good.
Yes, I know that and I explicitly mentioned that. I had to get this chip
working somehow and I had to begin somewhere. The pn533 driver is really
very hard to understand with it's massive use of nested callbacks,
workqueues and usb urbs. So I took the approach to try to understand what
happens while modifying and would then later factor out what both drivers
have in common. The other way is understanding the code first and then
decide what would be needed for both chips, factor that out and then write
the pn532 uart specific stuff. And this uart stuff is a pain itself in
linux. This way seemed much harder to me, especially as I have no pn533
device to test which things will break.
> Also, note that pn533 and pn532 are pretty the same chips (with small
> differences) and it would be quite natural to support both with one
> driver. Pn533 already reads chip version on init, so at this point you
> already know with which chip you are dealing with.
>
> I suggest to separate transport layer from the core in pn533 and add
> support for uart and usb separately. This is exactly what I've planned
> while changing pn533 to support acr122 device.
Yes, I agree with you this should be done. I'll expect it to be challenging
but based on my previous work this could be doable. I'll look into that in
my next free timeslot. I'll not be able to do that in the next two months.
Sorry.
Thank you for your comments,
Lars
next prev parent reply other threads:[~2013-08-23 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-22 14:28 [PATCH RFC] nfc: add a driver for pn532 connected on uart Lars Poeschel
2013-08-23 5:23 ` [linux-nfc] " Rymarkiewicz, WaldemarX
2013-08-23 9:28 ` Lars Poeschel [this message]
2013-08-23 9:47 ` Rymarkiewicz, WaldemarX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201308231128.47731.poeschel@lemonage.de \
--to=poeschel@lemonage.de \
--cc=aloisio.almeida@openbossa.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=larsi@wh2.tu-dresden.de \
--cc=lauro.venancio@openbossa.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfc@lists.01.org \
--cc=linux-wireless@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=waldemarx.rymarkiewicz@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox