diff options
author | Daniel Matyas <daniel.matyas@analog.com> | 2023-10-31 21:21:57 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2023-12-11 17:42:58 +0300 |
commit | 29a9ac6414abd634e7f460a250b70a452d9a04b9 (patch) | |
tree | 1c21f26532c296844bcfdf7323763abcd3b22730 /Documentation/hwmon | |
parent | 64176bde4645686590bb0e5efcbcd18497ee4389 (diff) | |
download | linux-29a9ac6414abd634e7f460a250b70a452d9a04b9.tar.xz |
hwmon: (max31827) Add custom attribute for resolution
Added custom channel-specific (temp1) attribute for resolution. The wait
time for a conversion in one-shot mode (enable = 0) depends on the
resolution.
When resolution is 12-bit, the conversion time is 140ms, but the minimum
update_interval is 125ms. Handled this problem by waiting an additional
15ms (125ms + 15ms = 140ms).
Added 'mask' parameter to the shutdown_write() function. Now it can
either write or update bits, depending on the value of mask. This is
needed, because for alarms a write is necessary, but for resolution only
the resolution bits should be updated.
Signed-off-by: Daniel Matyas <daniel.matyas@analog.com>
Link: https://lore.kernel.org/r/20231031182158.124608-5-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'Documentation/hwmon')
-rw-r--r-- | Documentation/hwmon/max31827.rst | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/Documentation/hwmon/max31827.rst b/Documentation/hwmon/max31827.rst index a8bbfb85dd02..44ab9dc064cb 100644 --- a/Documentation/hwmon/max31827.rst +++ b/Documentation/hwmon/max31827.rst @@ -90,11 +90,28 @@ the data sheet are: Enabling the device when it is already enabled has the side effect of setting the conversion frequency to 1 conv/s. The conversion time varies depending on -the resolution. The conversion time doubles with every bit of increased -resolution. For 10 bit resolution 35ms are needed, while for 12 bit resolution -(default) 140ms. When chip is in shutdown mode and a read operation is -requested, one-shot is triggered, the device waits for 140 (conversion time) ms, -and only after that is the temperature value register read. +the resolution. + +The conversion time doubles with every bit of increased resolution. The +available resolutions are: + +- 8 bit -> 8.75 ms conversion time +- 9 bit -> 17.5 ms conversion time +- 10 bit -> 35 ms conversion time +- 12 bit (default) -> 140 ms conversion time + +There is a temp1_resolution attribute which indicates the unit change in the +input temperature in milli-degrees C. + +- 1000 mC -> 8 bit +- 500 mC -> 9 bit +- 250 mC -> 10 bit +- 62 mC -> 12 bit (default) - actually this is 62.5, but the fil returns 62 + +When chip is in shutdown mode and a read operation is requested, one-shot is +triggered, the device waits for <conversion time> ms, and only after that is +the temperature value register read. Note that the conversion times are rounded +up to the nearest possible integer. The LSB of the temperature values is 0.0625 degrees Celsius, but the values of the temperatures are displayed in milli-degrees. This means, that some data is @@ -117,4 +134,4 @@ corresponding status bits. Notes ----- -PEC and resolution are not implemented. +PEC is not implemented. |