The ssd130x_init(), ssd132x_init(), and ssd133x_init() functions each issue long chains of individual ssd130x_write_cmd() calls, each followed by its own error check. This is verbose and makes the init sequences harder to read and maintain.
This series introduces ssd130x_run_cmd_seq(), which interprets a flat byte array of length-prefixed command entries terminated by a zero byte, and converts the three init functions to use it. The result is a net reduction of ~110 lines, with the hardware programming sequences now expressed as compact, declarative tables rather than imperative call-and-check chains. Signed-off-by: Alberto Ruiz <[email protected]> --- Alberto Ruiz (4): drm/solomon: add ssd130x_run_cmd_seq() for batch command execution drm/solomon: use ssd130x_run_cmd_seq() in ssd130x_init() drm/solomon: use ssd130x_run_cmd_seq() in ssd132x_init() drm/solomon: use ssd130x_run_cmd_seq() in ssd133x_init() drivers/gpu/drm/solomon/ssd130x.c | 367 +++++++++++++------------------------- 1 file changed, 128 insertions(+), 239 deletions(-) --- base-commit: 2b414a95b8f7307d42173ba9e580d6d3e2bcbfce change-id: 20260612-ssd-batchcmd-35f7ba8c1e8b Best regards, -- Alberto Ruiz <[email protected]>
