hwmon: (ina2xx) make shunt resistance configurable at run-time

The shunt resistance can only be set via platform_data or device tree. This
isn't suitable for devices in which the shunt resistance can change/isn't
known at boot-time.

Add a sysfs attribute that allows to read and set the shunt resistance.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Bartosz Golaszewski 2015-01-05 15:20:55 +01:00 • committed by Guenter Roeck
commit 8a5fc79513
2 changed files with 49 additions and 4 deletions