summaryrefslogtreecommitdiffstats
path: root/scripts/checkkconfigsymbols.py
diff options
context:
space:
mode:
authorStevens, Nick2015-07-01 18:07:41 +0200
committerGuenter Roeck2015-07-01 22:56:27 +0200
commit347d7e45bd09ce09cbc30d5cea9de377eb22f55c (patch)
tree2372f376a79f0b97722a687de31a93af33ca3937 /scripts/checkkconfigsymbols.py
parenthwmon: (nct7802) fix visibility of temp3 (diff)
downloadkernel-qcow2-linux-347d7e45bd09ce09cbc30d5cea9de377eb22f55c.tar.gz
kernel-qcow2-linux-347d7e45bd09ce09cbc30d5cea9de377eb22f55c.tar.xz
kernel-qcow2-linux-347d7e45bd09ce09cbc30d5cea9de377eb22f55c.zip
hwmon: (mcp3021) Fix broken output scaling
The mcp3021 scaling code is dividing the VDD (full-scale) value in millivolts by the A2D resolution to obtain the scaling factor. When VDD is 3300mV (the standard value) and the resolution is 12-bit (4096 divisions), the result is a scale factor of 3300/4096, which is always one. Effectively, the raw A2D reading is always being returned because no scaling is applied. This patch fixes the issue and simplifies the register-to-volts calculation, removing the unneeded "output_scale" struct member. Signed-off-by: Nick Stevens <Nick.Stevens@digi.com> Cc: stable@vger.kernel.org # v3.10+ [Guenter Roeck: Dropped unnecessary value check] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'scripts/checkkconfigsymbols.py')
0 files changed, 0 insertions, 0 deletions