[PATCH] ARM: OMAP: ads7846 updates, mostly for hwmon
The ads784x chips include not just touchscreen sensors but also temperature
and voltage sensors, which are traditional hwmon fodder.
- Register with the hwmon framework
* hwmon needs to use subsys_init() so it's available early enough
- Adopt hwmon convention for presenting voltages:
* Report voltages in millivolts
* Attribute names are "in[0-8]_input" (meaningless, ugh)
- Be more accurate for the hwmon values:
* vBATT gets range-adjusted
* Discard the extra bit sent before the sample.
Battery measurements help during battery recharge monitoring. On OSK/Mistral,
the measured voltage agreed with a multimeter until the fourth decimal place.
NOTE: this version is only for the OMAP tree, which has some byteswap bugs
(and other changes) that are not found in the upstream kernels.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>