Skip to content
Commit e7947040 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Guenter Roeck
Browse files

hwmon: (ina2xx) don't accept shunt values greater than the calibration factor



Shunt resistance values greater than the chip's calibration factor make no
sense since the actual value written to the register equals:

	<calibration factor> / <shunt>

Bail-out from ina2xx_probe() if the configured value is greater than the
calibration factor.

Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent f4fe9027
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment