Skip to content

Commit 9b5db89

Browse files
mchehabgregkh
authored andcommitted
docs: misc-devices: convert files without extension to ReST
Those files are also text files. Convert them to ReST and add to the misc-files index.rst. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Link: https://lore.kernel.org/r/b7dc829809673bd8cffe0e7bbe9c9308681c6fe2.1561756511.git.mchehab+samsung@kernel.org Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6941673 commit 9b5db89

File tree

9 files changed

+108
-42
lines changed

9 files changed

+108
-42
lines changed

Documentation/misc-devices/eeprom renamed to Documentation/misc-devices/eeprom.rst

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
====================
12
Kernel driver eeprom
23
====================
34

45
Supported chips:
6+
57
* Any EEPROM chip in the designated address range
8+
69
Prefix: 'eeprom'
10+
711
Addresses scanned: I2C 0x50 - 0x57
12+
813
Datasheets: Publicly available from:
14+
915
Atmel (www.atmel.com),
1016
Catalyst (www.catsemi.com),
1117
Fairchild (www.fairchildsemi.com),
@@ -16,15 +22,17 @@ Supported chips:
1622
Xicor (www.xicor.com),
1723
and others.
1824

19-
Chip Size (bits) Address
25+
========= ============= ============================================
26+
Chip Size (bits) Address
27+
========= ============= ============================================
2028
24C01 1K 0x50 (shadows at 0x51 - 0x57)
2129
24C01A 1K 0x50 - 0x57 (Typical device on DIMMs)
2230
24C02 2K 0x50 - 0x57
2331
24C04 4K 0x50, 0x52, 0x54, 0x56
2432
(additional data at 0x51, 0x53, 0x55, 0x57)
2533
24C08 8K 0x50, 0x54 (additional data at 0x51, 0x52,
2634
0x53, 0x55, 0x56, 0x57)
27-
24C16 16K 0x50 (additional data at 0x51 - 0x57)
35+
24C16 16K 0x50 (additional data at 0x51 - 0x57)
2836
Sony 2K 0x57
2937

3038
Atmel 34C02B 2K 0x50 - 0x57, SW write protect at 0x30-37
@@ -33,14 +41,15 @@ Supported chips:
3341
Fairchild 34W02 2K 0x50 - 0x57, SW write protect at 0x30-37
3442
Microchip 24AA52 2K 0x50 - 0x57, SW write protect at 0x30-37
3543
ST M34C02 2K 0x50 - 0x57, SW write protect at 0x30-37
44+
========= ============= ============================================
3645

3746

3847
Authors:
39-
Frodo Looijaard <[email protected]>,
40-
Philip Edelbrock <[email protected]>,
41-
Jean Delvare <[email protected]>,
42-
Greg Kroah-Hartman <[email protected]>,
43-
IBM Corp.
48+
- Frodo Looijaard <[email protected]>,
49+
- Philip Edelbrock <[email protected]>,
50+
- Jean Delvare <[email protected]>,
51+
- Greg Kroah-Hartman <[email protected]>,
52+
- IBM Corp.
4453

4554
Description
4655
-----------
@@ -74,23 +83,25 @@ this address will write protect the memory array permanently, and the
7483
device will no longer respond at the 0x30-37 address. The eeprom driver
7584
does not support this register.
7685

77-
Lacking functionality:
86+
Lacking functionality
87+
---------------------
7888

7989
* Full support for larger devices (24C04, 24C08, 24C16). These are not
80-
typically found on a PC. These devices will appear as separate devices at
81-
multiple addresses.
90+
typically found on a PC. These devices will appear as separate devices at
91+
multiple addresses.
8292

8393
* Support for really large devices (24C32, 24C64, 24C128, 24C256, 24C512).
84-
These devices require two-byte address fields and are not supported.
94+
These devices require two-byte address fields and are not supported.
8595

8696
* Enable Writing. Again, no technical reason why not, but making it easy
87-
to change the contents of the EEPROMs (on DIMMs anyway) also makes it easy
88-
to disable the DIMMs (potentially preventing the computer from booting)
89-
until the values are restored somehow.
97+
to change the contents of the EEPROMs (on DIMMs anyway) also makes it easy
98+
to disable the DIMMs (potentially preventing the computer from booting)
99+
until the values are restored somehow.
90100

91-
Use:
101+
Use
102+
---
92103

