android_kernel_samsung_msm8976/drivers/hwmon
Stevens, Nick ec573efa13 hwmon: (mcp3021) Fix broken output scaling
commit 347d7e45bd09ce09cbc30d5cea9de377eb22f55c upstream.

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>
[Guenter Roeck: Dropped unnecessary value check]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03 09:29:46 -07:00
..
pmbus hwmon: (pmbus/lm25066) Add support for LM25056 2013-04-07 21:16:41 -07:00
ab8500.c hwmon: Add ST-Ericsson ABX500 hwmon driver 2013-04-16 18:27:52 -07:00
abituguru.c hwmon: fix error return code in abituguru_probe() 2013-05-13 08:07:13 -07:00
abituguru3.c hwmon: Fix 'Macros with complex values' checkpatch errors 2013-04-07 21:16:38 -07:00
abx500.c more mode_t whack-a-mole... 2013-05-04 14:46:28 -04:00
abx500.h hwmon: Add ST-Ericsson ABX500 hwmon driver 2013-04-16 18:27:52 -07:00
acpi_power_meter.c
ad7314.c hwmon: (ad7314) use spi_get_drvdata() and spi_set_drvdata() 2013-04-07 21:16:42 -07:00
ad7414.c
ad7418.c
adcxx.c
adm1021.c hwmon: (adm1021) Fix cache problem when writing temperature limits 2014-07-17 15:58:01 -07:00
adm1025.c
adm1026.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
adm1029.c hwmon: (adm1029) Ensure the fan_div cache is updated in set_fan_div 2014-07-17 15:58:00 -07:00
adm1031.c hwmon: (adm1031) Fix writes to limit registers 2014-07-17 15:58:00 -07:00
adm9240.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
ads1015.c hwmon: (ads1015) Fix out-of-bounds array access 2014-09-05 16:28:35 -07:00
ads7828.c
ads7871.c hwmon: Fix CamelCase checkpatch warnings 2013-04-07 21:16:40 -07:00
adt7x10.c hwmon: (adt7x10) Add alarm interrupt support 2013-04-07 21:16:38 -07:00
adt7x10.h hwmon: (adt7x10) Add alarm interrupt support 2013-04-07 21:16:38 -07:00
adt7310.c hwmon: (adt7310) Fix sparse warning 2013-04-07 21:16:41 -07:00
adt7410.c hwmon: (adt7x10) Add alarm interrupt support 2013-04-07 21:16:38 -07:00
adt7411.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
adt7462.c
adt7470.c hwmon: (adt7470) Fix writes to temperature limit registers 2014-07-28 08:00:03 -07:00
adt7475.c
amc6821.c hwmon: (amc6821) Fix permissions for temp2_input 2014-07-17 15:58:00 -07:00
applesmc.c hwmon: (applesmc) Always read until end of data 2013-10-18 07:45:44 -07:00
asb100.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
asc7621.c hwmon: Fix CamelCase checkpatch warnings 2013-04-07 21:16:40 -07:00
asus_atk0110.c
atxp1.c
coretemp.c hwmon: (coretemp) Fix truncated name of alarm attributes 2014-01-25 08:27:11 -08:00
da9052-hwmon.c hwmon: (da9052) Don't use dash in the name attribute 2014-07-28 08:00:03 -07:00
da9055-hwmon.c hwmon: (da9055) Don't use dash in the name attribute 2014-07-28 08:00:03 -07:00
dme1737.c hwmon: (dme1737) Prevent overflow problem when writing large limits 2014-09-05 16:28:35 -07:00
ds620.c
ds1621.c
emc6w201.c
emc1403.c hwmon: (emc1403) Support full range of known chip revision numbers 2014-06-07 13:25:31 -07:00
emc2103.c
f71805f.c hwmon: checkpatch cleanup: Replace printk with pr_debug or dev_dbg as appropriate 2013-04-07 21:16:38 -07:00
f71882fg.c
f75375s.c
fam15h_power.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
fschmd.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
g760a.c
gl518sm.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
gl520sm.c
gpio-fan.c hwmon: (gpio-fan) Prevent overflow problem when writing large limits 2014-09-05 16:28:35 -07:00
hih6130.c hwmon: HIH-6130: Support I2C bus drivers without I2C_FUNC_SMBUS_QUICK 2013-12-20 07:45:07 -08:00
hwmon-vid.c
hwmon.c
i5k_amb.c
ibmaem.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
ibmpex.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
iio_hwmon.c hwmon: (iio_hwmon) Fix null pointer dereference 2013-05-13 06:43:14 -07:00
ina2xx.c hwmon: (ina2xx) Cast to s16 on shunt and current regs 2014-07-09 11:14:01 -07:00
ina209.c
it87.c hwmon: Fix CamelCase checkpatch warnings 2013-04-07 21:16:40 -07:00
jc42.c hwmon: (jc42) Add support for MCP98244 2013-02-06 09:58:07 -08:00
jz4740-hwmon.c
k8temp.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
k10temp.c hwmon: (k10temp) Add support for Kaveri CPUs 2014-02-06 11:08:14 -08:00
Kconfig hwmon: (ntc_thermistor) Fix dependencies 2014-06-11 12:03:22 -07:00
lineage-pem.c hwmon: (lineage-pem) Add missing terminating entry for pem_[input|fan]_attributes 2013-03-14 06:55:21 -07:00
lm63.c
lm70.c
lm73.c
lm75.c hwmon: (lm75) Add support for the Dallas/Maxim DS7505 2013-05-04 14:49:36 +02:00
lm75.h hwmon: (lm75.h) Update header inclusion 2013-03-18 21:19:49 +01:00
lm77.c
lm78.c hwmon: (lm78) Fix overflow problems seen when writing large temperature limits 2014-09-05 16:28:35 -07:00
lm80.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
lm83.c
lm85.c hwmon: (lm85) Fix various errors on attribute writes 2014-09-05 16:28:35 -07:00
lm87.c
lm90.c hwmon: (lm90) Fix max6696 alarm handling 2013-11-29 11:11:50 -08:00
lm92.c
lm93.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
lm95234.c hwmon: Add driver for LM95234 2013-04-07 21:16:42 -07:00
lm95241.c
lm95245.c
ltc4151.c hwmon: (ltc4151) Fix 'Avoid unnecessary line continuations' checkpatch warning 2013-04-07 21:16:40 -07:00
ltc4215.c hwmon: (ltc4215) Fix 'Macros with complex values' checkpatch error 2013-04-07 21:16:40 -07:00
ltc4245.c hwmon: (ltc4245) Fix 'Macros with complex values' checkpatch error 2013-04-07 21:16:40 -07:00
ltc4261.c hwmon: (ltc4261) Fix 'Macros with complex values' checkpatch error 2013-04-07 21:16:40 -07:00
Makefile Highlights: 2013-04-30 15:15:24 -07:00
max197.c
max1111.c
max1619.c
max1668.c hwmon: (max1668) Fix writing the minimum temperature 2014-03-06 21:30:11 -08:00
max6639.c
max6642.c
max6650.c
max6697.c hwmon: (max6697) fix MAX6581 ideality 2013-08-11 18:35:21 -07:00
max16065.c
mc13783-adc.c hwmon: (mc13783-adc.c) use module_platform_driver_probe() 2013-04-07 21:16:37 -07:00
mcp3021.c hwmon: (mcp3021) Fix broken output scaling 2015-08-03 09:29:46 -07:00
nct6775.c hwmon: (nct6775) Drop unsupported fan alarm attributes for NCT6775 2013-07-25 14:07:27 -07:00
ntc_thermistor.c hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE 2015-06-05 23:19:54 -07:00
pc87360.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
pc87427.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
pcf8591.c
s3c-hwmon.c hwmon: Fix 'Macros with complex values' checkpatch errors 2013-04-07 21:16:38 -07:00
sch56xx-common.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
sch56xx-common.h
sch5627.c
sch5636.c
sht15.c hwmon: (sht15) Check return value of regulator_enable() 2013-03-03 21:45:48 -08:00
sht21.c
sis5595.c hwmon: (sis5595) Prevent overflow problem when writing large limits 2014-09-05 16:28:35 -07:00
smm665.c
smsc47b397.c
smsc47m1.c
smsc47m192.c hwmon: (smsc47m192) Fix temperature limit and vrm write operations 2014-07-31 12:53:51 -07:00
thmc50.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
tmp102.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
tmp401.c hwmon: (tmp401) Drop redundant safety on cache lifetime 2013-05-19 08:19:29 -07:00
tmp421.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
twl4030-madc-hwmon.c
ultra45_env.c
vexpress.c
via-cputemp.c
via686a.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
vt1211.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
vt8231.c hwmon: Prevent some divide by zeros in FAN_TO_REG() 2013-12-20 07:45:07 -08:00
w83l785ts.c
w83l786ng.c hwmon: (w83l768ng) Fix fan speed control range 2013-12-20 07:45:08 -08:00
w83627ehf.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
w83627hf.c
w83781d.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
w83791d.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
w83792d.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
w83793.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
w83795.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
wm831x-hwmon.c
wm8350-hwmon.c