diff options
Diffstat (limited to 'Documentation/hwmon')
-rw-r--r-- | Documentation/hwmon/ds1621 | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Documentation/hwmon/ds1621 b/Documentation/hwmon/ds1621 index d66f76f9d85d..b61e77c6b1cb 100644 --- a/Documentation/hwmon/ds1621 +++ b/Documentation/hwmon/ds1621 | |||
@@ -75,3 +75,68 @@ The DS1721 is pin compatible with the DS1621, has an accuracy of +/- 1.0 | |||
75 | degree Celsius over a -10 to +85 degree range, a minimum/maximum alarm | 75 | degree Celsius over a -10 to +85 degree range, a minimum/maximum alarm |
76 | default setting of 75 and 80 degrees respectively, and a maximum conversion | 76 | default setting of 75 and 80 degrees respectively, and a maximum conversion |
77 | time of 750ms. | 77 | time of 750ms. |
78 | |||
79 | In addition, the DS1721 supports four resolution settings from 9 to 12 bits | ||
80 | (defined in degrees C per LSB: 0.5, 0.25, 0.125, and 0.0625, respectifully), | ||
81 | that are set at device power on to the highest resolution: 12-bits (0.0625 degree C). | ||
82 | |||
83 | Changing the DS1721 resolution mode affects the conversion time and can be | ||
84 | done from userspace, via the device 'update_interval' sysfs attribute. This | ||
85 | attribute will normalize range of input values to the device maximum resolution | ||
86 | values defined in the datasheet as such: | ||
87 | |||
88 | Resolution Conversion Time Input Range | ||
89 | (C/LSB) (msec) (msec) | ||
90 | -------------------------------------------- | ||
91 | 0.5 93.75 0....94 | ||
92 | 0.25 187.5 95...187 | ||
93 | 0.125 375 188..375 | ||
94 | 0.0625 750 376..infinity | ||
95 | -------------------------------------- | ||
96 | |||
97 | The following examples show how the 'update_interval' attribute can be | ||
98 | used to change the conversion time: | ||
99 | |||
100 | $ cat update_interval | ||
101 | 750 | ||
102 | $ cat temp1_input | ||
103 | 22062 | ||
104 | $ | ||
105 | $ echo 300 > update_interval | ||
106 | $ cat update_interval | ||
107 | 375 | ||
108 | $ cat temp1_input | ||
109 | 22125 | ||
110 | $ | ||
111 | $ echo 150 > update_interval | ||
112 | $ cat update_interval | ||
113 | 188 | ||
114 | $ cat temp1_input | ||
115 | 22250 | ||
116 | $ | ||
117 | $ echo 1 > update_interval | ||
118 | $ cat update_interval | ||
119 | 94 | ||
120 | $ cat temp1_input | ||
121 | 22000 | ||
122 | $ | ||
123 | $ echo 1000 > update_interval | ||
124 | $ cat update_interval | ||
125 | 750 | ||
126 | $ cat temp1_input | ||
127 | 22062 | ||
128 | $ | ||
129 | |||
130 | As shown, the ds1621 driver automatically adjusts the 'update_interval' | ||
131 | user input, via a step function. Reading back the 'update_interval' value | ||
132 | after a write operation provides the conversion time used by the device. | ||
133 | |||
134 | Mathematically, the resolution can be derived from the conversion time | ||
135 | via the following function: | ||
136 | |||
137 | g(x) = 0.5 * [minimum_conversion_time/x] | ||
138 | |||
139 | where: | ||
140 | -> 'x' = the output from 'update_interval' | ||
141 | -> 'g(x)' = the resolution in degrees C per LSB. | ||
142 | -> 93.75ms = minimum conversion time | ||