diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/DocBook/kernel-api.tmpl | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 8c5698a8c2e1..46bcff2849bd 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -643,6 +643,60 @@ X!Idrivers/video/console/fonts.c | |||
643 | !Edrivers/spi/spi.c | 643 | !Edrivers/spi/spi.c |
644 | </chapter> | 644 | </chapter> |
645 | 645 | ||
646 | <chapter id="i2c"> | ||
647 | <title>I<superscript>2</superscript>C and SMBus Subsystem</title> | ||
648 | |||
649 | <para> | ||
650 | I<superscript>2</superscript>C (or without fancy typography, "I2C") | ||
651 | is an acronym for the "Inter-IC" bus, a simple bus protocol which is | ||
652 | widely used where low data rate communications suffice. | ||
653 | Since it's also a licensed trademark, some vendors use another | ||
654 | name (such as "Two-Wire Interface", TWI) for the same bus. | ||
655 | I2C only needs two signals (SCL for clock, SDA for data), conserving | ||
656 | board real estate and minimizing signal quality issues. | ||
657 | Most I2C devices use seven bit addresses, and bus speeds of up | ||
658 | to 400 kHz; there's a high speed extension (3.4 MHz) that's not yet | ||
659 | found wide use. | ||
660 | I2C is a multi-master bus; open drain signaling is used to | ||
661 | arbitrate between masters, as well as to handshake and to | ||
662 | synchronize clocks from slower clients. | ||
663 | </para> | ||
664 | |||
665 | <para> | ||
666 | The Linux I2C programming interfaces support only the master | ||
667 | side of bus interactions, not the slave side. | ||
668 | The programming interface is structured around two kinds of driver, | ||
669 | and two kinds of device. | ||
670 | An I2C "Adapter Driver" abstracts the controller hardware; it binds | ||
671 | to a physical device (perhaps a PCI device or platform_device) and | ||
672 | exposes a <structname>struct i2c_adapter</structname> representing | ||
673 | each I2C bus segment it manages. | ||
674 | On each I2C bus segment will be I2C devices represented by a | ||
675 | <structname>struct i2c_client</structname>. Those devices will | ||
676 | be bound to a <structname>struct i2c_driver</structname>, | ||
677 | which should follow the standard Linux driver model. | ||
678 | (At this writing, a legacy model is more widely used.) | ||
679 | There are functions to perform various I2C protocol operations; at | ||
680 | this writing all such functions are usable only from task context. | ||
681 | </para> | ||
682 | |||
683 | <para> | ||
684 | The System Management Bus (SMBus) is a sibling protocol. Most SMBus | ||
685 | systems are also I2C conformant. The electrical constraints are | ||
686 | tighter for SMBus, and it standardizes particular protocol messages | ||
687 | and idioms. Controllers that support I2C can also support most | ||
688 | SMBus operations, but SMBus controllers don't support all the protocol | ||
689 | options that an I2C controller will. | ||
690 | There are functions to perform various SMBus protocol operations, | ||
691 | either using I2C primitives or by issuing SMBus commands to | ||
692 | i2c_adapter devices which don't support those I2C operations. | ||
693 | </para> | ||
694 | |||
695 | !Iinclude/linux/i2c.h | ||
696 | !Fdrivers/i2c/i2c-boardinfo.c i2c_register_board_info | ||
697 | !Edrivers/i2c/i2c-core.c | ||
698 | </chapter> | ||
699 | |||
646 | <chapter id="splice"> | 700 | <chapter id="splice"> |
647 | <title>splice API</title> | 701 | <title>splice API</title> |
648 | <para>) | 702 | <para>) |
@@ -654,4 +708,5 @@ X!Idrivers/video/console/fonts.c | |||
654 | !Ffs/splice.c | 708 | !Ffs/splice.c |
655 | </chapter> | 709 | </chapter> |
656 | 710 | ||
711 | |||
657 | </book> | 712 | </book> |