2019-05-19 05:07:45 -07:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2005-04-16 15:20:36 -07:00
|
|
|
#
|
2006-08-13 14:39:11 -07:00
|
|
|
# I2C subsystem configuration
|
2005-04-16 15:20:36 -07:00
|
|
|
#
|
|
|
|
|
2014-05-20 05:59:24 -07:00
|
|
|
menu "I2C support"
|
|
|
|
|
|
|
|
config I2C
|
2005-04-16 15:20:36 -07:00
|
|
|
tristate "I2C support"
|
2009-12-06 09:06:22 -07:00
|
|
|
select RT_MUTEXES
|
2016-10-13 05:10:40 -07:00
|
|
|
select IRQ_DOMAIN
|
2020-06-13 09:50:22 -07:00
|
|
|
help
|
2011-07-08 15:33:24 -07:00
|
|
|
I2C (pronounce: I-squared-C) is a slow serial bus protocol used in
|
2005-04-16 15:20:36 -07:00
|
|
|
many micro controller applications and developed by Philips. SMBus,
|
|
|
|
or System Management Bus is a subset of the I2C protocol. More
|
|
|
|
information is contained in the directory <file:Documentation/i2c/>,
|
|
|
|
especially in the file called "summary" there.
|
|
|
|
|
|
|
|
Both I2C and SMBus are supported here. You will need this for
|
|
|
|
hardware sensors support, and also for Video For Linux support.
|
|
|
|
|
|
|
|
If you want I2C support, you should say Y here and also to the
|
|
|
|
specific driver for your bus adapter(s) below.
|
|
|
|
|
|
|
|
This I2C support can also be built as a module. If so, the module
|
|
|
|
will be called i2c-core.
|
|
|
|
|
2014-08-14 22:38:59 -07:00
|
|
|
config ACPI_I2C_OPREGION
|
|
|
|
bool "ACPI I2C Operation region support"
|
|
|
|
depends on I2C=y && ACPI
|
2014-05-20 05:59:24 -07:00
|
|
|
default y
|
|
|
|
help
|
2014-08-14 22:38:59 -07:00
|
|
|
Say Y here if you want to enable ACPI I2C operation region support.
|
|
|
|
Operation Regions allow firmware (BIOS) code to access I2C slave devices,
|
|
|
|
such as smart batteries through an I2C host controller driver.
|
2014-05-20 05:59:24 -07:00
|
|
|
|
2007-05-01 14:26:34 -07:00
|
|
|
if I2C
|
|
|
|
|
i2c: Add i2c_board_info and i2c_new_device()
This provides partial support for new-style I2C driver binding. It builds
on "struct i2c_board_info" declarations that identify I2C devices on a given
board. This is needed on systems with I2C devices that can't be fully probed
and/or autoconfigured, such as many embedded Linux configurations where the
way a given I2C device is wired may affect how it must be used.
There are two models for declaring such devices:
* LATE -- using a public function i2c_new_device(). This lets modules
declare I2C devices found *AFTER* a given I2C adapter becomes available.
For example, a PCI card could create adapters giving access to utility
chips on that card, and this would be used to associate those chips with
those adapters.
* EARLY -- from arch_initcall() level code, using a non-exported function
i2c_register_board_info(). This copies the declarations *BEFORE* such
an i2c_adapter becomes available, arranging that i2c_new_device() will
be called later when i2c-core registers the relevant i2c_adapter.
For example, arch/.../.../board-*.c files would declare the I2C devices
along with their platform data, and I2C devices would behave much like
PNPACPI devices. (That is, both enumerate from board-specific tables.)
To match the exported i2c_new_device(), the previously-private function
i2c_unregister_device() is now exported.
Pending later patches using these new APIs, this is effectively a NOP.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01 14:26:31 -07:00
|
|
|
config I2C_BOARDINFO
|
2014-12-20 13:41:11 -07:00
|
|
|
bool
|
i2c: Add i2c_board_info and i2c_new_device()
This provides partial support for new-style I2C driver binding. It builds
on "struct i2c_board_info" declarations that identify I2C devices on a given
board. This is needed on systems with I2C devices that can't be fully probed
and/or autoconfigured, such as many embedded Linux configurations where the
way a given I2C device is wired may affect how it must be used.
There are two models for declaring such devices:
* LATE -- using a public function i2c_new_device(). This lets modules
declare I2C devices found *AFTER* a given I2C adapter becomes available.
For example, a PCI card could create adapters giving access to utility
chips on that card, and this would be used to associate those chips with
those adapters.
* EARLY -- from arch_initcall() level code, using a non-exported function
i2c_register_board_info(). This copies the declarations *BEFORE* such
an i2c_adapter becomes available, arranging that i2c_new_device() will
be called later when i2c-core registers the relevant i2c_adapter.
For example, arch/.../.../board-*.c files would declare the I2C devices
along with their platform data, and I2C devices would behave much like
PNPACPI devices. (That is, both enumerate from board-specific tables.)
To match the exported i2c_new_device(), the previously-private function
i2c_unregister_device() is now exported.
Pending later patches using these new APIs, this is effectively a NOP.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01 14:26:31 -07:00
|
|
|
default y
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
config I2C_CHARDEV
|
|
|
|
tristate "I2C device interface"
|
|
|
|
help
|
|
|
|
Say Y here to use i2c-* device files, usually found in the /dev
|
|
|
|
directory on your system. They make it possible to have user-space
|
|
|
|
programs use the I2C bus. Information on how to do this is
|
2019-07-26 05:51:16 -07:00
|
|
|
contained in the file <file:Documentation/i2c/dev-interface.rst>.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
This support is also available as a module. If so, the module
|
|
|
|
will be called i2c-dev.
|
|
|
|
|
2010-08-11 09:21:02 -07:00
|
|
|
config I2C_MUX
|
|
|
|
tristate "I2C bus multiplexing support"
|
|
|
|
help
|
|
|
|
Say Y here if you want the I2C core to support the ability to
|
|
|
|
handle multiplexed I2C bus topologies, by presenting each
|
|
|
|
multiplexed segment as a I2C adapter.
|
|
|
|
|
|
|
|
This support is also available as a module. If so, the module
|
|
|
|
will be called i2c-mux.
|
|
|
|
|
2018-12-11 04:01:04 -07:00
|
|
|
source "drivers/i2c/muxes/Kconfig"
|
2010-08-11 09:21:03 -07:00
|
|
|
|
2023-06-19 05:22:06 -07:00
|
|
|
config I2C_ATR
|
2023-08-15 08:29:11 -07:00
|
|
|
tristate "I2C Address Translator (ATR) support" if COMPILE_TEST
|
2023-06-19 05:22:06 -07:00
|
|
|
help
|
|
|
|
Enable support for I2C Address Translator (ATR) chips.
|
|
|
|
|
|
|
|
An ATR allows accessing multiple I2C busses from a single
|
|
|
|
physical bus via address translation instead of bus selection as
|
|
|
|
i2c-muxes do.
|
|
|
|
|
2008-08-10 13:56:15 -07:00
|
|
|
config I2C_HELPER_AUTO
|
|
|
|
bool "Autoselect pertinent helper modules"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Some I2C bus drivers require so-called "I2C algorithm" modules
|
|
|
|
to work. These are basically software-only abstractions of generic
|
|
|
|
I2C interfaces. This option will autoselect them so that you don't
|
|
|
|
have to care.
|
|
|
|
|
|
|
|
Unselect this only if you need to enable additional helper
|
|
|
|
modules, for example for use with external I2C bus drivers.
|
|
|
|
|
|
|
|
In doubt, say Y.
|
|
|
|
|
2010-03-02 04:23:43 -07:00
|
|
|
config I2C_SMBUS
|
2010-11-06 14:30:25 -07:00
|
|
|
tristate "SMBus-specific protocols" if !I2C_HELPER_AUTO
|
2010-03-02 04:23:43 -07:00
|
|
|
help
|
|
|
|
Say Y here if you want support for SMBus extensions to the I2C
|
2016-07-18 03:39:43 -07:00
|
|
|
specification. At the moment, two extensions are supported:
|
|
|
|
the SMBus Alert protocol and the SMBus Host Notify protocol.
|
2010-03-02 04:23:43 -07:00
|
|
|
|
|
|
|
This support is also available as a module. If so, the module
|
|
|
|
will be called i2c-smbus.
|
|
|
|
|
2018-12-11 04:01:04 -07:00
|
|
|
source "drivers/i2c/algos/Kconfig"
|
|
|
|
source "drivers/i2c/busses/Kconfig"
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-10-05 13:23:52 -07:00
|
|
|
config I2C_STUB
|
|
|
|
tristate "I2C/SMBus Test Stub"
|
2013-01-16 19:53:37 -07:00
|
|
|
depends on m
|
2012-10-05 13:23:52 -07:00
|
|
|
help
|
|
|
|
This module may be useful to developers of SMBus client drivers,
|
|
|
|
especially for certain kinds of sensor chips.
|
|
|
|
|
|
|
|
If you do build this module, be sure to read the notes and warnings
|
2019-07-26 05:51:16 -07:00
|
|
|
in <file:Documentation/i2c/i2c-stub.rst>.
|
2012-10-05 13:23:52 -07:00
|
|
|
|
|
|
|
If you don't know what to do here, definitely say N.
|
|
|
|
|
2014-11-18 09:04:54 -07:00
|
|
|
config I2C_SLAVE
|
|
|
|
bool "I2C slave support"
|
2020-06-28 11:55:22 -07:00
|
|
|
help
|
|
|
|
This enables Linux to act as an I2C slave device. Note that your I2C
|
|
|
|
bus master driver also needs to support this functionality. Please
|
|
|
|
read Documentation/i2c/slave-interface.rst for further details.
|
2014-11-18 09:04:54 -07:00
|
|
|
|
|
|
|
if I2C_SLAVE
|
|
|
|
|
|
|
|
config I2C_SLAVE_EEPROM
|
|
|
|
tristate "I2C eeprom slave driver"
|
2020-06-28 11:54:26 -07:00
|
|
|
help
|
|
|
|
This backend makes Linux behave like an I2C EEPROM. Please read
|
|
|
|
Documentation/i2c/slave-eeprom-backend.rst for further details.
|
2014-11-18 09:04:54 -07:00
|
|
|
|
2020-09-11 00:16:58 -07:00
|
|
|
config I2C_SLAVE_TESTUNIT
|
2024-07-09 23:55:11 -07:00
|
|
|
tristate "I2C testunit driver"
|
2020-09-11 00:16:58 -07:00
|
|
|
help
|
|
|
|
This backend can be used to trigger test cases for I2C bus masters
|
|
|
|
which require a remote device with certain capabilities, e.g.
|
|
|
|
multi-master, SMBus Host Notify, etc. Please read
|
|
|
|
Documentation/i2c/slave-testunit-backend.rst for further details.
|
|
|
|
|
2014-11-18 09:04:54 -07:00
|
|
|
endif
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
config I2C_DEBUG_CORE
|
|
|
|
bool "I2C Core debugging messages"
|
|
|
|
help
|
|
|
|
Say Y here if you want the I2C core to produce a bunch of debug
|
|
|
|
messages to the system log. Select this if you are having a
|
|
|
|
problem with I2C support and want to see more of what is going on.
|
|
|
|
|
|
|
|
config I2C_DEBUG_ALGO
|
|
|
|
bool "I2C Algorithm debugging messages"
|
|
|
|
help
|
|
|
|
Say Y here if you want the I2C algorithm drivers to produce a bunch
|
|
|
|
of debug messages to the system log. Select this if you are having
|
|
|
|
a problem with I2C support and want to see more of what is going
|
|
|
|
on.
|
|
|
|
|
|
|
|
config I2C_DEBUG_BUS
|
|
|
|
bool "I2C Bus debugging messages"
|
2012-10-05 13:23:52 -07:00
|
|
|
depends on HAS_IOMEM
|
2005-04-16 15:20:36 -07:00
|
|
|
help
|
|
|
|
Say Y here if you want the I2C bus drivers to produce a bunch of
|
|
|
|
debug messages to the system log. Select this if you are having
|
|
|
|
a problem with I2C support and want to see more of what is going
|
|
|
|
on.
|
|
|
|
|
2007-05-01 14:26:34 -07:00
|
|
|
endif # I2C
|
2014-05-20 05:59:24 -07:00
|
|
|
|
|
|
|
endmenu
|