From: Grant Likely <grant.likely@secretlab.ca>
To: Federico Vaga <federico.vaga@gmail.com>
Cc: spi-devel-general@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration
Date: Sat, 22 Dec 2012 09:47:25 +0000 [thread overview]
Message-ID: <20121222094725.797F03E03CE@localhost> (raw)
In-Reply-To: <1440955.3UsNh3CGzX@number-5>
On Thu, 20 Dec 2012 16:30:36 +0100, Federico Vaga <federico.vaga@gmail.com> wrote:
> On Wednesday 19 December 2012 15:09:25 Grant Likely wrote:
> > Not a good idea. sysfs is not a good place for operational
> > interfaces. Please use the spi character devices for direct
> > manipulation of the SPI configuration.
>
> Hello,
>
> Can you explain why it is not a good idea? I do not understand; what
> is the advantage of ioctl through char device? Or what it the issue
> with sysfs?
>
> Thank you very much
I'm cautious about adding operational interfaces to sysfs because it can
be quite difficult to get the locking right. To begin with it splits up
a single interface into multiple files, any of which can be held open by
a process. Then there is the question of ordering of operations when
there are multiple users. For instance, if there were two users, each of
which using different transfer parameters, a sysfs interface doesn't
provide any mechanism to group setting up the device with the transfer.
These are lessons learned the hard way with the gpio sysfs abi. I don't
want to get caught in the same trap for spi.
g.
next prev parent reply other threads:[~2012-12-22 9:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-24 17:20 [PATCH RFC] spidev.c: add sysfs attributes for SPI configuration Federico Vaga
2012-11-24 17:20 ` Federico Vaga
2012-12-19 15:09 ` Grant Likely
2012-12-20 15:30 ` Federico Vaga
2012-12-20 15:30 ` Federico Vaga
2012-12-22 9:47 ` Grant Likely [this message]
2012-12-22 11:21 ` Federico Vaga
2012-12-22 11:21 ` Federico Vaga
2012-12-22 18:29 ` Greg KH
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=20121222094725.797F03E03CE@localhost \
--to=grant.likely@secretlab.ca \
--cc=federico.vaga@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.