[RESEND PATCH v7 5/5] hwmon: ina2xx: allow to change the averaging rate at run-time

2014-12-19 Thread Bartosz Golaszewski
The averaging rate of ina226 is hardcoded to 16 in the driver. Make it modifiable at run-time via a new sysfs attribute. While we're at it - add an additional variable to ina2xx_data, which holds the current configuration settings - this way we'll be able to restore the configuration in case of

[RESEND PATCH v7 5/5] hwmon: ina2xx: allow to change the averaging rate at run-time

2014-12-19 Thread Bartosz Golaszewski
The averaging rate of ina226 is hardcoded to 16 in the driver. Make it modifiable at run-time via a new sysfs attribute. While we're at it - add an additional variable to ina2xx_data, which holds the current configuration settings - this way we'll be able to restore the configuration in case of