diff options
author | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-02-25 11:38:13 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-02-25 18:28:41 +0200 |
commit | 53055aae2048214cbec1f5f7f8846f9dff12b2bc (patch) | |
tree | 0cc2387f2cbf7050d994b4f57b5b6c1584e52589 /drivers/video/omap2 | |
parent | ddbfeb396eb085e17f5aa830a151d546f16cb868 (diff) | |
download | kernel_samsung_smdk4412-53055aae2048214cbec1f5f7f8846f9dff12b2bc.zip kernel_samsung_smdk4412-53055aae2048214cbec1f5f7f8846f9dff12b2bc.tar.gz kernel_samsung_smdk4412-53055aae2048214cbec1f5f7f8846f9dff12b2bc.tar.bz2 |
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: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 73bdb04..a982020 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -2212,6 +2212,22 @@ int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data) } 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 r; |