Lines Matching full:r
109 int r; in dsicm_dcs_read_1() local
112 r = in->ops.dsi->dcs_read(in, ddata->channel, dcs_cmd, buf, 1); in dsicm_dcs_read_1()
114 if (r < 0) in dsicm_dcs_read_1()
115 return r; in dsicm_dcs_read_1()
141 int r; in dsicm_sleep_in() local
146 r = in->ops.dsi->dcs_write_nosync(in, ddata->channel, &cmd, 1); in dsicm_sleep_in()
147 if (r) in dsicm_sleep_in()
148 return r; in dsicm_sleep_in()
159 int r; in dsicm_sleep_out() local
163 r = dsicm_dcs_write_0(ddata, MIPI_DCS_EXIT_SLEEP_MODE); in dsicm_sleep_out()
164 if (r) in dsicm_sleep_out()
165 return r; in dsicm_sleep_out()
176 int r; in dsicm_get_id() local
178 r = dsicm_dcs_read_1(ddata, DCS_GET_ID1, id1); in dsicm_get_id()
179 if (r) in dsicm_get_id()
180 return r; in dsicm_get_id()
181 r = dsicm_dcs_read_1(ddata, DCS_GET_ID2, id2); in dsicm_get_id()
182 if (r) in dsicm_get_id()
183 return r; in dsicm_get_id()
184 r = dsicm_dcs_read_1(ddata, DCS_GET_ID3, id3); in dsicm_get_id()
185 if (r) in dsicm_get_id()
186 return r; in dsicm_get_id()
195 int r; in dsicm_set_update_window() local
208 r = in->ops.dsi->dcs_write_nosync(in, ddata->channel, buf, sizeof(buf)); in dsicm_set_update_window()
209 if (r) in dsicm_set_update_window()
210 return r; in dsicm_set_update_window()
218 r = in->ops.dsi->dcs_write_nosync(in, ddata->channel, buf, sizeof(buf)); in dsicm_set_update_window()
219 if (r) in dsicm_set_update_window()
220 return r; in dsicm_set_update_window()
224 return r; in dsicm_set_update_window()
242 int r; in dsicm_enter_ulps() local
249 r = _dsicm_enable_te(ddata, false); in dsicm_enter_ulps()
250 if (r) in dsicm_enter_ulps()
270 return r; in dsicm_enter_ulps()
276 int r; in dsicm_exit_ulps() local
281 r = in->ops.dsi->enable(in); in dsicm_exit_ulps()
282 if (r) { in dsicm_exit_ulps()
289 r = _dsicm_enable_te(ddata, true); in dsicm_exit_ulps()
290 if (r) { in dsicm_exit_ulps()
307 r = dsicm_panel_reset(ddata); in dsicm_exit_ulps()
308 if (!r) { in dsicm_exit_ulps()
316 return r; in dsicm_exit_ulps()
333 int r; in dsicm_bl_update_status() local
343 r = dsicm_wake_up(ddata); in dsicm_bl_update_status()
344 if (!r) in dsicm_bl_update_status()
345 r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, level); in dsicm_bl_update_status()
349 r = 0; in dsicm_bl_update_status()
354 return r; in dsicm_bl_update_status()
384 int r; in dsicm_num_errors_show() local
391 r = dsicm_wake_up(ddata); in dsicm_num_errors_show()
392 if (!r) in dsicm_num_errors_show()
393 r = dsicm_dcs_read_1(ddata, DCS_READ_NUM_ERRORS, in dsicm_num_errors_show()
398 r = -ENODEV; in dsicm_num_errors_show()
403 if (r) in dsicm_num_errors_show()
404 return r; in dsicm_num_errors_show()
415 int r; in dsicm_hw_revision_show() local
422 r = dsicm_wake_up(ddata); in dsicm_hw_revision_show()
423 if (!r) in dsicm_hw_revision_show()
424 r = dsicm_get_id(ddata, &id1, &id2, &id3); in dsicm_hw_revision_show()
428 r = -ENODEV; in dsicm_hw_revision_show()
433 if (r) in dsicm_hw_revision_show()
434 return r; in dsicm_hw_revision_show()
446 int r; in dsicm_store_ulps() local
448 r = kstrtoul(buf, 0, &t); in dsicm_store_ulps()
449 if (r) in dsicm_store_ulps()
450 return r; in dsicm_store_ulps()
458 r = dsicm_enter_ulps(ddata); in dsicm_store_ulps()
460 r = dsicm_wake_up(ddata); in dsicm_store_ulps()
467 if (r) in dsicm_store_ulps()
468 return r; in dsicm_store_ulps()
494 int r; in dsicm_store_ulps_timeout() local
496 r = kstrtoul(buf, 0, &t); in dsicm_store_ulps_timeout()
497 if (r) in dsicm_store_ulps_timeout()
498 return r; in dsicm_store_ulps_timeout()
506 r = dsicm_wake_up(ddata); in dsicm_store_ulps_timeout()
512 if (r) in dsicm_store_ulps_timeout()
513 return r; in dsicm_store_ulps_timeout()
574 int r; in dsicm_power_on() local
586 r = in->ops.dsi->configure_pins(in, &ddata->pin_config); in dsicm_power_on()
587 if (r) { in dsicm_power_on()
594 r = in->ops.dsi->set_config(in, &dsi_config); in dsicm_power_on()
595 if (r) { in dsicm_power_on()
600 r = in->ops.dsi->enable(in); in dsicm_power_on()
601 if (r) { in dsicm_power_on()
610 r = dsicm_sleep_out(ddata); in dsicm_power_on()
611 if (r) in dsicm_power_on()
614 r = dsicm_get_id(ddata, &id1, &id2, &id3); in dsicm_power_on()
615 if (r) in dsicm_power_on()
618 r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff); in dsicm_power_on()
619 if (r) in dsicm_power_on()
622 r = dsicm_dcs_write_1(ddata, DCS_CTRL_DISPLAY, in dsicm_power_on()
624 if (r) in dsicm_power_on()
627 r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_PIXEL_FORMAT, in dsicm_power_on()
629 if (r) in dsicm_power_on()
632 r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_DISPLAY_ON); in dsicm_power_on()
633 if (r) in dsicm_power_on()
636 r = _dsicm_enable_te(ddata, ddata->te_enabled); in dsicm_power_on()
637 if (r) in dsicm_power_on()
640 r = in->ops.dsi->enable_video_output(in, ddata->channel); in dsicm_power_on()
641 if (r) in dsicm_power_on()
662 return r; in dsicm_power_on()
668 int r; in dsicm_power_off() local
672 r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_DISPLAY_OFF); in dsicm_power_off()
673 if (!r) in dsicm_power_off()
674 r = dsicm_sleep_in(ddata); in dsicm_power_off()
676 if (r) { in dsicm_power_off()
701 int r; in dsicm_connect() local
706 r = in->ops.dsi->connect(in, dssdev); in dsicm_connect()
707 if (r) { in dsicm_connect()
709 return r; in dsicm_connect()
712 r = in->ops.dsi->request_vc(ddata->in, &ddata->channel); in dsicm_connect()
713 if (r) { in dsicm_connect()
718 r = in->ops.dsi->set_vc_id(ddata->in, ddata->channel, TCH); in dsicm_connect()
719 if (r) { in dsicm_connect()
730 return r; in dsicm_connect()
749 int r; in dsicm_enable() local
756 r = -ENODEV; in dsicm_enable()
761 r = 0; in dsicm_enable()
767 r = dsicm_power_on(ddata); in dsicm_enable()
771 if (r) in dsicm_enable()
782 return r; in dsicm_enable()
789 int r; in dsicm_disable() local
800 r = dsicm_wake_up(ddata); in dsicm_disable()
801 if (!r) in dsicm_disable()
826 int r; in dsicm_te_isr() local
833 r = in->ops.dsi->update(in, ddata->channel, dsicm_framedone_cb, in dsicm_te_isr()
835 if (r) in dsicm_te_isr()
863 int r; in dsicm_update() local
870 r = dsicm_wake_up(ddata); in dsicm_update()
871 if (r) in dsicm_update()
875 r = 0; in dsicm_update()
880 r = dsicm_set_update_window(ddata, 0, 0, in dsicm_update()
883 if (r) in dsicm_update()
891 r = in->ops.dsi->update(in, ddata->channel, dsicm_framedone_cb, in dsicm_update()
893 if (r) in dsicm_update()
903 return r; in dsicm_update()
926 int r; in _dsicm_enable_te() local
929 r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_TEAR_ON, 0); in _dsicm_enable_te()
931 r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_TEAR_OFF); in _dsicm_enable_te()
939 return r; in _dsicm_enable_te()
946 int r; in dsicm_enable_te() local
956 r = dsicm_wake_up(ddata); in dsicm_enable_te()
957 if (r) in dsicm_enable_te()
960 r = _dsicm_enable_te(ddata, enable); in dsicm_enable_te()
961 if (r) in dsicm_enable_te()
976 return r; in dsicm_enable_te()
982 int r; in dsicm_get_te() local
985 r = ddata->te_enabled; in dsicm_get_te()
988 return r; in dsicm_get_te()
997 int r; in dsicm_memory_read() local
1008 r = -ENODEV; in dsicm_memory_read()
1018 r = dsicm_wake_up(ddata); in dsicm_memory_read()
1019 if (r) in dsicm_memory_read()
1032 r = in->ops.dsi->set_max_rx_packet_size(in, ddata->channel, plen); in dsicm_memory_read()
1033 if (r) in dsicm_memory_read()
1040 r = in->ops.dsi->dcs_read(in, ddata->channel, dcs_cmd, in dsicm_memory_read()
1043 if (r < 0) { in dsicm_memory_read()
1048 buf_used += r; in dsicm_memory_read()
1050 if (r < plen) { in dsicm_memory_read()
1058 r = -ERESTARTSYS; in dsicm_memory_read()
1063 r = buf_used; in dsicm_memory_read()
1071 return r; in dsicm_memory_read()
1122 int r; in dsicm_probe() local
1137 r = PTR_ERR_OR_ZERO(ddata->in); in dsicm_probe()
1138 if (r) { in dsicm_probe()
1139 dev_err(&pdev->dev, "failed to find video source: %d\n", r); in dsicm_probe()
1140 return r; in dsicm_probe()
1158 r = omapdss_register_display(dssdev); in dsicm_probe()
1159 if (r) { in dsicm_probe()
1169 r = PTR_ERR_OR_ZERO(ddata->reset_gpio); in dsicm_probe()
1170 if (r) { in dsicm_probe()
1171 dev_err(&pdev->dev, "Failed to request reset gpio: %d\n", r); in dsicm_probe()
1172 return r; in dsicm_probe()
1179 r = PTR_ERR_OR_ZERO(ddata->ext_te_gpio); in dsicm_probe()
1180 if (r) { in dsicm_probe()
1181 dev_err(&pdev->dev, "Failed to request TE gpio: %d\n", r); in dsicm_probe()
1182 return r; in dsicm_probe()
1188 r = devm_request_irq(dev, gpiod_to_irq(ddata->ext_te_gpio), in dsicm_probe()
1193 if (r) { in dsicm_probe()
1195 return r; in dsicm_probe()
1216 r = PTR_ERR(bldev); in dsicm_probe()
1229 r = sysfs_create_group(&dev->kobj, &dsicm_attr_group); in dsicm_probe()
1230 if (r) { in dsicm_probe()
1241 return r; in dsicm_probe()