xref: /netbsd-src/usr.sbin/i2cscan/i2cscan.8 (revision 560cfcce81ec46d63abdc86115fbaccae41a01ba)
1*560cfcceSriastradh.\"	$NetBSD: i2cscan.8,v 1.7 2019/11/30 02:47:14 riastradh Exp $
2ed0c37a1Swiz.\"
3998a133bStcort.\" Copyright (c) 2011, 2013 The NetBSD Foundation, Inc.
4ed0c37a1Swiz.\" All rights reserved.
5ed0c37a1Swiz.\"
6ed0c37a1Swiz.\" This code is derived from software contributed to The NetBSD Foundation
7ed0c37a1Swiz.\" by Thomas Klausner.
8ed0c37a1Swiz.\"
9ed0c37a1Swiz.\" Redistribution and use in source and binary forms, with or without
10ed0c37a1Swiz.\" modification, are permitted provided that the following conditions
11ed0c37a1Swiz.\" are met:
12ed0c37a1Swiz.\" 1. Redistributions of source code must retain the above copyright
13ed0c37a1Swiz.\"    notice, this list of conditions and the following disclaimer.
14ed0c37a1Swiz.\" 2. Redistributions in binary form must reproduce the above copyright
15ed0c37a1Swiz.\"    notice, this list of conditions and the following disclaimer in the
16ed0c37a1Swiz.\"    documentation and/or other materials provided with the distribution.
17ed0c37a1Swiz.\"
18ed0c37a1Swiz.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19ed0c37a1Swiz.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20ed0c37a1Swiz.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21ed0c37a1Swiz.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22ed0c37a1Swiz.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23ed0c37a1Swiz.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24ed0c37a1Swiz.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25ed0c37a1Swiz.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26ed0c37a1Swiz.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27ed0c37a1Swiz.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28ed0c37a1Swiz.\" POSSIBILITY OF SUCH DAMAGE.
29ed0c37a1Swiz.\"
309ad20c88Shubertf.Dd November 26, 2015
31ed0c37a1Swiz.Dt I2CSCAN 8
32ed0c37a1Swiz.Os
33ed0c37a1Swiz.Sh NAME
34ed0c37a1Swiz.Nm i2cscan
35ed0c37a1Swiz.Nd scan an IIC bus for devices
36ed0c37a1Swiz.Sh SYNOPSIS
37ed0c37a1Swiz.Nm
38998a133bStcort.Op Fl r
39ed0c37a1Swiz.Ar i2cdev
40ed0c37a1Swiz.Sh DESCRIPTION
41ed0c37a1SwizThe
42ed0c37a1Swiz.Nm
439ad20c88Shubertfutility scans the Inter-Integrated Circuit bus
44ed0c37a1Swiz.Pq Xr iic 4
45ed0c37a1Swizspecified by
46ed0c37a1Swiz.Ar i2cdev
47ed0c37a1Swizto determine which addresses respond.
48ed0c37a1Swiz.Pp
499ad20c88Shubertf.Ar i2cdev
509ad20c88Shubertfcan be specified with or without the
519ad20c88Shubertf.Pa /dev
529ad20c88Shubertfprefix.
539ad20c88ShubertfFor example,
549ad20c88Shubertf.Pa /dev/iic0
559ad20c88Shubertfor
569ad20c88Shubertf.Pa iic0 .
579ad20c88Shubertf.Pp
58998a133bStcortAvailable options:
59998a133bStcort.Bl -tag -width Ds
60998a133bStcort.It Fl r
61998a133bStcortscan using 1 byte reads instead of quick writes.
62998a133bStcort.El
63998a133bStcort.Pp
64*560cfcceSriastradh.Sy WARNING :
65ed0c37a1SwizUsing this utility can access some devices in such a
66460ef575Spgoyettemanner as to leave them in an unstable or unusable state.
67ed0c37a1SwizIt can also lock up the entire
68ed0c37a1Swiz.Xr iic 4
69ed0c37a1Swizbus.
70ed0c37a1SwizDon't use this utility unless you know what you're doing and can
71ed0c37a1Swizaccept all sorts of unforeseen consequences.
72ed0c37a1Swiz.Sh EXIT STATUS
73ed0c37a1Swiz.Ex -std i2cscan
740654568cShubertf.Sh EXAMPLES
750654568cShubertfScan the first IIC bus found on the system for devices:
760654568cShubertf.Pp
770654568cShubertf.Dl "i2cscan /dev/iic0"
78ed0c37a1Swiz.Sh SEE ALSO
79ed0c37a1Swiz.Xr iic 4
80