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