Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/share/man/man4 Pull up following revision(s) (requested b...
details: https://anonhg.NetBSD.org/src/rev/eb8dd9727dee
branches: netbsd-9
changeset: 953310:eb8dd9727dee
user: martin <martin%NetBSD.org@localhost>
date: Fri Mar 05 13:52:58 2021 +0000
description:
Pull up following revision(s) (requested by nia in ticket #1223):
share/man/man4/spi.4: revision 1.10
share/man/man4/spi.4: revision 1.8
share/man/man4/spi.4: revision 1.9
Document the userspace /dev/spi interface to the best of my ability.
Add ssdfb(4).
Based mostly on a mailing list post by mlelstv;
https://mail-index.netbsd.org/port-arm/2019/02/07/msg005454.html
spi.4: Add a FILES section
spi.4: mention history of ioctl interface
diffstat:
share/man/man4/spi.4 | 56 +++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 53 insertions(+), 3 deletions(-)
diffs (98 lines):
diff -r e2bd1ef0f923 -r eb8dd9727dee share/man/man4/spi.4
--- a/share/man/man4/spi.4 Fri Mar 05 13:48:27 2021 +0000
+++ b/share/man/man4/spi.4 Fri Mar 05 13:52:58 2021 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: spi.4,v 1.7 2019/02/23 17:34:04 wiz Exp $
+.\" $NetBSD: spi.4,v 1.7.2.1 2021/03/05 13:52:58 martin Exp $
.\"
.\" Copyright (c) 2006 Urbana-Champaign Independent Media Center.
.\" Copyright (c) 2006 Garrett D'Amore.
@@ -39,7 +39,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd October 9, 2006
+.Dd February 27, 2021
.Dt SPI 4
.Os
.Sh NAME
@@ -89,11 +89,47 @@
must be provided, as
.Tn SPI
lacks any way to automatically probe devices.
+.Sh IOCTLS
+The following
+.Xr ioctl 2
+calls apply to
+.Em SPI
+devices.
+They are defined in the header file
+.In dev/spi/spi_io.h :
+.Bl -tag -width indent
+.It Dv SPI_IOCTL_CONFIGURE (spi_ioctl_configure_t)
+Used to choose the operational mode and clock.
+The
+.Li sic_mode
+defines polarity and phase of the clock.
+.Li sic_speed
+is the clock speed in Hz, a value of 0 means to keep the default speed
+of the device.
+.Bd -literal
+typedef struct spi_ioctl_configure {
+ int sic_addr;
+ int sic_mode;
+ int sic_speed;
+} spi_ioctl_configure_t;
+.Ed
+.It Dv SPI_IOCTL_TRANSFER (spi_ioctl_transfer_t)
+Used to handle an I/O transaction.
+.Bd -literal
+typedef struct spi_ioctl_transfer {
+ int sit_addr;
+ const void *sit_send;
+ size_t sit_sendlen;
+ void *sit_recv;
+ size_t sit_recvlen;
+} spi_ioctl_transfer_t;
+.Ed
+.El
.Sh HARDWARE
.Nx
includes the following machine-independent
.Tn SPI
-drivers
+drivers:
.Bl -tag -width pcdisplay -offset indent
.It m25p
STMicroelectronics M25P family of NOR flash devices.
@@ -105,12 +141,22 @@
Microchip MCP4801/MCP4811/MCP4821 digital to analog converter.
.It tm121temp
Texas Instruments TMP121 temperature sensor.
+.It ssdfb
+OLED/PLED framebuffer modules.
+.El
+.Sh FILES
+.Bl -tag -width "/dev/spiu" -compact
+.It /dev/spi Ns Ar u
+SPI device unit
+.Ar u
+file.
.El
.Sh SEE ALSO
.Xr m25p 4 ,
.Xr mcp23s17gpio 4 ,
.Xr mcp3kadc 4 ,
.Xr mcp48x1dac 4 ,
+.Xr ssdfb 4 ,
.Xr tm121temp 4 ,
.Xr spi 9
.Sh HISTORY
@@ -122,3 +168,7 @@
Champaign-Urbana Community Wireless Network Project (CUWiN), and
appeared in
.Nx 4.0 .
+The
+.Xr ioctl 2
+interface allowing configuration from userspace appeared in
+.Nx 9.0 .
Home |
Main Index |
Thread Index |
Old Index