提交 53055aae 编写于 作者: T Tomi Valkeinen

OMAP: DSS2: DSI: add dsi_vc_dcs_read_2() helper

Add dsi_vc_dcs_read_2() helper function to read two bytes from the DSI
peripheral.
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@nokia.com>
上级 ddbfeb39
...@@ -238,6 +238,7 @@ int dsi_vc_dcs_write_1(int channel, u8 dcs_cmd, u8 param); ...@@ -238,6 +238,7 @@ int dsi_vc_dcs_write_1(int channel, u8 dcs_cmd, u8 param);
int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len); int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len);
int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen); int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen);
int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data); int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data);
int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u16 *data);
int dsi_vc_set_max_rx_packet_size(int channel, u16 len); int dsi_vc_set_max_rx_packet_size(int channel, u16 len);
int dsi_vc_send_null(int channel); int dsi_vc_send_null(int channel);
int dsi_vc_send_bta_sync(int channel); int dsi_vc_send_bta_sync(int channel);
......
...@@ -2212,6 +2212,22 @@ int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data) ...@@ -2212,6 +2212,22 @@ int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data)
} }
EXPORT_SYMBOL(dsi_vc_dcs_read_1); EXPORT_SYMBOL(dsi_vc_dcs_read_1);
int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u16 *data)
{
int r;
r = dsi_vc_dcs_read(channel, dcs_cmd, (u8 *)data, 2);
if (r < 0)
return r;
if (r != 2)
return -EIO;
return 0;
}
EXPORT_SYMBOL(dsi_vc_dcs_read_2);
int dsi_vc_set_max_rx_packet_size(int channel, u16 len) int dsi_vc_set_max_rx_packet_size(int channel, u16 len)
{ {
int r; int r;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册