Lines Matching refs:ret

221 	int ret = 0;  in hx8357_spi_write_then_read()  local
253 ret = spi_sync(lcd->spi, &msg); in hx8357_spi_write_then_read()
254 if (ret < 0) in hx8357_spi_write_then_read()
260 return ret; in hx8357_spi_write_then_read()
277 int ret; in hx8357_enter_standby() local
279 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_OFF); in hx8357_enter_standby()
280 if (ret < 0) in hx8357_enter_standby()
281 return ret; in hx8357_enter_standby()
285 ret = hx8357_spi_write_byte(lcdev, HX8357_ENTER_SLEEP_MODE); in hx8357_enter_standby()
286 if (ret < 0) in hx8357_enter_standby()
287 return ret; in hx8357_enter_standby()
300 int ret; in hx8357_exit_standby() local
302 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8357_exit_standby()
303 if (ret < 0) in hx8357_exit_standby()
304 return ret; in hx8357_exit_standby()
312 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8357_exit_standby()
313 if (ret < 0) in hx8357_exit_standby()
314 return ret; in hx8357_exit_standby()
337 int ret; in hx8357_lcd_init() local
349 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power, in hx8357_lcd_init()
351 if (ret < 0) in hx8357_lcd_init()
352 return ret; in hx8357_lcd_init()
354 ret = hx8357_spi_write_array(lcdev, hx8357_seq_vcom, in hx8357_lcd_init()
356 if (ret < 0) in hx8357_lcd_init()
357 return ret; in hx8357_lcd_init()
359 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power_normal, in hx8357_lcd_init()
361 if (ret < 0) in hx8357_lcd_init()
362 return ret; in hx8357_lcd_init()
364 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_driving, in hx8357_lcd_init()
366 if (ret < 0) in hx8357_lcd_init()
367 return ret; in hx8357_lcd_init()
369 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_frame, in hx8357_lcd_init()
371 if (ret < 0) in hx8357_lcd_init()
372 return ret; in hx8357_lcd_init()
374 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_related, in hx8357_lcd_init()
376 if (ret < 0) in hx8357_lcd_init()
377 return ret; in hx8357_lcd_init()
379 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined1, in hx8357_lcd_init()
381 if (ret < 0) in hx8357_lcd_init()
382 return ret; in hx8357_lcd_init()
384 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined2, in hx8357_lcd_init()
386 if (ret < 0) in hx8357_lcd_init()
387 return ret; in hx8357_lcd_init()
389 ret = hx8357_spi_write_array(lcdev, hx8357_seq_gamma, in hx8357_lcd_init()
391 if (ret < 0) in hx8357_lcd_init()
392 return ret; in hx8357_lcd_init()
394 ret = hx8357_spi_write_array(lcdev, hx8357_seq_address_mode, in hx8357_lcd_init()
396 if (ret < 0) in hx8357_lcd_init()
397 return ret; in hx8357_lcd_init()
399 ret = hx8357_spi_write_array(lcdev, hx8357_seq_pixel_format, in hx8357_lcd_init()
401 if (ret < 0) in hx8357_lcd_init()
402 return ret; in hx8357_lcd_init()
404 ret = hx8357_spi_write_array(lcdev, hx8357_seq_column_address, in hx8357_lcd_init()
406 if (ret < 0) in hx8357_lcd_init()
407 return ret; in hx8357_lcd_init()
409 ret = hx8357_spi_write_array(lcdev, hx8357_seq_page_address, in hx8357_lcd_init()
411 if (ret < 0) in hx8357_lcd_init()
412 return ret; in hx8357_lcd_init()
414 ret = hx8357_spi_write_array(lcdev, hx8357_seq_rgb, in hx8357_lcd_init()
416 if (ret < 0) in hx8357_lcd_init()
417 return ret; in hx8357_lcd_init()
419 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_mode, in hx8357_lcd_init()
421 if (ret < 0) in hx8357_lcd_init()
422 return ret; in hx8357_lcd_init()
424 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8357_lcd_init()
425 if (ret < 0) in hx8357_lcd_init()
426 return ret; in hx8357_lcd_init()
433 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8357_lcd_init()
434 if (ret < 0) in hx8357_lcd_init()
435 return ret; in hx8357_lcd_init()
439 ret = hx8357_spi_write_byte(lcdev, HX8357_WRITE_MEMORY_START); in hx8357_lcd_init()
440 if (ret < 0) in hx8357_lcd_init()
441 return ret; in hx8357_lcd_init()
448 int ret; in hx8369_lcd_init() local
450 ret = hx8357_spi_write_array(lcdev, hx8369_seq_extension_command, in hx8369_lcd_init()
452 if (ret < 0) in hx8369_lcd_init()
453 return ret; in hx8369_lcd_init()
456 ret = hx8357_spi_write_array(lcdev, hx8369_seq_display_related, in hx8369_lcd_init()
458 if (ret < 0) in hx8369_lcd_init()
459 return ret; in hx8369_lcd_init()
461 ret = hx8357_spi_write_array(lcdev, hx8369_seq_panel_waveform_cycle, in hx8369_lcd_init()
463 if (ret < 0) in hx8369_lcd_init()
464 return ret; in hx8369_lcd_init()
466 ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_address_mode, in hx8369_lcd_init()
468 if (ret < 0) in hx8369_lcd_init()
469 return ret; in hx8369_lcd_init()
471 ret = hx8357_spi_write_array(lcdev, hx8369_seq_vcom, in hx8369_lcd_init()
473 if (ret < 0) in hx8369_lcd_init()
474 return ret; in hx8369_lcd_init()
476 ret = hx8357_spi_write_array(lcdev, hx8369_seq_gip, in hx8369_lcd_init()
478 if (ret < 0) in hx8369_lcd_init()
479 return ret; in hx8369_lcd_init()
481 ret = hx8357_spi_write_array(lcdev, hx8369_seq_power, in hx8369_lcd_init()
483 if (ret < 0) in hx8369_lcd_init()
484 return ret; in hx8369_lcd_init()
486 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8369_lcd_init()
487 if (ret < 0) in hx8369_lcd_init()
488 return ret; in hx8369_lcd_init()
495 ret = hx8357_spi_write_array(lcdev, hx8369_seq_gamma_curve_related, in hx8369_lcd_init()
497 if (ret < 0) in hx8369_lcd_init()
498 return ret; in hx8369_lcd_init()
500 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8369_lcd_init()
501 if (ret < 0) in hx8369_lcd_init()
502 return ret; in hx8369_lcd_init()
505 ret = hx8357_spi_write_array(lcdev, hx8369_seq_write_CABC_control, in hx8369_lcd_init()
507 if (ret < 0) in hx8369_lcd_init()
508 return ret; in hx8369_lcd_init()
511 ret = hx8357_spi_write_array(lcdev, in hx8369_lcd_init()
514 if (ret < 0) in hx8369_lcd_init()
515 return ret; in hx8369_lcd_init()
517 ret = hx8357_spi_write_array(lcdev, in hx8369_lcd_init()
520 if (ret < 0) in hx8369_lcd_init()
521 return ret; in hx8369_lcd_init()
524 ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_display_brightness, in hx8369_lcd_init()
526 if (ret < 0) in hx8369_lcd_init()
527 return ret; in hx8369_lcd_init()
529 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8369_lcd_init()
530 if (ret < 0) in hx8369_lcd_init()
531 return ret; in hx8369_lcd_init()
541 int ret = 0; in hx8357_set_power() local
544 ret = hx8357_exit_standby(lcdev); in hx8357_set_power()
546 ret = hx8357_enter_standby(lcdev); in hx8357_set_power()
548 if (ret == 0) in hx8357_set_power()
553 return ret; in hx8357_set_power()
586 int i, ret; in hx8357_probe() local
592 ret = spi_setup(spi); in hx8357_probe()
593 if (ret < 0) { in hx8357_probe()
595 return ret; in hx8357_probe()
610 ret = devm_gpio_request_one(&spi->dev, lcd->reset, in hx8357_probe()
613 if (ret) { in hx8357_probe()
616 lcd->reset, ret); in hx8357_probe()
635 ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i], in hx8357_probe()
638 if (ret) { in hx8357_probe()
640 lcd->im_pins[i], ret); in hx8357_probe()
651 ret = PTR_ERR(lcdev); in hx8357_probe()
652 return ret; in hx8357_probe()
658 ret = ((int (*)(struct lcd_device *))match->data)(lcdev); in hx8357_probe()
659 if (ret) { in hx8357_probe()
661 return ret; in hx8357_probe()