minix/commands/eepromread/eepromread.1
Thomas Cort 437177b028 i2c: increase BUFLEN/CMDLEN to 128, add page flag.
128 byte reads are much more common than 32 byte reads. The message
passing + setup/teardown for a read is much more expensive, in terms
of time, than the reading itself. A slightly bigger struct is well
worth the time savings. This reduces read times for /dev/eeprom
from 57 seconds per 4KB to 14 seconds.

Additionally, make sending the page address in the eeprom driver
and utility optional. This can save a little time when reading
within the same page and allows support for smaller devices that
don't support pages (example: chips containing EDID).

Change-Id: Ie48087caee40c11fa241d1555fce9309ddd27b43
2013-07-27 08:21:37 -04:00

56 lines
1.6 KiB
Groff

.TH EEPROMREAD 1
.SH NAME
eepromread \- read data from an EEPROM
.SH SYNOPSIS
\fBeepromread\fR [\fB\-i\fR] [\fB\-f\fR \fIdev\fR] [\fB\-a\fR \fIslave_addr\fR]
[\fB\-n\fR]
.br
.de FL
.TP
\\fB\\$1\\fR
\\$2
..
.de EX
.TP 20
\\fB\\$1\\fR
# \\$2
..
.SH OPTIONS
.TP 5
.B \-i
# interpret the data on the EEPROM and display it as a set of fields.
.TP 5
.B \-f
# Use \fIdevice\fR instead of \fI/dev/i2c-1\fR.
.TP 5
.B \-a
# Use \fIslave_address\fR instead of \fI0x50\fR.
.TP 5
.B \-n
# Do not send the page number when addressing the memory on the EEPROM. Some
smaller EEPROM chips aren't organized into pages and get confused if a page
number is sent with the memory address. Use this when reading EDID.
.SH EXAMPLES
.TP 20
.B eepromread -i
# display the contents of the EEPROM as a list of label:value pairs.
.TP 20
.B eepromread
# display the first 256 bytes of the EEPROM in HEX and ASCII.
.TP 20
.B eepromread -f /dev/i2c-3 -a 0x54
# display the first 256 bytes of the EEPROM on I2C bus 3, slave address 0x54.
.TP 20
.B eepromread -f /dev/i2c-3 -n
# read the EDID info from the display on I2C bus 3 on the BeagleBoard-xM.
.SH DESCRIPTION
.PP
\fIeepromread\fR is a simple tool for viewing the contents of an EEPROM.
For EEPROM data that is in a specific format that this program knows how to
detect, \fIeepromread\fR can properly format each of the fields and display
the information via the \fI-i\fR command line option.
.SH NOTES
If the \fIcat24c256\fR driver has claimed the EEPROM device that this
program is attempting to read from, then this program will fail. Once
a driver claims an I2C device, the driver has exclusive access.