The GDEQ031T10 driver hardcodes its capability mask and leaves get_backlight and has_capability as nullptr, so a board that wires a frontlight to the panel has no way to expose it.
Whether the panel has one is a per-board fact, not a driver-wide one. The T-Deck Max has a frontlight; the T-Deck Pro does not. So DISPLAY_CAPABILITY_BACKLIGHT cannot live in the static mask.
What I have working is an optional backlight phandle in the binding, plus:
#define GDEQ031T10_STATIC_CAPABILITIES (DISPLAY_CAPABILITY_ON_OFF | DISPLAY_CAPABILITY_SLOW_REFRESH)
// Whether this panel has a frontlight is per-board, so BACKLIGHT can't live in the
// driver-wide static capability mask.
static bool gdeq031t10_has_capability(Device* device, uint32_t capability) {
uint32_t capabilities = GDEQ031T10_STATIC_CAPABILITIES;
if (GET_CONFIG(device)->backlight != nullptr) {
capabilities |= DISPLAY_CAPABILITY_BACKLIGHT;
}
return (capabilities & capability) == capability;
}
get_backlight() returns ERROR_NOT_SUPPORTED when no phandle is set. Boards without a frontlight set nothing and report exactly what they do today.
Two questions:
- Is dynamic
has_capability() the pattern you want for per-board capabilities, or would you rather this were a separate compatible string?
- The frontlight comes up at the board-agnostic
DisplaySettings default of 200/255 on first boot, which lights a reflective panel that is perfectly readable without it. Should e-paper default to off? That touches every board, so it feels like your call rather than a board-level fix.
Verified on a LilyGO T-Deck Max.
The GDEQ031T10 driver hardcodes its capability mask and leaves
get_backlightandhas_capabilityasnullptr, so a board that wires a frontlight to the panel has no way to expose it.Whether the panel has one is a per-board fact, not a driver-wide one. The T-Deck Max has a frontlight; the T-Deck Pro does not. So
DISPLAY_CAPABILITY_BACKLIGHTcannot live in the static mask.What I have working is an optional
backlightphandle in the binding, plus:get_backlight()returnsERROR_NOT_SUPPORTEDwhen no phandle is set. Boards without a frontlight set nothing and report exactly what they do today.Two questions:
has_capability()the pattern you want for per-board capabilities, or would you rather this were a separatecompatiblestring?DisplaySettingsdefault of 200/255 on first boot, which lights a reflective panel that is perfectly readable without it. Should e-paper default to off? That touches every board, so it feels like your call rather than a board-level fix.Verified on a LilyGO T-Deck Max.