93104
After inserting the module (and any other required SMBus/i2c modules), you
94-
should have some EEPROM directories in /sys/bus/i2c/devices/* of names such
105+
should have some EEPROM directories in ``/sys/bus/i2c/devices/*`` of names such
95106
as "0-0050". Inside each of these is a series of files, the eeprom file
96107
contains the binary data from EEPROM.

Documentation/misc-devices/ics932s401 renamed to Documentation/misc-devices/ics932s401.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
========================
12
Kernel driver ics932s401
2-
======================
3+
========================
34

45
Supported chips:
6+
57
* IDT ICS932S401
8+
69
Prefix: 'ics932s401'
10+
711
Addresses scanned: I2C 0x69
12+
813
Datasheet: Publicly available at the IDT website
914

1015
Author: Darrick J. Wong

Documentation/misc-devices/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ fit into other categories.
1414
.. toctree::
1515
:maxdepth: 2
1616

17+
eeprom
1718
ibmvmc
19+
ics932s401
20+
isl29003
21+
lis3lv02d
22+
max6875

Documentation/misc-devices/isl29003 renamed to Documentation/misc-devices/isl29003.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
======================
12
Kernel driver isl29003
2-
=====================
3+
======================
34

45
Supported chips:
6+
57
* Intersil ISL29003
8+
69
Prefix: 'isl29003'
10+
711
Addresses scanned: none
12+
813
Datasheet:
914
http://www.intersil.com/data/fn/fn7464.pdf
1015

@@ -37,25 +42,33 @@ Sysfs entries
3742
-------------
3843

3944
range:
45+
== ===========================
4046
0: 0 lux to 1000 lux (default)
4147
1: 0 lux to 4000 lux
4248
2: 0 lux to 16,000 lux
4349
3: 0 lux to 64,000 lux
50+
== ===========================
4451

4552
resolution:
53+
== =====================
4654
0: 2^16 cycles (default)
4755
1: 2^12 cycles
4856
2: 2^8 cycles
4957
3: 2^4 cycles
58+
== =====================
5059

5160
mode:
61+
== =================================================
5262
0: diode1's current (unsigned 16bit) (default)
5363
1: diode1's current (unsigned 16bit)
5464
2: difference between diodes (l1 - l2, signed 15bit)
65+
== =================================================
5566

5667
power_state:
68+
== =================================================
5769
0: device is disabled (default)
5870
1: device is enabled
71+
== =================================================
5972

6073
lux (read only):
6174
returns the value from the last sensor reading

Documentation/misc-devices/lis3lv02d renamed to Documentation/misc-devices/lis3lv02d.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
=======================
12
Kernel driver lis3lv02d
23
=======================
34

@@ -8,8 +9,8 @@ Supported chips:
89
LIS331DLH (16 bits)
910

1011
Authors:
11-
Yan Burman <[email protected]>
12-
Eric Piel <[email protected]>
12+
- Yan Burman <[email protected]>
13+
- Eric Piel <[email protected]>
1314

1415

1516
Description
@@ -25,11 +26,15 @@ neverball). The accelerometer data is readable via
2526
to mg values (1/1000th of earth gravity).
2627

2728
Sysfs attributes under /sys/devices/platform/lis3lv02d/:
28-
position - 3D position that the accelerometer reports. Format: "(x,y,z)"
29-
rate - read reports the sampling rate of the accelerometer device in HZ.
29+
30+
position
31+
- 3D position that the accelerometer reports. Format: "(x,y,z)"
32+
rate
33+
- read reports the sampling rate of the accelerometer device in HZ.
3034
write changes sampling rate of the accelerometer device.
3135
Only values which are supported by HW are accepted.
32-
selftest - performs selftest for the chip as specified by chip manufacturer.
36+
selftest
37+
- performs selftest for the chip as specified by chip manufacturer.
3338

3439
This driver also provides an absolute input class device, allowing
3540
the laptop to act as a pinball machine-esque joystick. Joystick device can be
@@ -69,11 +74,12 @@ Axes orientation
6974
For better compatibility between the various laptops. The values reported by
7075
the accelerometer are converted into a "standard" organisation of the axes
7176
(aka "can play neverball out of the box"):
77+
7278
* When the laptop is horizontal the position reported is about 0 for X and Y
73-
and a positive value for Z
79+
and a positive value for Z
7480
* If the left side is elevated, X increases (becomes positive)
7581
* If the front side (where the touchpad is) is elevated, Y decreases
76-
(becomes negative)
82+
(becomes negative)
7783
* If the laptop is put upside-down, Z becomes negative
7884

7985
If your laptop model is not recognized (cf "dmesg"), you can send an

Documentation/misc-devices/max6875 renamed to Documentation/misc-devices/max6875.rst

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
=====================
12
Kernel driver max6875
23
=====================
34

45
Supported chips:
6+
57
* Maxim MAX6874, MAX6875
8+
69
Prefix: 'max6875'
10+
711
Addresses scanned: None (see below)
8-
Datasheet:
9-
http://pdfserv.maxim-ic.com/en/ds/MAX6874-MAX6875.pdf
12+
13+
Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6874-MAX6875.pdf
1014

1115
Author: Ben Gardner <[email protected]>
1216

@@ -24,9 +28,13 @@ registers.
2428

2529
The Maxim MAX6874 is a similar, mostly compatible device, with more inputs
2630
and outputs:
27-
vin gpi vout
31+
32+
=========== === === ====
33+
- vin gpi vout
34+
=========== === === ====
2835
MAX6874 6 4 8
2936
MAX6875 4 3 5
37+
=========== === === ====
3038

3139
See the datasheet for more information.
3240

@@ -41,13 +49,16 @@ General Remarks
4149
---------------
4250

4351
Valid addresses for the MAX6875 are 0x50 and 0x52.
52+
4453
Valid addresses for the MAX6874 are 0x50, 0x52, 0x54 and 0x56.
54+
4555
The driver does not probe any address, so you explicitly instantiate the
4656
devices.
4757

48-
Example:
49-
$ modprobe max6875
50-
$ echo max6875 0x50 > /sys/bus/i2c/devices/i2c-0/new_device
58+
Example::
59+
60+
$ modprobe max6875
61+
$ echo max6875 0x50 > /sys/bus/i2c/devices/i2c-0/new_device
5162

5263
The MAX6874/MAX6875 ignores address bit 0, so this driver attaches to multiple
5364
addresses. For example, for address 0x50, it also reserves 0x51.
@@ -58,52 +69,67 @@ Programming the chip using i2c-dev
5869
----------------------------------
5970

6071
Use the i2c-dev interface to access and program the chips.
72+
6173
Reads and writes are performed differently depending on the address range.
6274

6375
The configuration registers are at addresses 0x00 - 0x45.
76+
6477
Use i2c_smbus_write_byte_data() to write a register and
6578
i2c_smbus_read_byte_data() to read a register.
79+
6680
The command is the register number.
6781

6882
Examples:
69-
To write a 1 to register 0x45:
83+
84+
To write a 1 to register 0x45::
85+
7086
i2c_smbus_write_byte_data(fd, 0x45, 1);
7187

72-
To read register 0x45:
88+
To read register 0x45::
89+
7390
value = i2c_smbus_read_byte_data(fd, 0x45);
7491

7592

7693
The configuration EEPROM is at addresses 0x8000 - 0x8045.
94+
7795
The user EEPROM is at addresses 0x8100 - 0x82ff.
7896

7997
Use i2c_smbus_write_word_data() to write a byte to EEPROM.
8098

8199
The command is the upper byte of the address: 0x80, 0x81, or 0x82.
82-
The data word is the lower part of the address or'd with data << 8.
100+
The data word is the lower part of the address or'd with data << 8::
101+
83102
cmd = address >> 8;
84103
val = (address & 0xff) | (data << 8);
85104

86105
Example:
87-
To write 0x5a to address 0x8003:
106+
107+
To write 0x5a to address 0x8003::
108+
88109
i2c_smbus_write_word_data(fd, 0x80, 0x5a03);
89110

90111

91112
Reading data from the EEPROM is a little more complicated.
113+
92114
Use i2c_smbus_write_byte_data() to set the read address and then
93115
i2c_smbus_read_byte() or i2c_smbus_read_i2c_block_data() to read the data.
94116

95117
Example:
96-
To read data starting at offset 0x8100, first set the address:
118+
119+
To read data starting at offset 0x8100, first set the address::
120+
97121
i2c_smbus_write_byte_data(fd, 0x81, 0x00);
98122

99-
And then read the data
123+
And then read the data::
124+
100125
value = i2c_smbus_read_byte(fd);
101126

102-
or
127+
or::
103128

104129
count = i2c_smbus_read_i2c_block_data(fd, 0x84, 16, buffer);
105130

106131
The block read should read 16 bytes.
132+
107133
0x84 is the block read command.
108134

109135
See the datasheet for more details.

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8871,7 +8871,7 @@ F: include/linux/leds.h
88718871
LEGACY EEPROM DRIVER
88728872
M: Jean Delvare <[email protected]>
88738873
S: Maintained
8874-
F: Documentation/misc-devices/eeprom
8874+
F: Documentation/misc-devices/eeprom.rst
88758875
F: drivers/misc/eeprom/eeprom.c
88768876

88778877
LEGO MINDSTORMS EV3
@@ -9157,7 +9157,7 @@ F: Documentation/memory-barriers.txt
91579157
LIS3LV02D ACCELEROMETER DRIVER
91589158
M: Eric Piel <[email protected]>
91599159
S: Maintained
9160-
F: Documentation/misc-devices/lis3lv02d
9160+
F: Documentation/misc-devices/lis3lv02d.rst
91619161
F: drivers/misc/lis3lv02d/
91629162
F: drivers/platform/x86/hp_accel.c
91639163

drivers/misc/isl29003.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* isl29003.c - Linux kernel module for
44
* Intersil ISL29003 ambient light sensor
55
*
6-
* See file:Documentation/misc-devices/isl29003
6+
* See file:Documentation/misc-devices/isl29003.rst
77
*
88
* Copyright (c) 2009 Daniel Mack <[email protected]>
99
*

drivers/platform/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ config HP_ACCEL
341341

342342
Support for a led indicating disk protection will be provided as
343343
hp::hddprotect. For more information on the feature, refer to
344-
Documentation/misc-devices/lis3lv02d.
344+
Documentation/misc-devices/lis3lv02d.rst.
345345

346346
To compile this driver as a module, choose M here: the module will
347347
be called hp_accel.

0 commit comments

Comments
 (0)