mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 19:25:05 +07:00
235b84fc86
Pull i2c updates from Wolfram Sang: "This pull request contains: - i2c core reorganization. One source file became too monolithic. It is now split up, yet we still have the same named object as the final output. This should ease maintenance. - new drivers: ZTE ZX2967 family, ASPEED 24XX/25XX - designware driver gained slave mode support - xgene-slimpro driver gained ACPI support - bigger overhaul for pca-platform driver - the algo-bit module now supports messages with enforced STOP - slightly bigger than usual set of driver updates and improvements and with much appreciated quality assurance from Andy Shevchenko" * 'i2c/for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (51 commits) i2c: Provide a stub for i2c_detect_slave_mode() i2c: designware: Let slave adapter support be optional i2c: designware: Make HW init functions static i2c: designware: fix spelling mistakes i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus i2c: pca-platform: correctly set algo_data.reset_chip i2c: acpi: Do not create i2c-clients for LNXVIDEO ACPI devices i2c: designware: enable SLAVE in platform module i2c: designware: add SLAVE mode functions i2c: zx2967: drop COMPILE_TEST dependency i2c: zx2967: always use the same device when printing errors i2c: pca-platform: use dev_warn/dev_info instead of printk i2c: pca-platform: use device managed allocations i2c: pca-platform: add devicetree awareness i2c: pca-platform: switch to struct gpio_desc dt-bindings: add bindings for i2c-pca-platform i2c: cadance: fix ctrl/addr reg write order i2c: zx2967: add i2c controller driver for ZTE's zx2967 family dt: bindings: add documentation for zx2967 family i2c controller i2c: algo-bit: add support for I2C_M_STOP ...
49 lines
2.3 KiB
ReStructuredText
49 lines
2.3 KiB
ReStructuredText
I\ :sup:`2`\ C and SMBus Subsystem
|
|
==================================
|
|
|
|
I\ :sup:`2`\ C (or without fancy typography, "I2C") is an acronym for
|
|
the "Inter-IC" bus, a simple bus protocol which is widely used where low
|
|
data rate communications suffice. Since it's also a licensed trademark,
|
|
some vendors use another name (such as "Two-Wire Interface", TWI) for
|
|
the same bus. I2C only needs two signals (SCL for clock, SDA for data),
|
|
conserving board real estate and minimizing signal quality issues. Most
|
|
I2C devices use seven bit addresses, and bus speeds of up to 400 kHz;
|
|
there's a high speed extension (3.4 MHz) that's not yet found wide use.
|
|
I2C is a multi-master bus; open drain signaling is used to arbitrate
|
|
between masters, as well as to handshake and to synchronize clocks from
|
|
slower clients.
|
|
|
|
The Linux I2C programming interfaces support the master side of bus
|
|
interactions and the slave side. The programming interface is
|
|
structured around two kinds of driver, and two kinds of device. An I2C
|
|
"Adapter Driver" abstracts the controller hardware; it binds to a
|
|
physical device (perhaps a PCI device or platform_device) and exposes a
|
|
:c:type:`struct i2c_adapter <i2c_adapter>` representing each
|
|
I2C bus segment it manages. On each I2C bus segment will be I2C devices
|
|
represented by a :c:type:`struct i2c_client <i2c_client>`.
|
|
Those devices will be bound to a :c:type:`struct i2c_driver
|
|
<i2c_driver>`, which should follow the standard Linux driver model. There
|
|
are functions to perform various I2C protocol operations; at this writing
|
|
all such functions are usable only from task context.
|
|
|
|
The System Management Bus (SMBus) is a sibling protocol. Most SMBus
|
|
systems are also I2C conformant. The electrical constraints are tighter
|
|
for SMBus, and it standardizes particular protocol messages and idioms.
|
|
Controllers that support I2C can also support most SMBus operations, but
|
|
SMBus controllers don't support all the protocol options that an I2C
|
|
controller will. There are functions to perform various SMBus protocol
|
|
operations, either using I2C primitives or by issuing SMBus commands to
|
|
i2c_adapter devices which don't support those I2C operations.
|
|
|
|
.. kernel-doc:: include/linux/i2c.h
|
|
:internal:
|
|
|
|
.. kernel-doc:: drivers/i2c/i2c-boardinfo.c
|
|
:functions: i2c_register_board_info
|
|
|
|
.. kernel-doc:: drivers/i2c/i2c-core-base.c
|
|
:export:
|
|
|
|
.. kernel-doc:: drivers/i2c/i2c-core-smbus.c
|
|
:export:
|