From: Seraphime Kirkovski <kirkseraph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
Seraphime Kirkovski
<kirkseraph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 0/2] spi: spidev: Introduce SPI_IOC_WR_DEFAULT_MAX_SPEED_HZ command
Date: Tue, 9 May 2017 14:23:59 +0200 [thread overview]
Message-ID: <20170509122401.2561-1-kirkseraph@gmail.com> (raw)
Historically SPI_IOC_WR_MAX_SPEED_HZ was changing the ->max_speed_hz field
of the underlying struct spi_dev, which made the effects last way after
releasing one particular /dev/spidev* fd.
This changed in 9169051617df7 ("spi: spidev: Don't mangle max_speed_hz
in underlying spi device") or 7 years after the introduction of
SPI_IOC_WR_MAX_SPEED_HZ ! In the mean time there were userspace tools
developped with the assumptions that the effects of this particular
command are system-wide. [1] is a suite of two small programs for
reading, writing and configuring SPI interfaces. The `spi-config -s`
part was working good in our setup with old 3.x kernels. We discovered
this "regression" when we tried to port our workflow to newer kernels.
I think, this change is necessary, on the one hand, because there are still
a lot of longterm[2] supported kernels out there, whose users may be relying on
SPI_IOC_WR_MAX_SPEED being system-wide and, on the other hand, this
same command has been exhibiting a different behaviour for 3 years now,
so its users may break, if 9169051617df7 is reverted in one way or
another.
The semantics of the proposed command are the same as the old
SPI_IOC_WR_MAX_SPEED_HZ.
[1] https://github.com/cpb-/spi-tools
[2] A quick check on kernel.org shows that all 3.x with longterm support
have not applied 9169051617df7
Seraphime Kirkovski (2):
spi: spidev: introduce SPI_IOC_WR_DEFAULT_MAX_SPEED_HZ command
spi: spidev: document SPI_IOC_WR_DEFAULT_MAX_SPEED_HZ
Documentation/spi/spidev | 7 +++++++
drivers/spi/spidev.c | 8 ++++++--
include/uapi/linux/spi/spidev.h | 4 +++-
3 files changed, 16 insertions(+), 3 deletions(-)
--
2.13.0.rc1
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2017-05-09 12:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 12:23 Seraphime Kirkovski [this message]
2017-05-09 12:24 ` [PATCH 1/2] spi: spidev: introduce SPI_IOC_WR_DEFAULT_MAX_SPEED_HZ command Seraphime Kirkovski
[not found] ` <20170509122401.2561-2-kirkseraph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-14 9:27 ` Mark Brown
2017-05-09 12:24 ` [PATCH 2/2] spi: spidev: document SPI_IOC_WR_DEFAULT_MAX_SPEED_HZ Seraphime Kirkovski
2017-05-14 9:27 ` Mark Brown
2017-05-15 8:17 ` Seraphime Kirkovski
[not found] ` <20170509122401.2561-1-kirkseraph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-15 7:34 ` [PATCH 0/2] spi: spidev: Introduce SPI_IOC_WR_DEFAULT_MAX_SPEED_HZ command Seraphime Kirkovski
2017-05-15 10:35 ` Mark Brown
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=20170509122401.2561-1-kirkseraph@gmail.com \
--to=kirkseraph-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@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;
as well as URLs for NNTP newsgroup(s).