~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/hwmon/pcf8591.rst

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 Kernel driver pcf8591
  2 =====================
  3 
  4 Supported chips:
  5 
  6   * Philips/NXP PCF8591
  7 
  8     Prefix: 'pcf8591'
  9 
 10     Addresses scanned: none
 11 
 12     Datasheet: Publicly available at the NXP website
 13 
 14                http://www.nxp.com/pip/PCF8591_6.html
 15 
 16 Authors:
 17       - Aurelien Jarno <aurelien@aurel32.net>
 18       - valuable contributions by Jan M. Sendler <sendler@sendler.de>,
 19       - Jean Delvare <jdelvare@suse.de>
 20 
 21 
 22 Description
 23 -----------
 24 
 25 The PCF8591 is an 8-bit A/D and D/A converter (4 analog inputs and one
 26 analog output) for the I2C bus produced by Philips Semiconductors (now NXP).
 27 It is designed to provide a byte I2C interface to up to 4 separate devices.
 28 
 29 The PCF8591 has 4 analog inputs programmable as single-ended or
 30 differential inputs:
 31 
 32 - mode 0 : four single ended inputs
 33         Pins AIN0 to AIN3 are single ended inputs for channels 0 to 3
 34 
 35 - mode 1 : three differential inputs
 36         Pins AIN3 is the common negative differential input
 37         Pins AIN0 to AIN2 are positive differential inputs for channels 0 to 2
 38 
 39 - mode 2 : single ended and differential mixed
 40         Pins AIN0 and AIN1 are single ended inputs for channels 0 and 1
 41         Pins AIN2 is the positive differential input for channel 3
 42         Pins AIN3 is the negative differential input for channel 3
 43 
 44 - mode 3 : two differential inputs
 45         Pins AIN0 is the positive differential input for channel 0
 46         Pins AIN1 is the negative differential input for channel 0
 47         Pins AIN2 is the positive differential input for channel 1
 48         Pins AIN3 is the negative differential input for channel 1
 49 
 50 See the datasheet for details.
 51 
 52 Module parameters
 53 -----------------
 54 
 55 * input_mode int
 56 
 57     Analog input mode:
 58 
 59          - 0 = four single ended inputs
 60          - 1 = three differential inputs
 61          - 2 = single ended and differential mixed
 62          - 3 = two differential inputs
 63 
 64 
 65 Accessing PCF8591 via /sys interface
 66 -------------------------------------
 67 
 68 The PCF8591 is plainly impossible to detect! Thus the driver won't even
 69 try. You have to explicitly instantiate the device at the relevant
 70 address (in the interval [0x48..0x4f]) either through platform data, or
 71 using the sysfs interface. See Documentation/i2c/instantiating-devices.rst
 72 for details.
 73 
 74 Directories are being created for each instantiated PCF8591:
 75 
 76 /sys/bus/i2c/devices/<0>-<1>/
 77    where <0> is the bus the chip is connected to (e. g. i2c-0)
 78    and <1> the chip address ([48..4f])
 79 
 80 Inside these directories, there are such files:
 81 
 82    in0_input, in1_input, in2_input, in3_input, out0_enable, out0_output, name
 83 
 84 Name contains chip name.
 85 
 86 The in0_input, in1_input, in2_input and in3_input files are RO. Reading gives
 87 the value of the corresponding channel. Depending on the current analog inputs
 88 configuration, files in2_input and in3_input may not exist. Values range
 89 from 0 to 255 for single ended inputs and -128 to +127 for differential inputs
 90 (8-bit ADC).
 91 
 92 The out0_enable file is RW. Reading gives "1" for analog output enabled and
 93 "0" for analog output disabled. Writing accepts "0" and "1" accordingly.
 94 
 95 The out0_output file is RW. Writing a number between 0 and 255 (8-bit DAC), send
 96 the value to the digital-to-analog converter. Note that a voltage will
 97 only appears on AOUT pin if aout0_enable equals 1. Reading returns the last
 98 value written.

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php