diff options
-rw-r--r-- | arch/arm/plat-omap/include/plat/display.h | 3 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 30 |
2 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h index c66e464732df..47df5f6fbf89 100644 --- a/arch/arm/plat-omap/include/plat/display.h +++ b/arch/arm/plat-omap/include/plat/display.h | |||
@@ -233,8 +233,11 @@ int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, | |||
233 | void dsi_bus_lock(void); | 233 | void dsi_bus_lock(void); |
234 | void dsi_bus_unlock(void); | 234 | void dsi_bus_unlock(void); |
235 | int dsi_vc_dcs_write(int channel, u8 *data, int len); | 235 | int dsi_vc_dcs_write(int channel, u8 *data, int len); |
236 | int dsi_vc_dcs_write_0(int channel, u8 dcs_cmd); | ||
237 | int dsi_vc_dcs_write_1(int channel, u8 dcs_cmd, u8 param); | ||
236 | 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); |
237 | 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); | ||
238 | int dsi_vc_set_max_rx_packet_size(int channel, u16 len); | 241 | int dsi_vc_set_max_rx_packet_size(int channel, u16 len); |
239 | int dsi_vc_send_null(int channel); | 242 | int dsi_vc_send_null(int channel); |
240 | int dsi_vc_send_bta_sync(int channel); | 243 | 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 b38974523d48..e49f063fb615 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -2176,6 +2176,21 @@ int dsi_vc_dcs_write(int channel, u8 *data, int len) | |||
2176 | } | 2176 | } |
2177 | EXPORT_SYMBOL(dsi_vc_dcs_write); | 2177 | EXPORT_SYMBOL(dsi_vc_dcs_write); |
2178 | 2178 | ||
2179 | int dsi_vc_dcs_write_0(int channel, u8 dcs_cmd) | ||
2180 | { | ||
2181 | return dsi_vc_dcs_write(channel, &dcs_cmd, 1); | ||
2182 | } | ||
2183 | EXPORT_SYMBOL(dsi_vc_dcs_write_0); | ||
2184 | |||
2185 | int dsi_vc_dcs_write_1(int channel, u8 dcs_cmd, u8 param) | ||
2186 | { | ||
2187 | u8 buf[2]; | ||
2188 | buf[0] = dcs_cmd; | ||
2189 | buf[1] = param; | ||
2190 | return dsi_vc_dcs_write(channel, buf, 2); | ||
2191 | } | ||
2192 | EXPORT_SYMBOL(dsi_vc_dcs_write_1); | ||
2193 | |||
2179 | int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen) | 2194 | int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen) |
2180 | { | 2195 | { |
2181 | u32 val; | 2196 | u32 val; |
@@ -2268,6 +2283,21 @@ int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen) | |||
2268 | } | 2283 | } |
2269 | EXPORT_SYMBOL(dsi_vc_dcs_read); | 2284 | EXPORT_SYMBOL(dsi_vc_dcs_read); |
2270 | 2285 | ||
2286 | int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data) | ||
2287 | { | ||
2288 | int r; | ||
2289 | |||
2290 | r = dsi_vc_dcs_read(channel, dcs_cmd, data, 1); | ||
2291 | |||
2292 | if (r < 0) | ||
2293 | return r; | ||
2294 | |||
2295 | if (r != 1) | ||
2296 | return -EIO; | ||
2297 | |||
2298 | return 0; | ||
2299 | } | ||
2300 | EXPORT_SYMBOL(dsi_vc_dcs_read_1); | ||
2271 | 2301 | ||
2272 | int dsi_vc_set_max_rx_packet_size(int channel, u16 len) | 2302 | int dsi_vc_set_max_rx_packet_size(int channel, u16 len) |
2273 | { | 2303 | { |