summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-06-28 17:23:13 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-03 15:09:41 -0400
commit9b5db89ea4bfdbb23d4f85f3a7fbf2cd36d20146 (patch)
tree94d68f0a652ab381412336b968ef36094c182973
parent69416739ee3692f4ba890f153d9000e865b73c2d (diff)
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 <mchehab+samsung@kernel.org> Link: https://lore.kernel.org/r/b7dc829809673bd8cffe0e7bbe9c9308681c6fe2.1561756511.git.mchehab+samsung@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--Documentation/misc-devices/eeprom.rst (renamed from Documentation/misc-devices/eeprom)43
-rw-r--r--Documentation/misc-devices/ics932s401.rst (renamed from Documentation/misc-devices/ics932s401)7
-rw-r--r--Documentation/misc-devices/index.rst5
-rw-r--r--Documentation/misc-devices/isl29003.rst (renamed from Documentation/misc-devices/isl29003)15
-rw-r--r--Documentation/misc-devices/lis3lv02d.rst (renamed from Documentation/misc-devices/lis3lv02d)20
-rw-r--r--Documentation/misc-devices/max6875.rst (renamed from Documentation/misc-devices/max6875)52
-rw-r--r--MAINTAINERS4
-rw-r--r--drivers/misc/isl29003.c2
-rw-r--r--drivers/platform/x86/Kconfig2
9 files changed, 108 insertions, 42 deletions
diff --git a/Documentation/misc-devices/eeprom b/Documentation/misc-devices/eeprom.rst
index ba692011f221..008249675ccc 100644
--- a/Documentation/misc-devices/eeprom
+++ b/Documentation/misc-devices/eeprom.rst
@@ -1,11 +1,17 @@
1====================
1Kernel driver eeprom 2Kernel driver eeprom
2==================== 3====================
3 4
4Supported chips: 5Supported chips:
6
5 * Any EEPROM chip in the designated address range 7 * Any EEPROM chip in the designated address range
8
6 Prefix: 'eeprom' 9 Prefix: 'eeprom'
10
7 Addresses scanned: I2C 0x50 - 0x57 11 Addresses scanned: I2C 0x50 - 0x57
12
8 Datasheets: Publicly available from: 13 Datasheets: Publicly available from:
14
9 Atmel (www.atmel.com), 15 Atmel (www.atmel.com),
10 Catalyst (www.catsemi.com), 16 Catalyst (www.catsemi.com),
11 Fairchild (www.fairchildsemi.com), 17 Fairchild (www.fairchildsemi.com),
@@ -16,7 +22,9 @@ Supported chips:
16 Xicor (www.xicor.com), 22 Xicor (www.xicor.com),
17 and others. 23 and others.
18 24
19 Chip Size (bits) Address 25 ========= ============= ============================================
26 Chip Size (bits) Address
27 ========= ============= ============================================
20 24C01 1K 0x50 (shadows at 0x51 - 0x57) 28 24C01 1K 0x50 (shadows at 0x51 - 0x57)
21 24C01A 1K 0x50 - 0x57 (Typical device on DIMMs) 29 24C01A 1K 0x50 - 0x57 (Typical device on DIMMs)
22 24C02 2K 0x50 - 0x57 30 24C02 2K 0x50 - 0x57
@@ -24,7 +32,7 @@ Supported chips:
24 (additional data at 0x51, 0x53, 0x55, 0x57) 32 (additional data at 0x51, 0x53, 0x55, 0x57)
25 24C08 8K 0x50, 0x54 (additional data at 0x51, 0x52, 33 24C08 8K 0x50, 0x54 (additional data at 0x51, 0x52,
26 0x53, 0x55, 0x56, 0x57) 34 0x53, 0x55, 0x56, 0x57)
27 24C16 16K 0x50 (additional data at 0x51 - 0x57) 35 24C16 16K 0x50 (additional data at 0x51 - 0x57)
28 Sony 2K 0x57 36 Sony 2K 0x57
29 37
30 Atmel 34C02B 2K 0x50 - 0x57, SW write protect at 0x30-37 38 Atmel 34C02B 2K 0x50 - 0x57, SW write protect at 0x30-37
@@ -33,14 +41,15 @@ Supported chips:
33 Fairchild 34W02 2K 0x50 - 0x57, SW write protect at 0x30-37 41 Fairchild 34W02 2K 0x50 - 0x57, SW write protect at 0x30-37
34 Microchip 24AA52 2K 0x50 - 0x57, SW write protect at 0x30-37 42 Microchip 24AA52 2K 0x50 - 0x57, SW write protect at 0x30-37
35 ST M34C02 2K 0x50 - 0x57, SW write protect at 0x30-37 43 ST M34C02 2K 0x50 - 0x57, SW write protect at 0x30-37
44 ========= ============= ============================================
36 45
37 46
38Authors: 47Authors:
39 Frodo Looijaard <frodol@dds.nl>, 48 - Frodo Looijaard <frodol@dds.nl>,
40 Philip Edelbrock <phil@netroedge.com>, 49 - Philip Edelbrock <phil@netroedge.com>,
41 Jean Delvare <jdelvare@suse.de>, 50 - Jean Delvare <jdelvare@suse.de>,
42 Greg Kroah-Hartman <greg@kroah.com>, 51 - Greg Kroah-Hartman <greg@kroah.com>,
43 IBM Corp. 52 - IBM Corp.
44 53
45Description 54Description
46----------- 55-----------
@@ -74,23 +83,25 @@ this address will write protect the memory array permanently, and the
74device will no longer respond at the 0x30-37 address. The eeprom driver 83device will no longer respond at the 0x30-37 address. The eeprom driver
75does not support this register. 84does not support this register.
76 85
77Lacking functionality: 86Lacking functionality
87---------------------
78 88
79* Full support for larger devices (24C04, 24C08, 24C16). These are not 89* Full support for larger devices (24C04, 24C08, 24C16). These are not
80typically found on a PC. These devices will appear as separate devices at 90 typically found on a PC. These devices will appear as separate devices at
81multiple addresses. 91 multiple addresses.
82 92
83* Support for really large devices (24C32, 24C64, 24C128, 24C256, 24C512). 93* Support for really large devices (24C32, 24C64, 24C128, 24C256, 24C512).
84These devices require two-byte address fields and are not supported. 94 These devices require two-byte address fields and are not supported.
85 95
86* Enable Writing. Again, no technical reason why not, but making it easy 96* Enable Writing. Again, no technical reason why not, but making it easy
87to change the contents of the EEPROMs (on DIMMs anyway) also makes it easy 97 to change the contents of the EEPROMs (on DIMMs anyway) also makes it easy
88to disable the DIMMs (potentially preventing the computer from booting) 98 to disable the DIMMs (potentially preventing the computer from booting)
89until the values are restored somehow. 99 until the values are restored somehow.
90 100
91Use: 101Use
102---
92 103
93After inserting the module (and any other required SMBus/i2c modules), you 104After inserting the module (and any other required SMBus/i2c modules), you
94should have some EEPROM directories in /sys/bus/i2c/devices/* of names such 105should have some EEPROM directories in ``/sys/bus/i2c/devices/*`` of names such
95as "0-0050". Inside each of these is a series of files, the eeprom file 106as "0-0050". Inside each of these is a series of files, the eeprom file
96contains the binary data from EEPROM. 107contains the binary data from EEPROM.
diff --git a/Documentation/misc-devices/ics932s401 b/Documentation/misc-devices/ics932s401.rst
index bdac67ff6e3f..613ee54a9c21 100644
--- a/Documentation/misc-devices/ics932s401
+++ b/Documentation/misc-devices/ics932s401.rst
@@ -1,10 +1,15 @@
1========================
1Kernel driver ics932s401 2Kernel driver ics932s401
2====================== 3========================
3 4
4Supported chips: 5Supported chips:
6
5 * IDT ICS932S401 7 * IDT ICS932S401
8
6 Prefix: 'ics932s401' 9 Prefix: 'ics932s401'
10
7 Addresses scanned: I2C 0x69 11 Addresses scanned: I2C 0x69
12
8 Datasheet: Publicly available at the IDT website 13 Datasheet: Publicly available at the IDT website
9 14
10Author: Darrick J. Wong 15Author: Darrick J. Wong
diff --git a/Documentation/misc-devices/index.rst b/Documentation/misc-devices/index.rst
index dfd1f45a3127..a57f92dfe49a 100644
--- a/Documentation/misc-devices/index.rst
+++ b/Documentation/misc-devices/index.rst
@@ -14,4 +14,9 @@ fit into other categories.
14.. toctree:: 14.. toctree::
15 :maxdepth: 2 15 :maxdepth: 2
16 16
17 eeprom
17 ibmvmc 18 ibmvmc
19 ics932s401
20 isl29003
21 lis3lv02d
22 max6875
diff --git a/Documentation/misc-devices/isl29003 b/Documentation/misc-devices/isl29003.rst
index 80b952fd32ff..0cc38aed6c00 100644
--- a/Documentation/misc-devices/isl29003
+++ b/Documentation/misc-devices/isl29003.rst
@@ -1,10 +1,15 @@
1======================
1Kernel driver isl29003 2Kernel driver isl29003
2===================== 3======================
3 4
4Supported chips: 5Supported chips:
6
5* Intersil ISL29003 7* Intersil ISL29003
8
6Prefix: 'isl29003' 9Prefix: 'isl29003'
10
7Addresses scanned: none 11Addresses scanned: none
12
8Datasheet: 13Datasheet:
9http://www.intersil.com/data/fn/fn7464.pdf 14http://www.intersil.com/data/fn/fn7464.pdf
10 15
@@ -37,25 +42,33 @@ Sysfs entries
37------------- 42-------------
38 43
39range: 44range:
45 == ===========================
40 0: 0 lux to 1000 lux (default) 46 0: 0 lux to 1000 lux (default)
41 1: 0 lux to 4000 lux 47 1: 0 lux to 4000 lux
42 2: 0 lux to 16,000 lux 48 2: 0 lux to 16,000 lux
43 3: 0 lux to 64,000 lux 49 3: 0 lux to 64,000 lux
50 == ===========================
44 51
45resolution: 52resolution:
53 == =====================
46 0: 2^16 cycles (default) 54 0: 2^16 cycles (default)
47 1: 2^12 cycles 55 1: 2^12 cycles
48 2: 2^8 cycles 56 2: 2^8 cycles
49 3: 2^4 cycles 57 3: 2^4 cycles
58 == =====================
50 59
51mode: 60mode:
61 == =================================================
52 0: diode1's current (unsigned 16bit) (default) 62 0: diode1's current (unsigned 16bit) (default)
53 1: diode1's current (unsigned 16bit) 63 1: diode1's current (unsigned 16bit)
54 2: difference between diodes (l1 - l2, signed 15bit) 64 2: difference between diodes (l1 - l2, signed 15bit)
65 == =================================================
55 66
56power_state: 67power_state:
68 == =================================================
57 0: device is disabled (default) 69 0: device is disabled (default)
58 1: device is enabled 70 1: device is enabled
71 == =================================================
59 72
60lux (read only): 73lux (read only):
61 returns the value from the last sensor reading 74 returns the value from the last sensor reading
diff --git a/Documentation/misc-devices/lis3lv02d b/Documentation/misc-devices/lis3lv02d.rst
index f89960a0ff95..959bd2b822cf 100644
--- a/Documentation/misc-devices/lis3lv02d
+++ b/Documentation/misc-devices/lis3lv02d.rst
@@ -1,3 +1,4 @@
1=======================
1Kernel driver lis3lv02d 2Kernel driver lis3lv02d
2======================= 3=======================
3 4
@@ -8,8 +9,8 @@ Supported chips:
8 LIS331DLH (16 bits) 9 LIS331DLH (16 bits)
9 10
10Authors: 11Authors:
11 Yan Burman <burman.yan@gmail.com> 12 - Yan Burman <burman.yan@gmail.com>
12 Eric Piel <eric.piel@tremplin-utc.net> 13 - Eric Piel <eric.piel@tremplin-utc.net>
13 14
14 15
15Description 16Description
@@ -25,11 +26,15 @@ neverball). The accelerometer data is readable via
25to mg values (1/1000th of earth gravity). 26to mg values (1/1000th of earth gravity).
26 27
27Sysfs attributes under /sys/devices/platform/lis3lv02d/: 28Sysfs attributes under /sys/devices/platform/lis3lv02d/:
28position - 3D position that the accelerometer reports. Format: "(x,y,z)" 29
29rate - read reports the sampling rate of the accelerometer device in HZ. 30position
31 - 3D position that the accelerometer reports. Format: "(x,y,z)"
32rate
33 - read reports the sampling rate of the accelerometer device in HZ.
30 write changes sampling rate of the accelerometer device. 34 write changes sampling rate of the accelerometer device.
31 Only values which are supported by HW are accepted. 35 Only values which are supported by HW are accepted.
32selftest - performs selftest for the chip as specified by chip manufacturer. 36selftest
37 - performs selftest for the chip as specified by chip manufacturer.
33 38
34This driver also provides an absolute input class device, allowing 39This driver also provides an absolute input class device, allowing
35the laptop to act as a pinball machine-esque joystick. Joystick device can be 40the laptop to act as a pinball machine-esque joystick. Joystick device can be
@@ -69,11 +74,12 @@ Axes orientation
69For better compatibility between the various laptops. The values reported by 74For better compatibility between the various laptops. The values reported by
70the accelerometer are converted into a "standard" organisation of the axes 75the accelerometer are converted into a "standard" organisation of the axes
71(aka "can play neverball out of the box"): 76(aka "can play neverball out of the box"):
77
72 * When the laptop is horizontal the position reported is about 0 for X and Y 78 * 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
74 * If the left side is elevated, X increases (becomes positive) 80 * If the left side is elevated, X increases (becomes positive)
75 * If the front side (where the touchpad is) is elevated, Y decreases 81 * If the front side (where the touchpad is) is elevated, Y decreases
76 (becomes negative) 82 (becomes negative)
77 * If the laptop is put upside-down, Z becomes negative 83 * If the laptop is put upside-down, Z becomes negative
78 84
79If your laptop model is not recognized (cf "dmesg"), you can send an 85If your laptop model is not recognized (cf "dmesg"), you can send an
diff --git a/Documentation/misc-devices/max6875 b/Documentation/misc-devices/max6875.rst
index 2f2bd0b17b5d..ad419ac22a5b 100644
--- a/Documentation/misc-devices/max6875
+++ b/Documentation/misc-devices/max6875.rst
@@ -1,12 +1,16 @@
1=====================
1Kernel driver max6875 2Kernel driver max6875
2===================== 3=====================
3 4
4Supported chips: 5Supported chips:
6
5 * Maxim MAX6874, MAX6875 7 * Maxim MAX6874, MAX6875
8
6 Prefix: 'max6875' 9 Prefix: 'max6875'
10
7 Addresses scanned: None (see below) 11 Addresses scanned: None (see below)
8 Datasheet: 12
9 http://pdfserv.maxim-ic.com/en/ds/MAX6874-MAX6875.pdf 13 Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6874-MAX6875.pdf
10 14
11Author: Ben Gardner <bgardner@wabtec.com> 15Author: Ben Gardner <bgardner@wabtec.com>
12 16
@@ -24,9 +28,13 @@ registers.
24 28
25The Maxim MAX6874 is a similar, mostly compatible device, with more inputs 29The Maxim MAX6874 is a similar, mostly compatible device, with more inputs
26and outputs: 30and outputs:
27 vin gpi vout 31
32=========== === === ====
33- vin gpi vout
34=========== === === ====
28MAX6874 6 4 8 35MAX6874 6 4 8
29MAX6875 4 3 5 36MAX6875 4 3 5
37=========== === === ====
30 38
31See the datasheet for more information. 39See the datasheet for more information.
32 40
@@ -41,13 +49,16 @@ General Remarks
41--------------- 49---------------
42 50
43Valid addresses for the MAX6875 are 0x50 and 0x52. 51Valid addresses for the MAX6875 are 0x50 and 0x52.
52
44Valid addresses for the MAX6874 are 0x50, 0x52, 0x54 and 0x56. 53Valid addresses for the MAX6874 are 0x50, 0x52, 0x54 and 0x56.
54
45The driver does not probe any address, so you explicitly instantiate the 55The driver does not probe any address, so you explicitly instantiate the
46devices. 56devices.
47 57
48Example: 58Example::
49$ modprobe max6875 59
50$ echo max6875 0x50 > /sys/bus/i2c/devices/i2c-0/new_device 60 $ modprobe max6875
61 $ echo max6875 0x50 > /sys/bus/i2c/devices/i2c-0/new_device
51 62
52The MAX6874/MAX6875 ignores address bit 0, so this driver attaches to multiple 63The MAX6874/MAX6875 ignores address bit 0, so this driver attaches to multiple
53addresses. For example, for address 0x50, it also reserves 0x51. 64addresses. For example, for address 0x50, it also reserves 0x51.
@@ -58,52 +69,67 @@ Programming the chip using i2c-dev
58---------------------------------- 69----------------------------------
59 70
60Use the i2c-dev interface to access and program the chips. 71Use the i2c-dev interface to access and program the chips.
72
61Reads and writes are performed differently depending on the address range. 73Reads and writes are performed differently depending on the address range.
62 74
63The configuration registers are at addresses 0x00 - 0x45. 75The configuration registers are at addresses 0x00 - 0x45.
76
64Use i2c_smbus_write_byte_data() to write a register and 77Use i2c_smbus_write_byte_data() to write a register and
65i2c_smbus_read_byte_data() to read a register. 78i2c_smbus_read_byte_data() to read a register.
79
66The command is the register number. 80The command is the register number.
67 81
68Examples: 82Examples:
69To write a 1 to register 0x45: 83
84To write a 1 to register 0x45::
85
70 i2c_smbus_write_byte_data(fd, 0x45, 1); 86 i2c_smbus_write_byte_data(fd, 0x45, 1);
71 87
72To read register 0x45: 88To read register 0x45::
89
73 value = i2c_smbus_read_byte_data(fd, 0x45); 90 value = i2c_smbus_read_byte_data(fd, 0x45);
74 91
75 92
76The configuration EEPROM is at addresses 0x8000 - 0x8045. 93The configuration EEPROM is at addresses 0x8000 - 0x8045.
94
77The user EEPROM is at addresses 0x8100 - 0x82ff. 95The user EEPROM is at addresses 0x8100 - 0x82ff.
78 96
79Use i2c_smbus_write_word_data() to write a byte to EEPROM. 97Use i2c_smbus_write_word_data() to write a byte to EEPROM.
80 98
81The command is the upper byte of the address: 0x80, 0x81, or 0x82. 99The command is the upper byte of the address: 0x80, 0x81, or 0x82.
82The data word is the lower part of the address or'd with data << 8. 100The data word is the lower part of the address or'd with data << 8::
101
83 cmd = address >> 8; 102 cmd = address >> 8;
84 val = (address & 0xff) | (data << 8); 103 val = (address & 0xff) | (data << 8);
85 104
86Example: 105Example:
87To write 0x5a to address 0x8003: 106
107To write 0x5a to address 0x8003::
108
88 i2c_smbus_write_word_data(fd, 0x80, 0x5a03); 109 i2c_smbus_write_word_data(fd, 0x80, 0x5a03);
89 110
90 111
91Reading data from the EEPROM is a little more complicated. 112Reading data from the EEPROM is a little more complicated.
113
92Use i2c_smbus_write_byte_data() to set the read address and then 114Use i2c_smbus_write_byte_data() to set the read address and then
93i2c_smbus_read_byte() or i2c_smbus_read_i2c_block_data() to read the data. 115i2c_smbus_read_byte() or i2c_smbus_read_i2c_block_data() to read the data.
94 116
95Example: 117Example:
96To read data starting at offset 0x8100, first set the address: 118
119To read data starting at offset 0x8100, first set the address::
120
97 i2c_smbus_write_byte_data(fd, 0x81, 0x00); 121 i2c_smbus_write_byte_data(fd, 0x81, 0x00);
98 122
99And then read the data 123And then read the data::
124
100 value = i2c_smbus_read_byte(fd); 125 value = i2c_smbus_read_byte(fd);
101 126
102 or 127or::
103 128
104 count = i2c_smbus_read_i2c_block_data(fd, 0x84, 16, buffer); 129 count = i2c_smbus_read_i2c_block_data(fd, 0x84, 16, buffer);
105 130
106The block read should read 16 bytes. 131The block read should read 16 bytes.
132
1070x84 is the block read command. 1330x84 is the block read command.
108 134
109See the datasheet for more details. 135See the datasheet for more details.
diff --git a/MAINTAINERS b/MAINTAINERS
index 59e6670c9576..1fc7bafe1d75 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8871,7 +8871,7 @@ F: include/linux/leds.h
8871LEGACY EEPROM DRIVER 8871LEGACY EEPROM DRIVER
8872M: Jean Delvare <jdelvare@suse.com> 8872M: Jean Delvare <jdelvare@suse.com>
8873S: Maintained 8873S: Maintained
8874F: Documentation/misc-devices/eeprom 8874F: Documentation/misc-devices/eeprom.rst
8875F: drivers/misc/eeprom/eeprom.c 8875F: drivers/misc/eeprom/eeprom.c
8876 8876
8877LEGO MINDSTORMS EV3 8877LEGO MINDSTORMS EV3
@@ -9157,7 +9157,7 @@ F: Documentation/memory-barriers.txt
9157LIS3LV02D ACCELEROMETER DRIVER 9157LIS3LV02D ACCELEROMETER DRIVER
9158M: Eric Piel <eric.piel@tremplin-utc.net> 9158M: Eric Piel <eric.piel@tremplin-utc.net>
9159S: Maintained 9159S: Maintained
9160F: Documentation/misc-devices/lis3lv02d 9160F: Documentation/misc-devices/lis3lv02d.rst
9161F: drivers/misc/lis3lv02d/ 9161F: drivers/misc/lis3lv02d/
9162F: drivers/platform/x86/hp_accel.c 9162F: drivers/platform/x86/hp_accel.c
9163 9163
diff --git a/drivers/misc/isl29003.c b/drivers/misc/isl29003.c
index 5d0d0c3bad85..c12406f610d5 100644
--- a/drivers/misc/isl29003.c
+++ b/drivers/misc/isl29003.c
@@ -3,7 +3,7 @@
3 * isl29003.c - Linux kernel module for 3 * isl29003.c - Linux kernel module for
4 * Intersil ISL29003 ambient light sensor 4 * Intersil ISL29003 ambient light sensor
5 * 5 *
6 * See file:Documentation/misc-devices/isl29003 6 * See file:Documentation/misc-devices/isl29003.rst
7 * 7 *
8 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> 8 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
9 * 9 *
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 5d5cc6111081..efa2ad6635dd 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -341,7 +341,7 @@ config HP_ACCEL
341 341
342 Support for a led indicating disk protection will be provided as 342 Support for a led indicating disk protection will be provided as
343 hp::hddprotect. For more information on the feature, refer to 343 hp::hddprotect. For more information on the feature, refer to
344 Documentation/misc-devices/lis3lv02d. 344 Documentation/misc-devices/lis3lv02d.rst.
345 345
346 To compile this driver as a module, choose M here: the module will 346 To compile this driver as a module, choose M here: the module will
347 be called hp_accel. 347 be called hp_accel.