Lines Matching refs:ret

220 	int ret = 0;  in hx8357_spi_write_then_read()  local
252 ret = spi_sync(lcd->spi, &msg); in hx8357_spi_write_then_read()
253 if (ret < 0) in hx8357_spi_write_then_read()
259 return ret; in hx8357_spi_write_then_read()
276 int ret; in hx8357_enter_standby() local
278 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_OFF); in hx8357_enter_standby()
279 if (ret < 0) in hx8357_enter_standby()
280 return ret; in hx8357_enter_standby()
284 ret = hx8357_spi_write_byte(lcdev, HX8357_ENTER_SLEEP_MODE); in hx8357_enter_standby()
285 if (ret < 0) in hx8357_enter_standby()
286 return ret; in hx8357_enter_standby()
299 int ret; in hx8357_exit_standby() local
301 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8357_exit_standby()
302 if (ret < 0) in hx8357_exit_standby()
303 return ret; in hx8357_exit_standby()
311 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8357_exit_standby()
312 if (ret < 0) in hx8357_exit_standby()
313 return ret; in hx8357_exit_standby()
336 int ret; in hx8357_lcd_init() local
348 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power, in hx8357_lcd_init()
350 if (ret < 0) in hx8357_lcd_init()
351 return ret; in hx8357_lcd_init()
353 ret = hx8357_spi_write_array(lcdev, hx8357_seq_vcom, in hx8357_lcd_init()
355 if (ret < 0) in hx8357_lcd_init()
356 return ret; in hx8357_lcd_init()
358 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power_normal, in hx8357_lcd_init()
360 if (ret < 0) in hx8357_lcd_init()
361 return ret; in hx8357_lcd_init()
363 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_driving, in hx8357_lcd_init()
365 if (ret < 0) in hx8357_lcd_init()
366 return ret; in hx8357_lcd_init()
368 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_frame, in hx8357_lcd_init()
370 if (ret < 0) in hx8357_lcd_init()
371 return ret; in hx8357_lcd_init()
373 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_related, in hx8357_lcd_init()
375 if (ret < 0) in hx8357_lcd_init()
376 return ret; in hx8357_lcd_init()
378 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined1, in hx8357_lcd_init()
380 if (ret < 0) in hx8357_lcd_init()
381 return ret; in hx8357_lcd_init()
383 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined2, in hx8357_lcd_init()
385 if (ret < 0) in hx8357_lcd_init()
386 return ret; in hx8357_lcd_init()
388 ret = hx8357_spi_write_array(lcdev, hx8357_seq_gamma, in hx8357_lcd_init()
390 if (ret < 0) in hx8357_lcd_init()
391 return ret; in hx8357_lcd_init()
393 ret = hx8357_spi_write_array(lcdev, hx8357_seq_address_mode, in hx8357_lcd_init()
395 if (ret < 0) in hx8357_lcd_init()
396 return ret; in hx8357_lcd_init()
398 ret = hx8357_spi_write_array(lcdev, hx8357_seq_pixel_format, in hx8357_lcd_init()
400 if (ret < 0) in hx8357_lcd_init()
401 return ret; in hx8357_lcd_init()
403 ret = hx8357_spi_write_array(lcdev, hx8357_seq_column_address, in hx8357_lcd_init()
405 if (ret < 0) in hx8357_lcd_init()
406 return ret; in hx8357_lcd_init()
408 ret = hx8357_spi_write_array(lcdev, hx8357_seq_page_address, in hx8357_lcd_init()
410 if (ret < 0) in hx8357_lcd_init()
411 return ret; in hx8357_lcd_init()
413 ret = hx8357_spi_write_array(lcdev, hx8357_seq_rgb, in hx8357_lcd_init()
415 if (ret < 0) in hx8357_lcd_init()
416 return ret; in hx8357_lcd_init()
418 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_mode, in hx8357_lcd_init()
420 if (ret < 0) in hx8357_lcd_init()
421 return ret; in hx8357_lcd_init()
423 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8357_lcd_init()
424 if (ret < 0) in hx8357_lcd_init()
425 return ret; in hx8357_lcd_init()
432 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8357_lcd_init()
433 if (ret < 0) in hx8357_lcd_init()
434 return ret; in hx8357_lcd_init()
438 ret = hx8357_spi_write_byte(lcdev, HX8357_WRITE_MEMORY_START); in hx8357_lcd_init()
439 if (ret < 0) in hx8357_lcd_init()
440 return ret; in hx8357_lcd_init()
447 int ret; in hx8369_lcd_init() local
449 ret = hx8357_spi_write_array(lcdev, hx8369_seq_extension_command, in hx8369_lcd_init()
451 if (ret < 0) in hx8369_lcd_init()
452 return ret; in hx8369_lcd_init()
455 ret = hx8357_spi_write_array(lcdev, hx8369_seq_display_related, in hx8369_lcd_init()
457 if (ret < 0) in hx8369_lcd_init()
458 return ret; in hx8369_lcd_init()
460 ret = hx8357_spi_write_array(lcdev, hx8369_seq_panel_waveform_cycle, in hx8369_lcd_init()
462 if (ret < 0) in hx8369_lcd_init()
463 return ret; in hx8369_lcd_init()
465 ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_address_mode, in hx8369_lcd_init()
467 if (ret < 0) in hx8369_lcd_init()
468 return ret; in hx8369_lcd_init()
470 ret = hx8357_spi_write_array(lcdev, hx8369_seq_vcom, in hx8369_lcd_init()
472 if (ret < 0) in hx8369_lcd_init()
473 return ret; in hx8369_lcd_init()
475 ret = hx8357_spi_write_array(lcdev, hx8369_seq_gip, in hx8369_lcd_init()
477 if (ret < 0) in hx8369_lcd_init()
478 return ret; in hx8369_lcd_init()
480 ret = hx8357_spi_write_array(lcdev, hx8369_seq_power, in hx8369_lcd_init()
482 if (ret < 0) in hx8369_lcd_init()
483 return ret; in hx8369_lcd_init()
485 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8369_lcd_init()
486 if (ret < 0) in hx8369_lcd_init()
487 return ret; in hx8369_lcd_init()
494 ret = hx8357_spi_write_array(lcdev, hx8369_seq_gamma_curve_related, in hx8369_lcd_init()
496 if (ret < 0) in hx8369_lcd_init()
497 return ret; in hx8369_lcd_init()
499 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8369_lcd_init()
500 if (ret < 0) in hx8369_lcd_init()
501 return ret; in hx8369_lcd_init()
504 ret = hx8357_spi_write_array(lcdev, hx8369_seq_write_CABC_control, in hx8369_lcd_init()
506 if (ret < 0) in hx8369_lcd_init()
507 return ret; in hx8369_lcd_init()
510 ret = hx8357_spi_write_array(lcdev, in hx8369_lcd_init()
513 if (ret < 0) in hx8369_lcd_init()
514 return ret; in hx8369_lcd_init()
516 ret = hx8357_spi_write_array(lcdev, in hx8369_lcd_init()
519 if (ret < 0) in hx8369_lcd_init()
520 return ret; in hx8369_lcd_init()
523 ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_display_brightness, in hx8369_lcd_init()
525 if (ret < 0) in hx8369_lcd_init()
526 return ret; in hx8369_lcd_init()
528 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8369_lcd_init()
529 if (ret < 0) in hx8369_lcd_init()
530 return ret; in hx8369_lcd_init()
540 int ret = 0; in hx8357_set_power() local
543 ret = hx8357_exit_standby(lcdev); in hx8357_set_power()
545 ret = hx8357_enter_standby(lcdev); in hx8357_set_power()
547 if (ret == 0) in hx8357_set_power()
552 return ret; in hx8357_set_power()
575 int i, ret; in hx8357_probe() local
581 ret = spi_setup(spi); in hx8357_probe()
582 if (ret < 0) in hx8357_probe()
583 return dev_err_probe(dev, ret, "SPI setup failed.\n"); in hx8357_probe()
609 ret = PTR_ERR(lcdev); in hx8357_probe()
610 return ret; in hx8357_probe()
616 ret = init_fn(lcdev); in hx8357_probe()
617 if (ret) in hx8357_probe()
618 return dev_err_probe(dev, ret, "Couldn't initialize panel\n"); in hx8357_probe()