Commit 659cb49d authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

[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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 0b50a217
......@@ -101,7 +101,7 @@ static void __exit hwmon_exit(void)
class_destroy(hwmon_class);
}
module_init(hwmon_init);
subsys_initcall(hwmon_init);
module_exit(hwmon_exit);
EXPORT_SYMBOL_GPL(hwmon_device_register);
......
......@@ -14,10 +14,13 @@ if INPUT_TOUCHSCREEN
config TOUCHSCREEN_ADS7846
tristate "ADS 7846 based touchscreens"
depends on SPI_MASTER
select HWMON
help
Say Y here if you have a touchscreen interface using the
ADS7846 controller, and your board-specific initialization
code includes that in its table of SPI devices.
code includes that in its table of SPI devices. You will
also get hwmon interfaces for the temperature and voltage
sensors this chip provides.
If unsure, say N (but it's safe to say "Y").
......
This diff is collapsed.
Markdown is supported
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