| Ira Snyder | 6e34b18 | 2009-01-07 16:37:32 +0100 | [diff] [blame] | 1 | Kernel driver ltc4245 | 
 | 2 | ===================== | 
 | 3 |  | 
 | 4 | Supported chips: | 
 | 5 |   * Linear Technology LTC4245 | 
 | 6 |     Prefix: 'ltc4245' | 
 | 7 |     Addresses scanned: 0x20-0x3f | 
 | 8 |     Datasheet: | 
 | 9 |         http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1006,C1140,P19392,D13517 | 
 | 10 |  | 
 | 11 | Author: Ira W. Snyder <iws@ovro.caltech.edu> | 
 | 12 |  | 
 | 13 |  | 
 | 14 | Description | 
 | 15 | ----------- | 
 | 16 |  | 
 | 17 | The LTC4245 controller allows a board to be safely inserted and removed | 
 | 18 | from a live backplane in multiple supply systems such as CompactPCI and | 
 | 19 | PCI Express. | 
 | 20 |  | 
 | 21 |  | 
 | 22 | Usage Notes | 
 | 23 | ----------- | 
 | 24 |  | 
 | 25 | This driver does not probe for LTC4245 devices, due to the fact that some | 
| Jean Delvare | 2d2a7cf | 2009-10-04 22:53:42 +0200 | [diff] [blame] | 26 | of the possible addresses are unfriendly to probing. You will have to | 
 | 27 | instantiate the devices explicitly. | 
| Ira Snyder | 6e34b18 | 2009-01-07 16:37:32 +0100 | [diff] [blame] | 28 |  | 
 | 29 | Example: the following will load the driver for an LTC4245 at address 0x23 | 
 | 30 | on I2C bus #1: | 
| Jean Delvare | 2d2a7cf | 2009-10-04 22:53:42 +0200 | [diff] [blame] | 31 | $ modprobe ltc4245 | 
 | 32 | $ echo ltc4245 0x23 > /sys/bus/i2c/devices/i2c-1/new_device | 
| Ira Snyder | 6e34b18 | 2009-01-07 16:37:32 +0100 | [diff] [blame] | 33 |  | 
 | 34 |  | 
 | 35 | Sysfs entries | 
 | 36 | ------------- | 
 | 37 |  | 
 | 38 | The LTC4245 has built-in limits for over and under current warnings. This | 
 | 39 | makes it very likely that the reference circuit will be used. | 
 | 40 |  | 
 | 41 | This driver uses the values in the datasheet to change the register values | 
 | 42 | into the values specified in the sysfs-interface document. The current readings | 
 | 43 | rely on the sense resistors listed in Table 2: "Sense Resistor Values". | 
 | 44 |  | 
 | 45 | in1_input		12v input voltage (mV) | 
 | 46 | in2_input		5v  input voltage (mV) | 
 | 47 | in3_input		3v  input voltage (mV) | 
 | 48 | in4_input		Vee (-12v) input voltage (mV) | 
 | 49 |  | 
 | 50 | in1_min_alarm		12v input undervoltage alarm | 
 | 51 | in2_min_alarm		5v  input undervoltage alarm | 
 | 52 | in3_min_alarm		3v  input undervoltage alarm | 
 | 53 | in4_min_alarm		Vee (-12v) input undervoltage alarm | 
 | 54 |  | 
 | 55 | curr1_input		12v current (mA) | 
 | 56 | curr2_input		5v  current (mA) | 
 | 57 | curr3_input		3v  current (mA) | 
 | 58 | curr4_input		Vee (-12v) current (mA) | 
 | 59 |  | 
 | 60 | curr1_max_alarm		12v overcurrent alarm | 
 | 61 | curr2_max_alarm		5v  overcurrent alarm | 
 | 62 | curr3_max_alarm		3v  overcurrent alarm | 
 | 63 | curr4_max_alarm		Vee (-12v) overcurrent alarm | 
 | 64 |  | 
 | 65 | in5_input		12v output voltage (mV) | 
 | 66 | in6_input		5v  output voltage (mV) | 
 | 67 | in7_input		3v  output voltage (mV) | 
 | 68 | in8_input		Vee (-12v) output voltage (mV) | 
 | 69 |  | 
 | 70 | in5_min_alarm		12v output undervoltage alarm | 
 | 71 | in6_min_alarm		5v  output undervoltage alarm | 
 | 72 | in7_min_alarm		3v  output undervoltage alarm | 
 | 73 | in8_min_alarm		Vee (-12v) output undervoltage alarm | 
 | 74 |  | 
| Ira W. Snyder | 5950ec8 | 2010-08-14 21:08:49 +0200 | [diff] [blame] | 75 | in9_input		GPIO voltage data (see note 1) | 
 | 76 | in10_input		GPIO voltage data (see note 1) | 
 | 77 | in11_input		GPIO voltage data (see note 1) | 
| Ira Snyder | 6e34b18 | 2009-01-07 16:37:32 +0100 | [diff] [blame] | 78 |  | 
 | 79 | power1_input		12v power usage (mW) | 
 | 80 | power2_input		5v  power usage (mW) | 
 | 81 | power3_input		3v  power usage (mW) | 
 | 82 | power4_input		Vee (-12v) power usage (mW) | 
| Ira W. Snyder | 5950ec8 | 2010-08-14 21:08:49 +0200 | [diff] [blame] | 83 |  | 
 | 84 |  | 
 | 85 | Note 1 | 
 | 86 | ------ | 
 | 87 |  | 
 | 88 | If you have NOT configured the driver to sample all GPIO pins as analog | 
 | 89 | voltages, then the in10_input and in11_input sysfs attributes will not be | 
 | 90 | created. The driver will sample the GPIO pin that is currently connected to the | 
 | 91 | ADC as an analog voltage, and report the value in in9_input. | 
 | 92 |  | 
 | 93 | If you have configured the driver to sample all GPIO pins as analog voltages, | 
 | 94 | then they will be sampled in round-robin fashion. If userspace reads too | 
 | 95 | slowly, -EAGAIN will be returned when you read the sysfs attribute containing | 
 | 96 | the sensor reading. | 
 | 97 |  | 
 | 98 | The LTC4245 chip can be configured to sample all GPIO pins with two methods: | 
 | 99 | 1) platform data -- see include/linux/i2c/ltc4245.h | 
 | 100 | 2) OF device tree -- add the "ltc4245,use-extra-gpios" property to each chip | 
 | 101 |  | 
 | 102 | The default mode of operation is to sample a single GPIO pin. |