summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRasmus Villemoes <[email protected]>2025-09-19 12:09:55 +0200
committerTom Rini <[email protected]>2025-09-26 11:55:13 -0600
commit0933358163a3c0ef13577853194769504cfb39ea (patch)
tree24a2b953e0fd312fbe8736af908dc1018ea48bcc /include
parente54bf98c3afc6dc6e6ce9496c217cb1c660aac4d (diff)
_exports.h: drop creating dummy i2c entries and fixup config dependency
There's really no good reason to create stub entries that would call a function that doesn't even return anything sensible. The existence of these two i2c_* functions depends on CONFIG_IS_ENABLED(SYS_I2C_LEGACY), which does depend on !DM_I2C, but is not equivalent to it. They are probably rather hard to use unless CMD_I2C and something in U-Boot has called "i2c dev foo" to set the current i2c bus before calling the standalone app, so keep that dependency. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/_exports.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/_exports.h b/include/_exports.h
index 1af946fac32..39278a34942 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -1,7 +1,6 @@
/*
* You need to use #ifdef around functions that may not exist
* in the final configuration (such as i2c).
- * use a dummyfunction as first parameter to EXPORT_FUNC.
* As an example see the CONFIG_CMD_I2C section below
*/
#ifndef EXPORT_FUNC
@@ -43,12 +42,9 @@
EXPORT_FUNC(simple_strtol, long, simple_strtol,
const char *, char **, unsigned int)
EXPORT_FUNC(strcmp, int, strcmp, const char *cs, const char *ct)
-#if defined(CONFIG_CMD_I2C) && !CONFIG_IS_ENABLED(DM_I2C)
+#if defined(CONFIG_CMD_I2C) && CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
EXPORT_FUNC(i2c_write, int, i2c_write, uchar, uint, int , uchar * , int)
EXPORT_FUNC(i2c_read, int, i2c_read, uchar, uint, int , uchar * , int)
-#else
- EXPORT_FUNC(dummy, void, i2c_write, void)
- EXPORT_FUNC(dummy, void, i2c_read, void)
#endif
#if !defined(CONFIG_CMD_SPI) || defined(CONFIG_DM_SPI)