#ifndef __DRM_MIPI_DSI_H__
#define __DRM_MIPI_DSI_H__
#include <linux/device.h>
#include <linux/delay.h>
struct mipi_dsi_host;
struct mipi_dsi_device;
struct drm_dsc_picture_parameter_set;
#define MIPI_DSI_MSG_REQ_ACK …
#define MIPI_DSI_MSG_USE_LPM …
struct mipi_dsi_msg { … };
bool mipi_dsi_packet_format_is_short(u8 type);
bool mipi_dsi_packet_format_is_long(u8 type);
struct mipi_dsi_packet { … };
int mipi_dsi_create_packet(struct mipi_dsi_packet *packet,
const struct mipi_dsi_msg *msg);
struct mipi_dsi_host_ops { … };
struct mipi_dsi_host { … };
int mipi_dsi_host_register(struct mipi_dsi_host *host);
void mipi_dsi_host_unregister(struct mipi_dsi_host *host);
struct mipi_dsi_host *of_find_mipi_dsi_host_by_node(struct device_node *node);
#define MIPI_DSI_MODE_VIDEO …
#define MIPI_DSI_MODE_VIDEO_BURST …
#define MIPI_DSI_MODE_VIDEO_SYNC_PULSE …
#define MIPI_DSI_MODE_VIDEO_AUTO_VERT …
#define MIPI_DSI_MODE_VIDEO_HSE …
#define MIPI_DSI_MODE_VIDEO_NO_HFP …
#define MIPI_DSI_MODE_VIDEO_NO_HBP …
#define MIPI_DSI_MODE_VIDEO_NO_HSA …
#define MIPI_DSI_MODE_VSYNC_FLUSH …
#define MIPI_DSI_MODE_NO_EOT_PACKET …
#define MIPI_DSI_CLOCK_NON_CONTINUOUS …
#define MIPI_DSI_MODE_LPM …
#define MIPI_DSI_HS_PKT_END_ALIGNED …
enum mipi_dsi_pixel_format { … };
#define DSI_DEV_NAME_SIZE …
struct mipi_dsi_device_info { … };
struct mipi_dsi_device { … };
struct mipi_dsi_multi_context { … };
#define MIPI_DSI_MODULE_PREFIX …
#define to_mipi_dsi_device(__dev) …
static inline int mipi_dsi_pixel_format_to_bpp(enum mipi_dsi_pixel_format fmt)
{ … }
enum mipi_dsi_compression_algo { … };
struct mipi_dsi_device *
mipi_dsi_device_register_full(struct mipi_dsi_host *host,
const struct mipi_dsi_device_info *info);
void mipi_dsi_device_unregister(struct mipi_dsi_device *dsi);
struct mipi_dsi_device *
devm_mipi_dsi_device_register_full(struct device *dev, struct mipi_dsi_host *host,
const struct mipi_dsi_device_info *info);
struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np);
int mipi_dsi_attach(struct mipi_dsi_device *dsi);
int mipi_dsi_detach(struct mipi_dsi_device *dsi);
int devm_mipi_dsi_attach(struct device *dev, struct mipi_dsi_device *dsi);
int mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi);
int mipi_dsi_turn_on_peripheral(struct mipi_dsi_device *dsi);
int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi,
u16 value);
int mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable);
int mipi_dsi_compression_mode_ext(struct mipi_dsi_device *dsi, bool enable,
enum mipi_dsi_compression_algo algo,
unsigned int pps_selector);
int mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi,
const struct drm_dsc_picture_parameter_set *pps);
void mipi_dsi_compression_mode_ext_multi(struct mipi_dsi_multi_context *ctx,
bool enable,
enum mipi_dsi_compression_algo algo,
unsigned int pps_selector);
void mipi_dsi_picture_parameter_set_multi(struct mipi_dsi_multi_context *ctx,
const struct drm_dsc_picture_parameter_set *pps);
ssize_t mipi_dsi_generic_write(struct mipi_dsi_device *dsi, const void *payload,
size_t size);
int mipi_dsi_generic_write_chatty(struct mipi_dsi_device *dsi,
const void *payload, size_t size);
void mipi_dsi_generic_write_multi(struct mipi_dsi_multi_context *ctx,
const void *payload, size_t size);
ssize_t mipi_dsi_generic_read(struct mipi_dsi_device *dsi, const void *params,
size_t num_params, void *data, size_t size);
#define mipi_dsi_msleep(ctx, delay) …
#define mipi_dsi_usleep_range(ctx, min, max) …
enum mipi_dsi_dcs_tear_mode { … };
#define MIPI_DSI_DCS_POWER_MODE_DISPLAY …
#define MIPI_DSI_DCS_POWER_MODE_NORMAL …
#define MIPI_DSI_DCS_POWER_MODE_SLEEP …
#define MIPI_DSI_DCS_POWER_MODE_PARTIAL …
#define MIPI_DSI_DCS_POWER_MODE_IDLE …
ssize_t mipi_dsi_dcs_write_buffer(struct mipi_dsi_device *dsi,
const void *data, size_t len);
int mipi_dsi_dcs_write_buffer_chatty(struct mipi_dsi_device *dsi,
const void *data, size_t len);
void mipi_dsi_dcs_write_buffer_multi(struct mipi_dsi_multi_context *ctx,
const void *data, size_t len);
ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, u8 cmd,
const void *data, size_t len);
ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, u8 cmd, void *data,
size_t len);
int mipi_dsi_dcs_nop(struct mipi_dsi_device *dsi);
int mipi_dsi_dcs_soft_reset(struct mipi_dsi_device *dsi);
int mipi_dsi_dcs_get_power_mode(struct mipi_dsi_device *dsi, u8 *mode);
int mipi_dsi_dcs_get_pixel_format(struct mipi_dsi_device *dsi, u8 *format);
int mipi_dsi_dcs_enter_sleep_mode(struct mipi_dsi_device *dsi);
int mipi_dsi_dcs_exit_sleep_mode(struct mipi_dsi_device *dsi);
int mipi_dsi_dcs_set_display_off(struct mipi_dsi_device *dsi);
int mipi_dsi_dcs_set_display_on(struct mipi_dsi_device *dsi);
int mipi_dsi_dcs_set_column_address(struct mipi_dsi_device *dsi, u16 start,
u16 end);
int mipi_dsi_dcs_set_page_address(struct mipi_dsi_device *dsi, u16 start,
u16 end);
int mipi_dsi_dcs_set_tear_off(struct mipi_dsi_device *dsi);
int mipi_dsi_dcs_set_tear_on(struct mipi_dsi_device *dsi,
enum mipi_dsi_dcs_tear_mode mode);
int mipi_dsi_dcs_set_pixel_format(struct mipi_dsi_device *dsi, u8 format);
int mipi_dsi_dcs_set_tear_scanline(struct mipi_dsi_device *dsi, u16 scanline);
int mipi_dsi_dcs_set_display_brightness(struct mipi_dsi_device *dsi,
u16 brightness);
int mipi_dsi_dcs_get_display_brightness(struct mipi_dsi_device *dsi,
u16 *brightness);
int mipi_dsi_dcs_set_display_brightness_large(struct mipi_dsi_device *dsi,
u16 brightness);
int mipi_dsi_dcs_get_display_brightness_large(struct mipi_dsi_device *dsi,
u16 *brightness);
void mipi_dsi_dcs_nop_multi(struct mipi_dsi_multi_context *ctx);
void mipi_dsi_dcs_enter_sleep_mode_multi(struct mipi_dsi_multi_context *ctx);
void mipi_dsi_dcs_exit_sleep_mode_multi(struct mipi_dsi_multi_context *ctx);
void mipi_dsi_dcs_set_display_off_multi(struct mipi_dsi_multi_context *ctx);
void mipi_dsi_dcs_set_display_on_multi(struct mipi_dsi_multi_context *ctx);
void mipi_dsi_dcs_set_tear_on_multi(struct mipi_dsi_multi_context *ctx,
enum mipi_dsi_dcs_tear_mode mode);
#define mipi_dsi_generic_write_seq(dsi, seq...) …
#define mipi_dsi_generic_write_seq_multi(ctx, seq...) …
#define mipi_dsi_dcs_write_seq(dsi, cmd, seq...) …
#define mipi_dsi_dcs_write_seq_multi(ctx, cmd, seq...) …
struct mipi_dsi_driver { … };
static inline struct mipi_dsi_driver *
to_mipi_dsi_driver(struct device_driver *driver)
{ … }
static inline void *mipi_dsi_get_drvdata(const struct mipi_dsi_device *dsi)
{ … }
static inline void mipi_dsi_set_drvdata(struct mipi_dsi_device *dsi, void *data)
{ … }
int mipi_dsi_driver_register_full(struct mipi_dsi_driver *driver,
struct module *owner);
void mipi_dsi_driver_unregister(struct mipi_dsi_driver *driver);
#define mipi_dsi_driver_register(driver) …
#define module_mipi_dsi_driver(__mipi_dsi_driver) …
#endif