^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # I2C subsystem configuration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) menu "I2C support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) config I2C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) tristate "I2C support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) select RT_MUTEXES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) select IRQ_DOMAIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) I2C (pronounce: I-squared-C) is a slow serial bus protocol used in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) many micro controller applications and developed by Philips. SMBus,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) or System Management Bus is a subset of the I2C protocol. More
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) information is contained in the directory <file:Documentation/i2c/>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) especially in the file called "summary" there.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) Both I2C and SMBus are supported here. You will need this for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) hardware sensors support, and also for Video For Linux support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) If you want I2C support, you should say Y here and also to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) specific driver for your bus adapter(s) below.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) This I2C support can also be built as a module. If so, the module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) will be called i2c-core.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) config ACPI_I2C_OPREGION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) bool "ACPI I2C Operation region support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) depends on I2C=y && ACPI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) Say Y here if you want to enable ACPI I2C operation region support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) Operation Regions allow firmware (BIOS) code to access I2C slave devices,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) such as smart batteries through an I2C host controller driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) if I2C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) config I2C_BOARDINFO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) config I2C_COMPAT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) bool "Enable compatibility bits for old user-space"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) Say Y here if you intend to run lm-sensors 3.1.1 or older, or any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) other user-space package which expects i2c adapters to be class
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) devices. If you don't know, say Y.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) config I2C_CHARDEV
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) tristate "I2C device interface"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) Say Y here to use i2c-* device files, usually found in the /dev
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) directory on your system. They make it possible to have user-space
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) programs use the I2C bus. Information on how to do this is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) contained in the file <file:Documentation/i2c/dev-interface.rst>.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) This support is also available as a module. If so, the module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) will be called i2c-dev.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) config I2C_MUX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) tristate "I2C bus multiplexing support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) Say Y here if you want the I2C core to support the ability to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) handle multiplexed I2C bus topologies, by presenting each
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) multiplexed segment as a I2C adapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) This support is also available as a module. If so, the module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) will be called i2c-mux.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) source "drivers/i2c/muxes/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) config I2C_HELPER_AUTO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) bool "Autoselect pertinent helper modules"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) Some I2C bus drivers require so-called "I2C algorithm" modules
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) to work. These are basically software-only abstractions of generic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) I2C interfaces. This option will autoselect them so that you don't
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) have to care.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) Unselect this only if you need to enable additional helper
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) modules, for example for use with external I2C bus drivers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) In doubt, say Y.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) config I2C_SMBUS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) tristate "SMBus-specific protocols" if !I2C_HELPER_AUTO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) Say Y here if you want support for SMBus extensions to the I2C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) specification. At the moment, two extensions are supported:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) the SMBus Alert protocol and the SMBus Host Notify protocol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) This support is also available as a module. If so, the module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) will be called i2c-smbus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) source "drivers/i2c/algos/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) source "drivers/i2c/busses/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) config I2C_STUB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) tristate "I2C/SMBus Test Stub"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) depends on m
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) This module may be useful to developers of SMBus client drivers,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) especially for certain kinds of sensor chips.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) If you do build this module, be sure to read the notes and warnings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) in <file:Documentation/i2c/i2c-stub.rst>.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) If you don't know what to do here, definitely say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) config I2C_SLAVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) bool "I2C slave support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) This enables Linux to act as an I2C slave device. Note that your I2C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) bus master driver also needs to support this functionality. Please
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) read Documentation/i2c/slave-interface.rst for further details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) if I2C_SLAVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) config I2C_SLAVE_EEPROM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) tristate "I2C eeprom slave driver"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) This backend makes Linux behave like an I2C EEPROM. Please read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) Documentation/i2c/slave-eeprom-backend.rst for further details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) config I2C_SLAVE_TESTUNIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) tristate "I2C eeprom testunit driver"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) This backend can be used to trigger test cases for I2C bus masters
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) which require a remote device with certain capabilities, e.g.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) multi-master, SMBus Host Notify, etc. Please read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) Documentation/i2c/slave-testunit-backend.rst for further details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) config I2C_DEBUG_CORE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) bool "I2C Core debugging messages"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) Say Y here if you want the I2C core to produce a bunch of debug
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) messages to the system log. Select this if you are having a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) problem with I2C support and want to see more of what is going on.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) config I2C_DEBUG_ALGO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) bool "I2C Algorithm debugging messages"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) Say Y here if you want the I2C algorithm drivers to produce a bunch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) of debug messages to the system log. Select this if you are having
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) a problem with I2C support and want to see more of what is going
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) on.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) config I2C_DEBUG_BUS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) bool "I2C Bus debugging messages"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) depends on HAS_IOMEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) Say Y here if you want the I2C bus drivers to produce a bunch of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) debug messages to the system log. Select this if you are having
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) a problem with I2C support and want to see more of what is going
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) on.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) endif # I2C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) endmenu