Skip to content

Commit 3ddb59d

Browse files
PeterHueweJean Delvare
authored andcommitted
i2c: Make I2C available on UML
Remove the global dependency of the I2C subsystem on HAS_IOMEM and move the dependency to the i2c/busses submenu, with an exception for i2c-stub. The generic I2C part does not need to have HAS_IOMEM set and thus now becomes available in UML, so the I2C subsystem can now be used, e.g. by the i2c-stub driver, for development of I2C device drivers. [JD: Some adjustments.] [Heiko Carstens: Keep I2C disabled on S390.] Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
1 parent 230da09 commit 3ddb59d

2 files changed

Lines changed: 17 additions & 14 deletions

File tree

‎drivers/i2c/Kconfig‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
menuconfig I2C
66
tristate "I2C support"
7-
depends on HAS_IOMEM
7+
depends on !S390
88
select RT_MUTEXES
99
---help---
1010
I2C (pronounce: I-squared-C) is a slow serial bus protocol used in
@@ -49,6 +49,7 @@ config I2C_CHARDEV
4949

5050
config I2C_MUX
5151
tristate "I2C bus multiplexing support"
52+
depends on HAS_IOMEM
5253
help
5354
Say Y here if you want the I2C core to support the ability to
5455
handle multiplexed I2C bus topologies, by presenting each
@@ -86,6 +87,19 @@ config I2C_SMBUS
8687
source drivers/i2c/algos/Kconfig
8788
source drivers/i2c/busses/Kconfig
8889

90+
config I2C_STUB
91+
tristate "I2C/SMBus Test Stub"
92+
depends on EXPERIMENTAL && m
93+
default 'n'
94+
help
95+
This module may be useful to developers of SMBus client drivers,
96+
especially for certain kinds of sensor chips.
97+
98+
If you do build this module, be sure to read the notes and warnings
99+
in <file:Documentation/i2c/i2c-stub>.
100+
101+
If you don't know what to do here, definitely say N.
102+
89103
config I2C_DEBUG_CORE
90104
bool "I2C Core debugging messages"
91105
help
@@ -103,6 +117,7 @@ config I2C_DEBUG_ALGO
103117

104118
config I2C_DEBUG_BUS
105119
bool "I2C Bus debugging messages"
120+
depends on HAS_IOMEM
106121
help
107122
Say Y here if you want the I2C bus drivers to produce a bunch of
108123
debug messages to the system log. Select this if you are having

‎drivers/i2c/busses/Kconfig‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44

55
menu "I2C Hardware Bus support"
6+
depends on HAS_IOMEM
67

78
comment "PC SMBus host controller drivers"
89
depends on PCI
@@ -849,19 +850,6 @@ config I2C_SIBYTE
849850
help
850851
Supports the SiByte SOC on-chip I2C interfaces (2 channels).
851852

852-
config I2C_STUB
853-
tristate "I2C/SMBus Test Stub"
854-
depends on EXPERIMENTAL && m
855-
default 'n'
856-
help
857-
This module may be useful to developers of SMBus client drivers,
858-
especially for certain kinds of sensor chips.
859-
860-
If you do build this module, be sure to read the notes and warnings
861-
in <file:Documentation/i2c/i2c-stub>.
862-
863-
If you don't know what to do here, definitely say N.
864-
865853
config SCx200_I2C
866854
tristate "NatSemi SCx200 I2C using GPIO pins (DEPRECATED)"
867855
depends on SCx200_GPIO

0 commit comments

Comments
 (0)