refactor(core): remove pvd -> backlight dependency
What changed, and why it matters
This commit removes code that turned off the screen backlight when a power-voltage drop (PVD) interrupt fired. The change is described as a simple internal cleanup ('refactor') with no changelog entry. It is not clearly a security fix, but removing a safety behavior during a low-power event could have minor security or reliability implications if the backlight was meant to blank the screen before shutdown.
Treat as a normal code-cleanup commit. If reviewing for security, verify that the backlight is turned off elsewhere before or during error_shutdown, or confirm that leaving the backlight on during a PVD shutdown does not leak sensitive screen contents or drain the battery dangerously. No immediate action is indicated by the diff alone.
Security signals we found
Removal of a shutdown-side safety action (backlight off) in a fault handler
No changelog entry and labeled as refactor, so security relevance is not asserted by the vendor
PVD handler is a low-level power-fault path; changes here affect device behavior under low-voltage conditions
Evidence from the diff
The patch deletes the include of io/backlight.h and the call to backlight_set(0) inside the PVD_IRQHandler. PVD (Programmable Voltage Detector) is an STM32 interrupt triggered when supply voltage falls below a threshold, and the handler ultimately calls error_shutdown. Previously the handler forced the backlight off before shutting down; now it does not. The commit title frames this as removing an unwanted dependency from the PVD driver to the backlight subsystem.
Changed components
core/embed/sys/pvd/stm32/pvd.cPVD_IRQHandlerbacklight control during power-voltage drop shutdownInspect captured patch +0 / −9
diff --git a/core/embed/sys/pvd/stm32/pvd.c b/core/embed/sys/pvd/stm32/pvd.c
index c66a6cc0..7920f1ee 100644
--- a/core/embed/sys/pvd/stm32/pvd.c
+++ b/core/embed/sys/pvd/stm32/pvd.c
@@ -20,14 +20,9 @@
#include <trezor_bsp.h>
#include <trezor_rtl.h>
-#include <sys/bootutils.h>
#include <sys/irq.h>
#include <sys/mpu.h>
-#ifdef USE_BACKLIGHT
-#include <io/backlight.h>
-#endif
-
#if defined(KERNEL_MODE) && defined(USE_PVD)
void pvd_init(void) {
@@ -57,10 +52,6 @@ void PVD_IRQHandler(void) {
#endif
mpu_reconfig(MPU_MODE_DEFAULT);
-#ifdef USE_BACKLIGHT
- backlight_set(0);
-#endif
-
error_shutdown("PVD IRQ");
}
Why this scored 26/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.