Messages in this thread | | | From | Linus Walleij <> | Date | Tue, 31 May 2022 11:39:38 +0200 | Subject | Re: [PATCH v3 3/3] drm/panel: introduce ebbg,ft8719 panel |
| |
Hi Joel,
On Mon, May 30, 2022 at 6:08 PM Joel Selvaraj <jo@jsfamily.in> 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
| |