NetBSD/usr.sbin/i2cscan/i2cscan.8

80 lines
2.5 KiB
Groff
Raw Normal View History

2015-11-27 02:29:05 +03:00
.\" $NetBSD: i2cscan.8,v 1.6 2015/11/26 23:29:05 wiz Exp $
2011-10-06 15:13:45 +04:00
.\"
.\" Copyright (c) 2011, 2013 The NetBSD Foundation, Inc.
2011-10-06 15:13:45 +04:00
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Thomas Klausner.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 26, 2015
2011-10-06 15:13:45 +04:00
.Dt I2CSCAN 8
.Os
.Sh NAME
.Nm i2cscan
.Nd scan an IIC bus for devices
.Sh SYNOPSIS
.Nm
.Op Fl r
2011-10-06 15:13:45 +04:00
.Ar i2cdev
.Sh DESCRIPTION
The
.Nm
utility scans the Inter-Integrated Circuit bus
2011-10-06 15:13:45 +04:00
.Pq Xr iic 4
specified by
.Ar i2cdev
to determine which addresses respond.
.Pp
.Ar i2cdev
can be specified with or without the
.Pa /dev
prefix.
2015-11-27 02:29:05 +03:00
For example,
.Pa /dev/iic0
or
.Pa iic0 .
.Pp
Available options:
.Bl -tag -width Ds
.It Fl r
scan using 1 byte reads instead of quick writes.
.El
.Pp
2011-10-06 15:13:45 +04:00
.Em WARNING !
Using this utility can access some devices in such a
manner as to leave them in an unstable or unusable state.
2011-10-06 15:13:45 +04:00
It can also lock up the entire
.Xr iic 4
bus.
Don't use this utility unless you know what you're doing and can
accept all sorts of unforeseen consequences.
.Sh EXIT STATUS
.Ex -std i2cscan
.Sh EXAMPLES
Scan the first IIC bus found on the system for devices:
.Pp
.Dl "i2cscan /dev/iic0"
2011-10-06 15:13:45 +04:00
.Sh SEE ALSO
.Xr iic 4