Lines Matching refs:r
123 int r; in taal_dcs_read_1() local
126 r = dsi_vc_dcs_read(td->dssdev, td->channel, dcs_cmd, buf, 1); in taal_dcs_read_1()
128 if (r < 0) in taal_dcs_read_1()
129 return r; in taal_dcs_read_1()
153 int r; in taal_sleep_in() local
158 r = dsi_vc_dcs_write_nosync(td->dssdev, td->channel, &cmd, 1); in taal_sleep_in()
159 if (r) in taal_sleep_in()
160 return r; in taal_sleep_in()
171 int r; in taal_sleep_out() local
175 r = taal_dcs_write_0(td, MIPI_DCS_EXIT_SLEEP_MODE); in taal_sleep_out()
176 if (r) in taal_sleep_out()
177 return r; in taal_sleep_out()
188 int r; in taal_get_id() local
190 r = taal_dcs_read_1(td, DCS_GET_ID1, id1); in taal_get_id()
191 if (r) in taal_get_id()
192 return r; in taal_get_id()
193 r = taal_dcs_read_1(td, DCS_GET_ID2, id2); in taal_get_id()
194 if (r) in taal_get_id()
195 return r; in taal_get_id()
196 r = taal_dcs_read_1(td, DCS_GET_ID3, id3); in taal_get_id()
197 if (r) in taal_get_id()
198 return r; in taal_get_id()
206 int r; in taal_set_update_window() local
219 r = dsi_vc_dcs_write_nosync(td->dssdev, td->channel, buf, sizeof(buf)); in taal_set_update_window()
220 if (r) in taal_set_update_window()
221 return r; in taal_set_update_window()
229 r = dsi_vc_dcs_write_nosync(td->dssdev, td->channel, buf, sizeof(buf)); in taal_set_update_window()
230 if (r) in taal_set_update_window()
231 return r; in taal_set_update_window()
235 return r; in taal_set_update_window()
273 int r; in taal_enter_ulps() local
280 r = _taal_enable_te(dssdev, false); in taal_enter_ulps()
281 if (r) in taal_enter_ulps()
301 return r; in taal_enter_ulps()
307 int r; in taal_exit_ulps() local
312 r = omapdss_dsi_display_enable(dssdev); in taal_exit_ulps()
313 if (r) { in taal_exit_ulps()
320 r = _taal_enable_te(dssdev, true); in taal_exit_ulps()
321 if (r) { in taal_exit_ulps()
338 r = taal_panel_reset(dssdev); in taal_exit_ulps()
339 if (!r) { in taal_exit_ulps()
347 return r; in taal_exit_ulps()
366 int r; in taal_bl_update_status() local
382 r = taal_wake_up(dssdev); in taal_bl_update_status()
383 if (!r) in taal_bl_update_status()
384 r = taal_dcs_write_1(td, DCS_BRIGHTNESS, level); in taal_bl_update_status()
388 r = 0; in taal_bl_update_status()
393 return r; in taal_bl_update_status()
423 int r; in taal_num_errors_show() local
430 r = taal_wake_up(dssdev); in taal_num_errors_show()
431 if (!r) in taal_num_errors_show()
432 r = taal_dcs_read_1(td, DCS_READ_NUM_ERRORS, &errors); in taal_num_errors_show()
436 r = -ENODEV; in taal_num_errors_show()
441 if (r) in taal_num_errors_show()
442 return r; in taal_num_errors_show()
453 int r; in taal_hw_revision_show() local
460 r = taal_wake_up(dssdev); in taal_hw_revision_show()
461 if (!r) in taal_hw_revision_show()
462 r = taal_get_id(td, &id1, &id2, &id3); in taal_hw_revision_show()
466 r = -ENODEV; in taal_hw_revision_show()
471 if (r) in taal_hw_revision_show()
472 return r; in taal_hw_revision_show()
511 int r; in store_cabc_mode() local
527 r = taal_wake_up(dssdev); in store_cabc_mode()
528 if (r) in store_cabc_mode()
531 r = taal_dcs_write_1(td, DCS_WRITE_CABC, i); in store_cabc_mode()
532 if (r) in store_cabc_mode()
547 return r; in store_cabc_mode()
574 int r; in taal_store_esd_interval() local
576 r = strict_strtoul(buf, 10, &t); in taal_store_esd_interval()
577 if (r) in taal_store_esd_interval()
578 return r; in taal_store_esd_interval()
612 int r; in taal_store_ulps() local
614 r = strict_strtoul(buf, 10, &t); in taal_store_ulps()
615 if (r) in taal_store_ulps()
616 return r; in taal_store_ulps()
624 r = taal_enter_ulps(dssdev); in taal_store_ulps()
626 r = taal_wake_up(dssdev); in taal_store_ulps()
633 if (r) in taal_store_ulps()
634 return r; in taal_store_ulps()
661 int r; in taal_store_ulps_timeout() local
663 r = strict_strtoul(buf, 10, &t); in taal_store_ulps_timeout()
664 if (r) in taal_store_ulps_timeout()
665 return r; in taal_store_ulps_timeout()
673 r = taal_wake_up(dssdev); in taal_store_ulps_timeout()
679 if (r) in taal_store_ulps_timeout()
680 return r; in taal_store_ulps_timeout()
769 int r; in taal_probe() local
800 r = devm_gpio_request_one(&dssdev->dev, td->reset_gpio, in taal_probe()
802 if (r) { in taal_probe()
804 return r; in taal_probe()
809 r = devm_gpio_request_one(&dssdev->dev, td->ext_te_gpio, in taal_probe()
811 if (r) { in taal_probe()
813 return r; in taal_probe()
816 r = devm_request_irq(&dssdev->dev, gpio_to_irq(td->ext_te_gpio), in taal_probe()
821 if (r) { in taal_probe()
823 return r; in taal_probe()
850 r = PTR_ERR(bldev); in taal_probe()
863 r = omap_dsi_request_vc(dssdev, &td->channel); in taal_probe()
864 if (r) { in taal_probe()
869 r = omap_dsi_set_vc_id(dssdev, td->channel, TCH); in taal_probe()
870 if (r) { in taal_probe()
875 r = sysfs_create_group(&dssdev->dev.kobj, &taal_attr_group); in taal_probe()
876 if (r) { in taal_probe()
890 return r; in taal_probe()
922 int r; in taal_power_on() local
933 r = omapdss_dsi_configure_pins(dssdev, &td->pin_config); in taal_power_on()
934 if (r) { in taal_power_on()
939 r = omapdss_dsi_set_config(dssdev, &dsi_config); in taal_power_on()
940 if (r) { in taal_power_on()
945 r = omapdss_dsi_display_enable(dssdev); in taal_power_on()
946 if (r) { in taal_power_on()
955 r = taal_sleep_out(td); in taal_power_on()
956 if (r) in taal_power_on()
959 r = taal_get_id(td, &id1, &id2, &id3); in taal_power_on()
960 if (r) in taal_power_on()
967 r = taal_dcs_write_1(td, DCS_BRIGHTNESS, 0xff); in taal_power_on()
968 if (r) in taal_power_on()
971 r = taal_dcs_write_1(td, DCS_CTRL_DISPLAY, in taal_power_on()
973 if (r) in taal_power_on()
976 r = taal_dcs_write_1(td, MIPI_DCS_SET_PIXEL_FORMAT, in taal_power_on()
978 if (r) in taal_power_on()
982 r = taal_dcs_write_1(td, DCS_WRITE_CABC, td->cabc_mode); in taal_power_on()
983 if (r) in taal_power_on()
987 r = taal_dcs_write_0(td, MIPI_DCS_SET_DISPLAY_ON); in taal_power_on()
988 if (r) in taal_power_on()
991 r = _taal_enable_te(dssdev, td->te_enabled); in taal_power_on()
992 if (r) in taal_power_on()
995 r = dsi_enable_video_output(dssdev, td->channel); in taal_power_on()
996 if (r) in taal_power_on()
1020 return r; in taal_power_on()
1026 int r; in taal_power_off() local
1030 r = taal_dcs_write_0(td, MIPI_DCS_SET_DISPLAY_OFF); in taal_power_off()
1031 if (!r) in taal_power_off()
1032 r = taal_sleep_in(td); in taal_power_off()
1034 if (r) { in taal_power_off()
1057 int r; in taal_enable() local
1064 r = -EINVAL; in taal_enable()
1070 r = taal_power_on(dssdev); in taal_enable()
1074 if (r) in taal_enable()
1087 return r; in taal_enable()
1104 int r; in taal_disable() local
1106 r = taal_wake_up(dssdev); in taal_disable()
1107 if (!r) in taal_disable()
1130 int r; in taal_te_isr() local
1137 r = omap_dsi_update(dssdev, td->channel, taal_framedone_cb, in taal_te_isr()
1139 if (r) in taal_te_isr()
1166 int r; in taal_update() local
1173 r = taal_wake_up(dssdev); in taal_update()
1174 if (r) in taal_update()
1178 r = 0; in taal_update()
1183 r = taal_set_update_window(td, 0, 0, in taal_update()
1186 if (r) in taal_update()
1194 r = omap_dsi_update(dssdev, td->channel, taal_framedone_cb, in taal_update()
1196 if (r) in taal_update()
1206 return r; in taal_update()
1228 int r; in _taal_enable_te() local
1231 r = taal_dcs_write_1(td, MIPI_DCS_SET_TEAR_ON, 0); in _taal_enable_te()
1233 r = taal_dcs_write_0(td, MIPI_DCS_SET_TEAR_OFF); in _taal_enable_te()
1241 return r; in _taal_enable_te()
1247 int r; in taal_enable_te() local
1257 r = taal_wake_up(dssdev); in taal_enable_te()
1258 if (r) in taal_enable_te()
1261 r = _taal_enable_te(dssdev, enable); in taal_enable_te()
1262 if (r) in taal_enable_te()
1277 return r; in taal_enable_te()
1283 int r; in taal_get_te() local
1286 r = td->te_enabled; in taal_get_te()
1289 return r; in taal_get_te()
1296 int r; in taal_run_test() local
1301 r = -ENODEV; in taal_run_test()
1307 r = taal_wake_up(dssdev); in taal_run_test()
1308 if (r) in taal_run_test()
1311 r = taal_dcs_read_1(td, DCS_GET_ID1, &id1); in taal_run_test()
1312 if (r) in taal_run_test()
1314 r = taal_dcs_read_1(td, DCS_GET_ID2, &id2); in taal_run_test()
1315 if (r) in taal_run_test()
1317 r = taal_dcs_read_1(td, DCS_GET_ID3, &id3); in taal_run_test()
1318 if (r) in taal_run_test()
1328 return r; in taal_run_test()
1335 int r; in taal_memory_read() local
1347 r = -ENODEV; in taal_memory_read()
1357 r = taal_wake_up(dssdev); in taal_memory_read()
1358 if (r) in taal_memory_read()
1371 r = dsi_vc_set_max_rx_packet_size(dssdev, td->channel, plen); in taal_memory_read()
1372 if (r) in taal_memory_read()
1379 r = dsi_vc_dcs_read(dssdev, td->channel, dcs_cmd, in taal_memory_read()
1382 if (r < 0) { in taal_memory_read()
1387 buf_used += r; in taal_memory_read()
1389 if (r < plen) { in taal_memory_read()
1397 r = -ERESTARTSYS; in taal_memory_read()
1402 r = buf_used; in taal_memory_read()
1410 return r; in taal_memory_read()
1440 int r; in taal_esd_work() local
1451 r = taal_wake_up(dssdev); in taal_esd_work()
1452 if (r) { in taal_esd_work()
1457 r = taal_dcs_read_1(td, MIPI_DCS_GET_DIAGNOSTIC_RESULT, &state1); in taal_esd_work()
1458 if (r) { in taal_esd_work()
1464 r = taal_sleep_out(td); in taal_esd_work()
1465 if (r) { in taal_esd_work()
1470 r = taal_dcs_read_1(td, MIPI_DCS_GET_DIAGNOSTIC_RESULT, &state2); in taal_esd_work()
1471 if (r) { in taal_esd_work()
1486 r = taal_dcs_write_1(td, MIPI_DCS_SET_TEAR_ON, 0); in taal_esd_work()
1487 if (r) in taal_esd_work()