/* Return: 0 on success or a negative error code on failure.  */
int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi, u16 value)
/* Return: 0 on success or a negative error code on failure.  */
int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi, u16 value)
{
	u8 tx[2] = { value & 0xff, value >> 8 };
	struct mipi_dsi_msg msg = {
		.channel = dsi->channel,
		.type = MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE,
		.tx_len = sizeof(tx),
		.tx_buf = tx,
	};
	int ret = mipi_dsi_device_transfer(dsi, &msg);
	return (ret < 0) ? ret : 0;
}