Commit 2c8dc071 authored by David Brownell's avatar David Brownell Committed by Dmitry Torokhov

Input: ads7846 - be more compatible with the hwmon framework

 - Hook up to hwmon
     * show sensor attributes only if hwmon is present
     * ... and the board's reference voltage is known
     * otherwise be just a touchscreen
 - Report voltages per hwmon convention
     * measure in millivolts
     * voltages are named in[0-8]_input (ugh)
     * for 7846 chips, properly range-adjust vBATT/in1_input

Battery measurements help during recharge monitoring.  On OSK/Mistral,
the measured voltage agreed with a multimeter to several decimal places.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 15e3589e
...@@ -12,13 +12,18 @@ menuconfig INPUT_TOUCHSCREEN ...@@ -12,13 +12,18 @@ menuconfig INPUT_TOUCHSCREEN
if INPUT_TOUCHSCREEN if INPUT_TOUCHSCREEN
config TOUCHSCREEN_ADS7846 config TOUCHSCREEN_ADS7846
tristate "ADS 7846 based touchscreens" tristate "ADS 7846/7843 based touchscreens"
depends on SPI_MASTER depends on SPI_MASTER
depends on HWMON = n || HWMON
help help
Say Y here if you have a touchscreen interface using the Say Y here if you have a touchscreen interface using the
ADS7846 controller, and your board-specific initialization ADS7846 or ADS7843 controller, and your board-specific setup
code includes that in its table of SPI devices. code includes that in its table of SPI devices.
If HWMON is selected, and the driver is told the reference voltage
on your board, you will also get hwmon interfaces for the voltage
(and on ads7846, temperature) sensors of this chip.
If unsure, say N (but it's safe to say "Y"). If unsure, say N (but it's safe to say "Y").
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
......
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