refactor(core): pull i2c only with touch drivers that need it
What changed, and why it matters
This is a small internal cleanup in the Trezor firmware's build configuration. It moves the requirement for an I2C bus from the generic 'touch' feature down to the specific touch-screen driver features that actually use it. There is no direct evidence in the commit that this fixes a security vulnerability; it appears to be a refactoring to avoid pulling in unused hardware support.
No immediate security action required. Treat as routine build-system refactoring. If reviewing for defense in depth, verify that boards using touch_none or other non-I2C touch configurations no longer unnecessarily initialize the I2C bus, which could marginally reduce attack surface.
Security signals we found
Refactor of hardware abstraction feature flags
No changelog entry provided
No security keywords in commit title or message
No functional code changes in diff
Evidence from the diff
The commit modifies core/embed/io/Cargo.toml so that the ‘touch’ Cargo feature no longer automatically enables ‘sys/i2c_bus’. Instead, the four concrete touch controller drivers (touch_ft6x36, touch_ft3168, touch_stmpe811, touch_sitronix) each individually enable ‘sys/i2c_bus’. This is a dependency/feature-gating refactor intended to keep I2C support scoped to boards/drivers that need it. The diff shows no code changes, no bug fix description, and no security relevance stated by the vendor.
Changed components
core/embed/io/Cargo.tomltouch feature flagsI2C bus feature gatingInspect captured patch +5 / −5
diff --git a/core/embed/io/Cargo.toml b/core/embed/io/Cargo.toml
index bb29f041..cc1f3884 100644
--- a/core/embed/io/Cargo.toml
+++ b/core/embed/io/Cargo.toml
@@ -61,7 +61,7 @@ sbu = []
sd_card = []
smp = []
suspend = ["sec/suspend"]
-touch = ["sys/i2c_bus"]
+touch = []
touch_wakeup = []
usb_iface_debug = ["usb"]
usb_iface_vcp = ["usb"]
@@ -93,10 +93,10 @@ backlight_tps61062 = []
backlight_pin = []
touch_none = []
-touch_ft6x36 = []
-touch_ft3168 = []
-touch_stmpe811 = []
-touch_sitronix = []
+touch_ft6x36 = ["sys/i2c_bus"]
+touch_ft3168 = ["sys/i2c_bus"]
+touch_stmpe811 = ["sys/i2c_bus"]
+touch_sitronix = ["sys/i2c_bus"]
# touch panels (coordinate correction); selected alongside the driver by the
# board TOML, mirroring the display driver/panel split below.
Why this scored 17/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.