diff options
author | Ira W. Snyder <iws@ovro.caltech.edu> | 2010-08-14 21:08:49 +0200 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2010-08-14 21:08:49 +0200 |
commit | 5950ec8d3e47a08ec0b678a0e0ba5d1b9b62dd8e (patch) | |
tree | 8cac7d3dadf50be14b2ac0441e61ecd8935f27e0 /Documentation/hwmon/ltc4245 | |
parent | b9783dcebe952bf73449fe70a19ee4814adc81a0 (diff) |
hwmon: (ltc4245) Expose all GPIO pins as analog voltages
Add support for exposing all GPIO pins as analog voltages. Though this is
not an ideal use of the chip, some hardware engineers may decide that the
LTC4245 meets their design requirements when studying the datasheet.
The GPIO pins are sampled in round-robin fashion, meaning that a slow
reader will see stale data. A userspace application can detect this,
because it will get -EAGAIN when reading from a sysfs file which contains
stale data.
Users can choose to use this feature on a per-chip basis by using either
platform data or the OF device tree (where applicable).
Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'Documentation/hwmon/ltc4245')
-rw-r--r-- | Documentation/hwmon/ltc4245 | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/Documentation/hwmon/ltc4245 b/Documentation/hwmon/ltc4245 index 86b5880d850..b478b086496 100644 --- a/Documentation/hwmon/ltc4245 +++ b/Documentation/hwmon/ltc4245 @@ -72,9 +72,31 @@ in6_min_alarm 5v output undervoltage alarm in7_min_alarm 3v output undervoltage alarm in8_min_alarm Vee (-12v) output undervoltage alarm -in9_input GPIO voltage data +in9_input GPIO voltage data (see note 1) +in10_input GPIO voltage data (see note 1) +in11_input GPIO voltage data (see note 1) power1_input 12v power usage (mW) power2_input 5v power usage (mW) power3_input 3v power usage (mW) power4_input Vee (-12v) power usage (mW) + + +Note 1 +------ + +If you have NOT configured the driver to sample all GPIO pins as analog +voltages, then the in10_input and in11_input sysfs attributes will not be +created. The driver will sample the GPIO pin that is currently connected to the +ADC as an analog voltage, and report the value in in9_input. + +If you have configured the driver to sample all GPIO pins as analog voltages, +then they will be sampled in round-robin fashion. If userspace reads too +slowly, -EAGAIN will be returned when you read the sysfs attribute containing +the sensor reading. + +The LTC4245 chip can be configured to sample all GPIO pins with two methods: +1) platform data -- see include/linux/i2c/ltc4245.h +2) OF device tree -- add the "ltc4245,use-extra-gpios" property to each chip + +The default mode of operation is to sample a single GPIO pin. |