Lines Matching refs:dsi
29 * Mipi_dsi.c contains a set of dsi helpers.
43 * DOC: dsi helpers
54 * @dsi: DSI peripheral
56 int mipi_dsi_attach(struct mipi_dsi_device *dsi)
58 const struct mipi_dsi_host_ops *ops = dsi->host->ops;
63 return ops->attach(dsi->host, dsi);
69 * @dsi: DSI peripheral
71 int mipi_dsi_detach(struct mipi_dsi_device *dsi)
73 const struct mipi_dsi_host_ops *ops = dsi->host->ops;
78 return ops->detach(dsi->host, dsi);
84 * @dsi: DSI peripheral
87 static ssize_t mipi_dsi_device_transfer(struct mipi_dsi_device *dsi,
90 const struct mipi_dsi_host_ops *ops = dsi->host->ops;
95 if (dsi->mode_flags & MIPI_DSI_MODE_LPM)
98 return ops->transfer(dsi->host, msg);
223 * @dsi: DSI peripheral device
227 int mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi)
230 .channel = dsi->channel,
235 int ret = mipi_dsi_device_transfer(dsi, &msg);
243 * @dsi: DSI peripheral device
247 int mipi_dsi_turn_on_peripheral(struct mipi_dsi_device *dsi)
250 .channel = dsi->channel,
255 int ret = mipi_dsi_device_transfer(dsi, &msg);
265 * @dsi: DSI peripheral device
270 int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi,
275 .channel = dsi->channel,
280 int ret = mipi_dsi_device_transfer(dsi, &msg);
288 * @dsi: DSI peripheral device
298 ssize_t mipi_dsi_generic_write(struct mipi_dsi_device *dsi, const void *payload,
302 .channel = dsi->channel,
325 return mipi_dsi_device_transfer(dsi, &msg);
331 * @dsi: DSI peripheral device
343 ssize_t mipi_dsi_generic_read(struct mipi_dsi_device *dsi, const void *params,
347 .channel = dsi->channel,
371 return mipi_dsi_device_transfer(dsi, &msg);
377 * @dsi: DSI peripheral device
387 ssize_t mipi_dsi_dcs_write_buffer(struct mipi_dsi_device *dsi,
391 .channel = dsi->channel,
413 return mipi_dsi_device_transfer(dsi, &msg);
419 * @dsi: DSI peripheral device
430 ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, u8 cmd,
452 err = mipi_dsi_dcs_write_buffer(dsi, tx, size);
463 * @dsi: DSI peripheral device
470 ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, u8 cmd, void *data,
474 .channel = dsi->channel,
482 return mipi_dsi_device_transfer(dsi, &msg);
488 * @dsi: DSI peripheral device
492 int mipi_dsi_dcs_nop(struct mipi_dsi_device *dsi)
496 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_NOP, NULL, 0);
506 * @dsi: DSI peripheral device
510 int mipi_dsi_dcs_soft_reset(struct mipi_dsi_device *dsi)
514 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SOFT_RESET, NULL, 0);
525 * @dsi: DSI peripheral device
530 int mipi_dsi_dcs_get_power_mode(struct mipi_dsi_device *dsi, u8 *mode)
534 err = mipi_dsi_dcs_read(dsi, MIPI_DCS_GET_POWER_MODE, mode,
550 * @dsi: DSI peripheral device
555 int mipi_dsi_dcs_get_pixel_format(struct mipi_dsi_device *dsi, u8 *format)
559 err = mipi_dsi_dcs_read(dsi, MIPI_DCS_GET_PIXEL_FORMAT, format,
575 * @dsi: DSI peripheral device
579 int mipi_dsi_dcs_enter_sleep_mode(struct mipi_dsi_device *dsi)
583 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_ENTER_SLEEP_MODE, NULL, 0);
594 * @dsi: DSI peripheral device
598 int mipi_dsi_dcs_exit_sleep_mode(struct mipi_dsi_device *dsi)
602 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_EXIT_SLEEP_MODE, NULL, 0);
613 * @dsi: DSI peripheral device
617 int mipi_dsi_dcs_set_display_off(struct mipi_dsi_device *dsi)
621 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_OFF, NULL, 0);
632 * @dsi: DSI peripheral device
636 int mipi_dsi_dcs_set_display_on(struct mipi_dsi_device *dsi)
640 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_ON, NULL, 0);
651 * @dsi: DSI peripheral device
657 int mipi_dsi_dcs_set_column_address(struct mipi_dsi_device *dsi, u16 start,
663 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_COLUMN_ADDRESS, payload,
675 * @dsi: DSI peripheral device
681 int mipi_dsi_dcs_set_page_address(struct mipi_dsi_device *dsi, u16 start,
687 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_PAGE_ADDRESS, payload,
699 * @dsi: DSI peripheral device
703 int mipi_dsi_dcs_set_tear_off(struct mipi_dsi_device *dsi)
707 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_TEAR_OFF, NULL, 0);
718 * @dsi: DSI peripheral device
723 int mipi_dsi_dcs_set_tear_on(struct mipi_dsi_device *dsi,
729 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_TEAR_ON, &value,
741 * @dsi: DSI peripheral device
746 int mipi_dsi_dcs_set_pixel_format(struct mipi_dsi_device *dsi, u8 format)
750 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_PIXEL_FORMAT, &format,
762 * @dsi: DSI peripheral device
767 int mipi_dsi_dcs_set_tear_scanline(struct mipi_dsi_device *dsi, u16 scanline)
773 err = mipi_dsi_generic_write(dsi, payload, sizeof(payload));
784 * @dsi: DSI peripheral device
789 int mipi_dsi_dcs_set_display_brightness(struct mipi_dsi_device *dsi,
795 err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
807 * @dsi: DSI peripheral device
812 int mipi_dsi_dcs_get_display_brightness(struct mipi_dsi_device *dsi,
817 err = mipi_dsi_dcs_read(dsi, MIPI_DCS_GET_DISPLAY_BRIGHTNESS,