diff options
Diffstat (limited to 'Documentation/w1')
-rw-r--r-- | Documentation/w1/w1.generic | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Documentation/w1/w1.generic b/Documentation/w1/w1.generic index f937fbe1cacb..4c6509dd4789 100644 --- a/Documentation/w1/w1.generic +++ b/Documentation/w1/w1.generic | |||
@@ -27,8 +27,19 @@ When a w1 master driver registers with the w1 subsystem, the following occurs: | |||
27 | 27 | ||
28 | When a device is found on the bus, w1 core checks if driver for it's family is | 28 | When a device is found on the bus, w1 core checks if driver for it's family is |
29 | loaded. If so, the family driver is attached to the slave. | 29 | loaded. If so, the family driver is attached to the slave. |
30 | If there is no driver for the family, a simple sysfs entry is created | 30 | If there is no driver for the family, default one is assigned, which allows to perform |
31 | for the slave device. | 31 | almost any kind of operations. Each logical operation is a transaction |
32 | in nature, which can contain several (two or one) low-level operations. | ||
33 | Let's see how one can read EEPROM context: | ||
34 | 1. one must write control buffer, i.e. buffer containing command byte | ||
35 | and two byte address. At this step bus is reset and appropriate device | ||
36 | is selected using either W1_SKIP_ROM or W1_MATCH_ROM command. | ||
37 | Then provided control buffer is being written to the wire. | ||
38 | 2. reading. This will issue reading eeprom response. | ||
39 | |||
40 | It is possible that between 1. and 2. w1 master thread will reset bus for searching | ||
41 | and slave device will be even removed, but in this case 0xff will | ||
42 | be read, since no device was selected. | ||
32 | 43 | ||
33 | 44 | ||
34 | W1 device families | 45 | W1 device families |
@@ -89,4 +100,5 @@ driver - (standard) symlink to the w1 driver | |||
89 | name - the device name, usually the same as the directory name | 100 | name - the device name, usually the same as the directory name |
90 | w1_slave - (optional) a binary file whose meaning depends on the | 101 | w1_slave - (optional) a binary file whose meaning depends on the |
91 | family driver | 102 | family driver |
92 | 103 | rw - (optional) created for slave devices which do not have | |
104 | appropriate family driver. Allows to read/write binary data. | ||