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()
380 int r; in dsicm_num_errors_show() local
387 r = dsicm_wake_up(ddata); in dsicm_num_errors_show()
388 if (!r) in dsicm_num_errors_show()
389 r = dsicm_dcs_read_1(ddata, DCS_READ_NUM_ERRORS, in dsicm_num_errors_show()
394 r = -ENODEV; in dsicm_num_errors_show()
399 if (r) in dsicm_num_errors_show()
400 return r; in dsicm_num_errors_show()
411 int r; in dsicm_hw_revision_show() local
418 r = dsicm_wake_up(ddata); in dsicm_hw_revision_show()
419 if (!r) in dsicm_hw_revision_show()
420 r = dsicm_get_id(ddata, &id1, &id2, &id3); in dsicm_hw_revision_show()
424 r = -ENODEV; in dsicm_hw_revision_show()
429 if (r) in dsicm_hw_revision_show()
430 return r; in dsicm_hw_revision_show()
442 int r; in dsicm_store_ulps() local
444 r = kstrtoul(buf, 0, &t); in dsicm_store_ulps()
445 if (r) in dsicm_store_ulps()
446 return r; in dsicm_store_ulps()
454 r = dsicm_enter_ulps(ddata); in dsicm_store_ulps()
456 r = dsicm_wake_up(ddata); in dsicm_store_ulps()
463 if (r) in dsicm_store_ulps()
464 return r; in dsicm_store_ulps()
490 int r; in dsicm_store_ulps_timeout() local
492 r = kstrtoul(buf, 0, &t); in dsicm_store_ulps_timeout()
493 if (r) in dsicm_store_ulps_timeout()
494 return r; in dsicm_store_ulps_timeout()
502 r = dsicm_wake_up(ddata); in dsicm_store_ulps_timeout()
508 if (r) in dsicm_store_ulps_timeout()
509 return r; in dsicm_store_ulps_timeout()
570 int r; in dsicm_power_on() local
582 r = in->ops.dsi->configure_pins(in, &ddata->pin_config); in dsicm_power_on()
583 if (r) { in dsicm_power_on()
590 r = in->ops.dsi->set_config(in, &dsi_config); in dsicm_power_on()
591 if (r) { in dsicm_power_on()
596 r = in->ops.dsi->enable(in); in dsicm_power_on()
597 if (r) { in dsicm_power_on()
606 r = dsicm_sleep_out(ddata); in dsicm_power_on()
607 if (r) in dsicm_power_on()
610 r = dsicm_get_id(ddata, &id1, &id2, &id3); in dsicm_power_on()
611 if (r) in dsicm_power_on()
614 r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff); in dsicm_power_on()
615 if (r) in dsicm_power_on()
618 r = dsicm_dcs_write_1(ddata, DCS_CTRL_DISPLAY, in dsicm_power_on()
620 if (r) in dsicm_power_on()
623 r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_PIXEL_FORMAT, in dsicm_power_on()
625 if (r) in dsicm_power_on()
628 r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_DISPLAY_ON); in dsicm_power_on()
629 if (r) in dsicm_power_on()
632 r = _dsicm_enable_te(ddata, ddata->te_enabled); in dsicm_power_on()
633 if (r) in dsicm_power_on()
636 r = in->ops.dsi->enable_video_output(in, ddata->channel); in dsicm_power_on()
637 if (r) in dsicm_power_on()
658 return r; in dsicm_power_on()
664 int r; in dsicm_power_off() local
668 r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_DISPLAY_OFF); in dsicm_power_off()
669 if (!r) in dsicm_power_off()
670 r = dsicm_sleep_in(ddata); in dsicm_power_off()
672 if (r) { in dsicm_power_off()
697 int r; in dsicm_connect() local
702 r = in->ops.dsi->connect(in, dssdev); in dsicm_connect()
703 if (r) { in dsicm_connect()
705 return r; in dsicm_connect()
708 r = in->ops.dsi->request_vc(ddata->in, &ddata->channel); in dsicm_connect()
709 if (r) { in dsicm_connect()
714 r = in->ops.dsi->set_vc_id(ddata->in, ddata->channel, TCH); in dsicm_connect()
715 if (r) { in dsicm_connect()
726 return r; in dsicm_connect()
745 int r; in dsicm_enable() local
752 r = -ENODEV; in dsicm_enable()
757 r = 0; in dsicm_enable()
763 r = dsicm_power_on(ddata); in dsicm_enable()
767 if (r) in dsicm_enable()
778 return r; in dsicm_enable()
785 int r; in dsicm_disable() local
796 r = dsicm_wake_up(ddata); in dsicm_disable()
797 if (!r) in dsicm_disable()
822 int r; in dsicm_te_isr() local
829 r = in->ops.dsi->update(in, ddata->channel, dsicm_framedone_cb, in dsicm_te_isr()
831 if (r) in dsicm_te_isr()
859 int r; in dsicm_update() local
866 r = dsicm_wake_up(ddata); in dsicm_update()
867 if (r) in dsicm_update()
871 r = 0; in dsicm_update()
876 r = dsicm_set_update_window(ddata, 0, 0, in dsicm_update()
879 if (r) in dsicm_update()
887 r = in->ops.dsi->update(in, ddata->channel, dsicm_framedone_cb, in dsicm_update()
889 if (r) in dsicm_update()
899 return r; in dsicm_update()
922 int r; in _dsicm_enable_te() local
925 r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_TEAR_ON, 0); in _dsicm_enable_te()
927 r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_TEAR_OFF); in _dsicm_enable_te()
935 return r; in _dsicm_enable_te()
942 int r; in dsicm_enable_te() local
952 r = dsicm_wake_up(ddata); in dsicm_enable_te()
953 if (r) in dsicm_enable_te()
956 r = _dsicm_enable_te(ddata, enable); in dsicm_enable_te()
957 if (r) in dsicm_enable_te()
972 return r; in dsicm_enable_te()
978 int r; in dsicm_get_te() local
981 r = ddata->te_enabled; in dsicm_get_te()
984 return r; in dsicm_get_te()
993 int r; in dsicm_memory_read() local
1004 r = -ENODEV; in dsicm_memory_read()
1014 r = dsicm_wake_up(ddata); in dsicm_memory_read()
1015 if (r) in dsicm_memory_read()
1028 r = in->ops.dsi->set_max_rx_packet_size(in, ddata->channel, plen); in dsicm_memory_read()
1029 if (r) in dsicm_memory_read()
1036 r = in->ops.dsi->dcs_read(in, ddata->channel, dcs_cmd, in dsicm_memory_read()
1039 if (r < 0) { in dsicm_memory_read()
1044 buf_used += r; in dsicm_memory_read()
1046 if (r < plen) { in dsicm_memory_read()
1054 r = -ERESTARTSYS; in dsicm_memory_read()
1059 r = buf_used; in dsicm_memory_read()
1067 return r; in dsicm_memory_read()
1118 int r; in dsicm_probe() local
1133 r = PTR_ERR_OR_ZERO(ddata->in); in dsicm_probe()
1134 if (r) { in dsicm_probe()
1135 dev_err(&pdev->dev, "failed to find video source: %d\n", r); in dsicm_probe()
1136 return r; in dsicm_probe()
1154 r = omapdss_register_display(dssdev); in dsicm_probe()
1155 if (r) { in dsicm_probe()
1165 r = PTR_ERR_OR_ZERO(ddata->reset_gpio); in dsicm_probe()
1166 if (r) { in dsicm_probe()
1167 dev_err(&pdev->dev, "Failed to request reset gpio: %d\n", r); in dsicm_probe()
1168 return r; in dsicm_probe()
1175 r = PTR_ERR_OR_ZERO(ddata->ext_te_gpio); in dsicm_probe()
1176 if (r) { in dsicm_probe()
1177 dev_err(&pdev->dev, "Failed to request TE gpio: %d\n", r); in dsicm_probe()
1178 return r; in dsicm_probe()
1184 r = devm_request_irq(dev, gpiod_to_irq(ddata->ext_te_gpio), in dsicm_probe()
1189 if (r) { in dsicm_probe()
1191 return r; in dsicm_probe()
1212 r = PTR_ERR(bldev); in dsicm_probe()
1224 r = sysfs_create_group(&dev->kobj, &dsicm_attr_group); in dsicm_probe()
1225 if (r) { in dsicm_probe()
1236 return r; in dsicm_probe()