From: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
To: "Matti J. Aaltonen"
<matti.j.aaltonen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 0/1] PN544 NFC driver.
Date: Fri, 29 Oct 2010 14:33:33 -0700 [thread overview]
Message-ID: <20101029143333.db43953b.akpm@linux-foundation.org> (raw)
In-Reply-To: <1288333569-19979-1-git-send-email-matti.j.aaltonen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
On Fri, 29 Oct 2010 09:26:08 +0300
"Matti J. Aaltonen" <matti.j.aaltonen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org> wrote:
> Hello.
>
> And thanks to Andrew for the comments.
>
> >> include/linux/pn544.h | 99 ++++++
> >
> > Is drivers/misc/ the best place for this?
> >
> > Don't be afraid to create a new drivers/nfc/ even if it has only one
> > driver in it. If someone later comes in and adds a new NFC driver then
> > things will all fall into place.
>
> OK. Now I've created directories drivers/nfc, include/linux/nfc and Documentation/nfc.
I beefed up the changelog a bit, telling people what "nfc" is.
We really should tell more people that we're adding a new subsystem.
Can you please resend the patchset, cc'ing linux-kernel?
> >> +/* sysfs interface */
> >
> > OK, this is more serious.
> >
> > You're proposing a permanent addition to the kernel ABI. This is the
> > most important part of the driver because it is something we can never
> > change. This interface is the very first thing we'll want to
> > understand and review, before we even look at the implementation.
> >
> > And it isn't even described! Not in the changelog, not in a
> > documentation file, not even in code comments.
> >
> > Please, provide a description of this proposed interface. Sufficient
> > for reviewers to understand it and for users to use it. Pobably this
> > will require some description of the hardware functions as well.
> >
> > Please also consider updating Documentation/ABI/
>
> I've added a documentation file. But I didn't make changes to the interface
> yet.
So we can expect some updates?
> >
> > And an ioctl interface as well! An undocmented one.
> >
> > ioctls are pretty unpopular for various reasons. To a large extent,
> > people have been using sysfs interfaces as a repalcement for ioctl()s.
> > But this driver has both!
>
> Some explanatory text written into the documentation file.
So, the sysfs interface is purely for running a device test?
And primary communication is via the /dev node, and that node supports
an ioctl() which changes the meaning of reads and writes to that node?
If so, that's a bit of a peculiar interface. Perhaps there should have
been two /dev nodes. Certainly it would be most popular if the ioctl()
interface were to simply disappear.
Please, do spell all of this out in some detail within the changelog
when resending the code for wider review. There are people out there
(eg Greg, Alan) who are better at these things than I and we should
provide them with all the details up-front without going through
another question-and-answer session or expecting them to grovel through
code to reverse-engineer the interfaces.
Another consideration here is that if we do expect more NFC devices and
drivers for them, then we should aim for some standardisation of the
interface, from day one. Some discussion of this would also be helpful
for reviewers.
One other thing: these messages which flow between userspace and the
device. Are they documented or sufficiently well understood so that
non-Nokia people can use this driver?
Because we had a driver come up a couple of weeks ago. It was a
simple, clean driver but all it did was to shuffle opaque data between
userspace and the device, and the contents of that data was not
publicly available. I discussed the driver with Linus and he said "no".
next prev parent reply other threads:[~2010-10-29 21:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-29 6:26 [PATCH v2 0/1] PN544 NFC driver Matti J. Aaltonen
[not found] ` <1288333569-19979-1-git-send-email-matti.j.aaltonen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-10-29 6:26 ` [PATCH v2 1/1] NFC: Driver for NXP Semiconductors PN544 NFC chip Matti J. Aaltonen
[not found] ` <1288333569-19979-2-git-send-email-matti.j.aaltonen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-10-29 21:35 ` Andrew Morton
[not found] ` <20101029143500.bc1cbc7d.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2010-11-01 8:17 ` Matti J. Aaltonen
2010-10-29 21:33 ` Andrew Morton [this message]
[not found] ` <20101029143333.db43953b.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2010-10-29 22:50 ` [PATCH v2 0/1] PN544 NFC driver Mark Brown
[not found] ` <20101029225008.GA17654-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2010-11-01 12:25 ` Matti J. Aaltonen
[not found] ` <1288614325.1603.96.camel-U1ola594hmgZeDAa2SinrdBPR1lH4CV8@public.gmane.org>
2010-11-01 17:54 ` Mark Brown
2010-11-01 8:10 ` Matti J. Aaltonen
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=20101029143333.db43953b.akpm@linux-foundation.org \
--to=akpm-de/tnxtf+jlsfhdxvbkv3wd2fqjk+8+b@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matti.j.aaltonen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
/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