Lines Matching refs:ret
222 int ret = 0; in hx8357_spi_write_then_read() local
254 ret = spi_sync(lcd->spi, &msg); in hx8357_spi_write_then_read()
255 if (ret < 0) in hx8357_spi_write_then_read()
261 return ret; in hx8357_spi_write_then_read()
278 int ret; in hx8357_enter_standby() local
280 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_OFF); in hx8357_enter_standby()
281 if (ret < 0) in hx8357_enter_standby()
282 return ret; in hx8357_enter_standby()
286 ret = hx8357_spi_write_byte(lcdev, HX8357_ENTER_SLEEP_MODE); in hx8357_enter_standby()
287 if (ret < 0) in hx8357_enter_standby()
288 return ret; in hx8357_enter_standby()
301 int ret; in hx8357_exit_standby() local
303 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8357_exit_standby()
304 if (ret < 0) in hx8357_exit_standby()
305 return ret; in hx8357_exit_standby()
313 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8357_exit_standby()
314 if (ret < 0) in hx8357_exit_standby()
315 return ret; in hx8357_exit_standby()
338 int ret; in hx8357_lcd_init() local
350 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power, in hx8357_lcd_init()
352 if (ret < 0) in hx8357_lcd_init()
353 return ret; in hx8357_lcd_init()
355 ret = hx8357_spi_write_array(lcdev, hx8357_seq_vcom, in hx8357_lcd_init()
357 if (ret < 0) in hx8357_lcd_init()
358 return ret; in hx8357_lcd_init()
360 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power_normal, in hx8357_lcd_init()
362 if (ret < 0) in hx8357_lcd_init()
363 return ret; in hx8357_lcd_init()
365 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_driving, in hx8357_lcd_init()
367 if (ret < 0) in hx8357_lcd_init()
368 return ret; in hx8357_lcd_init()
370 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_frame, in hx8357_lcd_init()
372 if (ret < 0) in hx8357_lcd_init()
373 return ret; in hx8357_lcd_init()
375 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_related, in hx8357_lcd_init()
377 if (ret < 0) in hx8357_lcd_init()
378 return ret; in hx8357_lcd_init()
380 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined1, in hx8357_lcd_init()
382 if (ret < 0) in hx8357_lcd_init()
383 return ret; in hx8357_lcd_init()
385 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined2, in hx8357_lcd_init()
387 if (ret < 0) in hx8357_lcd_init()
388 return ret; in hx8357_lcd_init()
390 ret = hx8357_spi_write_array(lcdev, hx8357_seq_gamma, in hx8357_lcd_init()
392 if (ret < 0) in hx8357_lcd_init()
393 return ret; in hx8357_lcd_init()
395 ret = hx8357_spi_write_array(lcdev, hx8357_seq_address_mode, in hx8357_lcd_init()
397 if (ret < 0) in hx8357_lcd_init()
398 return ret; in hx8357_lcd_init()
400 ret = hx8357_spi_write_array(lcdev, hx8357_seq_pixel_format, in hx8357_lcd_init()
402 if (ret < 0) in hx8357_lcd_init()
403 return ret; in hx8357_lcd_init()
405 ret = hx8357_spi_write_array(lcdev, hx8357_seq_column_address, in hx8357_lcd_init()
407 if (ret < 0) in hx8357_lcd_init()
408 return ret; in hx8357_lcd_init()
410 ret = hx8357_spi_write_array(lcdev, hx8357_seq_page_address, in hx8357_lcd_init()
412 if (ret < 0) in hx8357_lcd_init()
413 return ret; in hx8357_lcd_init()
415 ret = hx8357_spi_write_array(lcdev, hx8357_seq_rgb, in hx8357_lcd_init()
417 if (ret < 0) in hx8357_lcd_init()
418 return ret; in hx8357_lcd_init()
420 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_mode, in hx8357_lcd_init()
422 if (ret < 0) in hx8357_lcd_init()
423 return ret; in hx8357_lcd_init()
425 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8357_lcd_init()
426 if (ret < 0) in hx8357_lcd_init()
427 return ret; in hx8357_lcd_init()
434 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8357_lcd_init()
435 if (ret < 0) in hx8357_lcd_init()
436 return ret; in hx8357_lcd_init()
440 ret = hx8357_spi_write_byte(lcdev, HX8357_WRITE_MEMORY_START); in hx8357_lcd_init()
441 if (ret < 0) in hx8357_lcd_init()
442 return ret; in hx8357_lcd_init()
449 int ret; in hx8369_lcd_init() local
451 ret = hx8357_spi_write_array(lcdev, hx8369_seq_extension_command, in hx8369_lcd_init()
453 if (ret < 0) in hx8369_lcd_init()
454 return ret; in hx8369_lcd_init()
457 ret = hx8357_spi_write_array(lcdev, hx8369_seq_display_related, in hx8369_lcd_init()
459 if (ret < 0) in hx8369_lcd_init()
460 return ret; in hx8369_lcd_init()
462 ret = hx8357_spi_write_array(lcdev, hx8369_seq_panel_waveform_cycle, in hx8369_lcd_init()
464 if (ret < 0) in hx8369_lcd_init()
465 return ret; in hx8369_lcd_init()
467 ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_address_mode, in hx8369_lcd_init()
469 if (ret < 0) in hx8369_lcd_init()
470 return ret; in hx8369_lcd_init()
472 ret = hx8357_spi_write_array(lcdev, hx8369_seq_vcom, in hx8369_lcd_init()
474 if (ret < 0) in hx8369_lcd_init()
475 return ret; in hx8369_lcd_init()
477 ret = hx8357_spi_write_array(lcdev, hx8369_seq_gip, in hx8369_lcd_init()
479 if (ret < 0) in hx8369_lcd_init()
480 return ret; in hx8369_lcd_init()
482 ret = hx8357_spi_write_array(lcdev, hx8369_seq_power, in hx8369_lcd_init()
484 if (ret < 0) in hx8369_lcd_init()
485 return ret; in hx8369_lcd_init()
487 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8369_lcd_init()
488 if (ret < 0) in hx8369_lcd_init()
489 return ret; in hx8369_lcd_init()
496 ret = hx8357_spi_write_array(lcdev, hx8369_seq_gamma_curve_related, in hx8369_lcd_init()
498 if (ret < 0) in hx8369_lcd_init()
499 return ret; in hx8369_lcd_init()
501 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8369_lcd_init()
502 if (ret < 0) in hx8369_lcd_init()
503 return ret; in hx8369_lcd_init()
506 ret = hx8357_spi_write_array(lcdev, hx8369_seq_write_CABC_control, in hx8369_lcd_init()
508 if (ret < 0) in hx8369_lcd_init()
509 return ret; in hx8369_lcd_init()
512 ret = hx8357_spi_write_array(lcdev, in hx8369_lcd_init()
515 if (ret < 0) in hx8369_lcd_init()
516 return ret; in hx8369_lcd_init()
518 ret = hx8357_spi_write_array(lcdev, in hx8369_lcd_init()
521 if (ret < 0) in hx8369_lcd_init()
522 return ret; in hx8369_lcd_init()
525 ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_display_brightness, in hx8369_lcd_init()
527 if (ret < 0) in hx8369_lcd_init()
528 return ret; in hx8369_lcd_init()
530 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8369_lcd_init()
531 if (ret < 0) in hx8369_lcd_init()
532 return ret; in hx8369_lcd_init()
542 int ret = 0; in hx8357_set_power() local
545 ret = hx8357_exit_standby(lcdev); in hx8357_set_power()
547 ret = hx8357_enter_standby(lcdev); in hx8357_set_power()
549 if (ret == 0) in hx8357_set_power()
554 return ret; in hx8357_set_power()
587 int i, ret; in hx8357_probe() local
593 ret = spi_setup(spi); in hx8357_probe()
594 if (ret < 0) { in hx8357_probe()
596 return ret; in hx8357_probe()
611 ret = devm_gpio_request_one(&spi->dev, lcd->reset, in hx8357_probe()
614 if (ret) { in hx8357_probe()
617 lcd->reset, ret); in hx8357_probe()
636 ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i], in hx8357_probe()
639 if (ret) { in hx8357_probe()
641 lcd->im_pins[i], ret); in hx8357_probe()
652 ret = PTR_ERR(lcdev); in hx8357_probe()
653 return ret; in hx8357_probe()
659 ret = ((int (*)(struct lcd_device *))match->data)(lcdev); in hx8357_probe()
660 if (ret) { in hx8357_probe()
662 return ret; in hx8357_probe()