summaryrefslogtreecommitdiff
path: root/drivers/misc/Makefile
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@foundries.io>2021-02-09 14:52:43 +0300
committerHeiko Schocher <hs@denx.de>2021-02-21 08:07:30 +0300
commitd1f3abe1e71f8e160ca09272ff0463b1b927635d (patch)
tree6714aebfa94a72557a91c308263f6bd52a630dfe /drivers/misc/Makefile
parent73c16692bcf7505d01596f48d2006dadfa3d14ab (diff)
downloadu-boot-d1f3abe1e71f8e160ca09272ff0463b1b927635d.tar.xz
dm: i2c: allow disabling driver model in SPL
At present if U-Boot proper uses driver model for I2C, then SPL has to also. While this is desirable, it places a significant barrier to moving to driver model in some cases. For example, with a space-constrained SPL it may be necessary to enable CONFIG_SPL_OF_PLATDATA which involves adjusting some drivers. This patch introduces a separate Kconfig symbols for enabling DM_I2C and DM_I2C_GPIO support in SPL. This will also help to get away from dirty workarounds to achieve non-DM I2C support for SPL, which is currently used in some board header files like: ifdef CONFIG_SPL_BUILD undef CONFIG_DM_I2C endif Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/misc/Makefile')
-rw-r--r--drivers/misc/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index d737203704..1a49396007 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -17,7 +17,7 @@ obj-$(CONFIG_SANDBOX) += p2sb_sandbox.o p2sb_emul.o
obj-$(CONFIG_SANDBOX) += swap_case.o
endif
-ifdef CONFIG_DM_I2C
+ifdef CONFIG_$(SPL_)DM_I2C
ifndef CONFIG_SPL_BUILD
obj-$(CONFIG_SANDBOX) += i2c_eeprom_emul.o
endif