ltc4245 3.2 KB

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