diff options
| author | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-02-25 04:38:13 -0500 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-02-25 11:28:41 -0500 |
| commit | 53055aae2048214cbec1f5f7f8846f9dff12b2bc (patch) | |
| tree | 0cc2387f2cbf7050d994b4f57b5b6c1584e52589 | |
| parent | ddbfeb396eb085e17f5aa830a151d546f16cb868 (diff) | |
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>
| -rw-r--r-- | arch/arm/plat-omap/include/plat/display.h | 1 | ||||
| -rw-r--r-- | drivers/video/omap2/dss/dsi.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h index 23bc94fc51fa..1c529ce9dc11 100644 --- a/arch/arm/plat-omap/include/plat/display.h +++ b/arch/arm/plat-omap/include/plat/display.h | |||
| @@ -238,6 +238,7 @@ int dsi_vc_dcs_write_1(int channel, u8 dcs_cmd, u8 param); | |||
| 238 | int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len); | 238 | int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len); |
| 239 | int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen); | 239 | int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen); |
| 240 | int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data); | 240 | int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data); |
| 241 | int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u16 *data); | ||
| 241 | int dsi_vc_set_max_rx_packet_size(int channel, u16 len); | 242 | int dsi_vc_set_max_rx_packet_size(int channel, u16 len); |
| 242 | int dsi_vc_send_null(int channel); | 243 | int dsi_vc_send_null(int channel); |
| 243 | int dsi_vc_send_bta_sync(int channel); | 244 | int dsi_vc_send_bta_sync(int channel); |
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 73bdb04e6814..a9820206ca1e 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) | |||
| 2212 | } | 2212 | } |
| 2213 | EXPORT_SYMBOL(dsi_vc_dcs_read_1); | 2213 | EXPORT_SYMBOL(dsi_vc_dcs_read_1); |
| 2214 | 2214 | ||
| 2215 | int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u16 *data) | ||
| 2216 | { | ||
| 2217 | int r; | ||
| 2218 | |||
| 2219 | r = dsi_vc_dcs_read(channel, dcs_cmd, (u8 *)data, 2); | ||
| 2220 | |||
| 2221 | if (r < 0) | ||
| 2222 | return r; | ||
| 2223 | |||
| 2224 | if (r != 2) | ||
| 2225 | return -EIO; | ||
| 2226 | |||
| 2227 | return 0; | ||
| 2228 | } | ||
| 2229 | EXPORT_SYMBOL(dsi_vc_dcs_read_2); | ||
| 2230 | |||
| 2215 | int dsi_vc_set_max_rx_packet_size(int channel, u16 len) | 2231 | int dsi_vc_set_max_rx_packet_size(int channel, u16 len) |
| 2216 | { | 2232 | { |
| 2217 | int r; | 2233 | int r; |
