Hi Joel,
On Mon, May 30, 2022 at 6:08 PM Joel Selvaraj <[email protected]> wrote:
> +#define dsi_dcs_write_seq(dsi, cmd, seq...) do {
> \
Please name it mipi_dsi_dcs_write_seq() and...
> + static const u8 d[] = { cmd, seq };
> \
> + struct device *dev = &dsi->dev; \
> + int ret; \
> + ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d)); \
> + if (ret < 0) { \
> + dev_err_ratelimited(dev, "sending command %#02x
> failed: %d\n", cmd, ret); \
> + return ret;
> \
> + } \
> + } while (0)
My suggestion was to add this macro to include/drm/drm_mipi_dsi.h, just patch it
in there under the other mipi_dsi_dcs_* functions.
I think a few other drivers could make good use of this macro.
Yours,
Linus Walleij