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