Lines Matching refs:ret

400 	int ret;  in nt35510_send_long()  local
404 ret = mipi_dsi_dcs_write(dsi, cmd, seqp, chunk); in nt35510_send_long()
405 if (ret < 0) { in nt35510_send_long()
407 return ret; in nt35510_send_long()
416 ret = mipi_dsi_generic_write(dsi, seqp, chunk); in nt35510_send_long()
417 if (ret < 0) { in nt35510_send_long()
419 return ret; in nt35510_send_long()
432 int ret; in nt35510_read_id() local
434 ret = mipi_dsi_dcs_read(dsi, MCS_CMD_READ_ID1, &id1, 1); in nt35510_read_id()
435 if (ret < 0) { in nt35510_read_id()
437 return ret; in nt35510_read_id()
439 ret = mipi_dsi_dcs_read(dsi, MCS_CMD_READ_ID2, &id2, 1); in nt35510_read_id()
440 if (ret < 0) { in nt35510_read_id()
442 return ret; in nt35510_read_id()
444 ret = mipi_dsi_dcs_read(dsi, MCS_CMD_READ_ID3, &id3, 1); in nt35510_read_id()
445 if (ret < 0) { in nt35510_read_id()
447 return ret; in nt35510_read_id()
467 int ret; in nt35510_setup_power() local
469 ret = nt35510_send_long(nt, dsi, NT35510_P1_SETAVDD, in nt35510_setup_power()
472 if (ret) in nt35510_setup_power()
473 return ret; in nt35510_setup_power()
474 ret = nt35510_send_long(nt, dsi, NT35510_P1_BT1CTR, in nt35510_setup_power()
477 if (ret) in nt35510_setup_power()
478 return ret; in nt35510_setup_power()
479 ret = nt35510_send_long(nt, dsi, NT35510_P1_SETAVEE, in nt35510_setup_power()
482 if (ret) in nt35510_setup_power()
483 return ret; in nt35510_setup_power()
484 ret = nt35510_send_long(nt, dsi, NT35510_P1_BT2CTR, in nt35510_setup_power()
487 if (ret) in nt35510_setup_power()
488 return ret; in nt35510_setup_power()
489 ret = nt35510_send_long(nt, dsi, NT35510_P1_SETVGH, in nt35510_setup_power()
492 if (ret) in nt35510_setup_power()
493 return ret; in nt35510_setup_power()
494 ret = nt35510_send_long(nt, dsi, NT35510_P1_BT4CTR, in nt35510_setup_power()
497 if (ret) in nt35510_setup_power()
498 return ret; in nt35510_setup_power()
499 ret = nt35510_send_long(nt, dsi, NT35510_P1_VGHCTR, in nt35510_setup_power()
502 if (ret) in nt35510_setup_power()
503 return ret; in nt35510_setup_power()
504 ret = nt35510_send_long(nt, dsi, NT35510_P1_SETVGL, in nt35510_setup_power()
507 if (ret) in nt35510_setup_power()
508 return ret; in nt35510_setup_power()
509 ret = nt35510_send_long(nt, dsi, NT35510_P1_BT5CTR, in nt35510_setup_power()
512 if (ret) in nt35510_setup_power()
513 return ret; in nt35510_setup_power()
514 ret = nt35510_send_long(nt, dsi, NT35510_P1_SETVGP, in nt35510_setup_power()
517 if (ret) in nt35510_setup_power()
518 return ret; in nt35510_setup_power()
519 ret = nt35510_send_long(nt, dsi, NT35510_P1_SETVGN, in nt35510_setup_power()
522 if (ret) in nt35510_setup_power()
523 return ret; in nt35510_setup_power()
545 int ret; in nt35510_setup_display() local
551 ret = nt35510_send_long(nt, dsi, NT35510_P0_DOPCTR, in nt35510_setup_display()
554 if (ret) in nt35510_setup_display()
555 return ret; in nt35510_setup_display()
557 ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_ADDRESS_MODE, &addr_mode, in nt35510_setup_display()
559 if (ret < 0) in nt35510_setup_display()
560 return ret; in nt35510_setup_display()
568 ret = mipi_dsi_dcs_write(dsi, NT35510_P0_SDHDTCTR, &val, in nt35510_setup_display()
570 if (ret < 0) in nt35510_setup_display()
571 return ret; in nt35510_setup_display()
576 ret = nt35510_send_long(nt, dsi, NT35510_P0_GSEQCTR, in nt35510_setup_display()
579 if (ret) in nt35510_setup_display()
580 return ret; in nt35510_setup_display()
582 ret = nt35510_send_long(nt, dsi, NT35510_P0_SDEQCTR, in nt35510_setup_display()
585 if (ret) in nt35510_setup_display()
586 return ret; in nt35510_setup_display()
588 ret = mipi_dsi_dcs_write(dsi, NT35510_P0_SDVPCTR, in nt35510_setup_display()
590 if (ret < 0) in nt35510_setup_display()
591 return ret; in nt35510_setup_display()
616 ret = nt35510_send_long(nt, dsi, NT35510_P0_DPFRCTR1, in nt35510_setup_display()
619 if (ret) in nt35510_setup_display()
620 return ret; in nt35510_setup_display()
623 ret = nt35510_send_long(nt, dsi, NT35510_P0_DPFRCTR2, in nt35510_setup_display()
626 if (ret) in nt35510_setup_display()
627 return ret; in nt35510_setup_display()
628 ret = nt35510_send_long(nt, dsi, NT35510_P0_DPFRCTR3, in nt35510_setup_display()
631 if (ret) in nt35510_setup_display()
632 return ret; in nt35510_setup_display()
635 ret = mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK); in nt35510_setup_display()
636 if (ret) in nt35510_setup_display()
637 return ret; in nt35510_setup_display()
640 ret = nt35510_send_long(nt, dsi, NT35510_P0_DPMCTR12, in nt35510_setup_display()
643 if (ret) in nt35510_setup_display()
644 return ret; in nt35510_setup_display()
654 int ret; in nt35510_set_brightness() local
657 ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, in nt35510_set_brightness()
660 if (ret < 0) in nt35510_set_brightness()
661 return ret; in nt35510_set_brightness()
676 int ret; in nt35510_power_on() local
678 ret = regulator_bulk_enable(ARRAY_SIZE(nt->supplies), nt->supplies); in nt35510_power_on()
679 if (ret < 0) { in nt35510_power_on()
681 return ret; in nt35510_power_on()
697 ret = nt35510_send_long(nt, dsi, MCS_CMD_MTP_READ_PARAM, in nt35510_power_on()
700 if (ret) in nt35510_power_on()
701 return ret; in nt35510_power_on()
703 ret = nt35510_send_long(nt, dsi, MCS_CMD_MTP_READ_SETTING, in nt35510_power_on()
706 if (ret) in nt35510_power_on()
707 return ret; in nt35510_power_on()
712 ret = nt35510_send_long(nt, dsi, MCS_CMD_MAUCCTR, in nt35510_power_on()
715 if (ret) in nt35510_power_on()
716 return ret; in nt35510_power_on()
718 ret = nt35510_setup_power(nt); in nt35510_power_on()
719 if (ret) in nt35510_power_on()
720 return ret; in nt35510_power_on()
722 ret = nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_RED_POS, in nt35510_power_on()
725 if (ret) in nt35510_power_on()
726 return ret; in nt35510_power_on()
727 ret = nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_GREEN_POS, in nt35510_power_on()
730 if (ret) in nt35510_power_on()
731 return ret; in nt35510_power_on()
732 ret = nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_BLUE_POS, in nt35510_power_on()
735 if (ret) in nt35510_power_on()
736 return ret; in nt35510_power_on()
737 ret = nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_RED_NEG, in nt35510_power_on()
740 if (ret) in nt35510_power_on()
741 return ret; in nt35510_power_on()
742 ret = nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_GREEN_NEG, in nt35510_power_on()
745 if (ret) in nt35510_power_on()
746 return ret; in nt35510_power_on()
747 ret = nt35510_send_long(nt, dsi, NT35510_P1_SET_GAMMA_BLUE_NEG, in nt35510_power_on()
750 if (ret) in nt35510_power_on()
751 return ret; in nt35510_power_on()
754 ret = nt35510_send_long(nt, dsi, MCS_CMD_MAUCCTR, in nt35510_power_on()
757 if (ret) in nt35510_power_on()
758 return ret; in nt35510_power_on()
760 ret = nt35510_setup_display(nt); in nt35510_power_on()
761 if (ret) in nt35510_power_on()
762 return ret; in nt35510_power_on()
769 int ret; in nt35510_power_off() local
771 ret = regulator_bulk_disable(ARRAY_SIZE(nt->supplies), nt->supplies); in nt35510_power_off()
772 if (ret) in nt35510_power_off()
773 return ret; in nt35510_power_off()
785 int ret; in nt35510_unprepare() local
787 ret = mipi_dsi_dcs_set_display_off(dsi); in nt35510_unprepare()
788 if (ret) { in nt35510_unprepare()
789 dev_err(nt->dev, "failed to turn display off (%d)\n", ret); in nt35510_unprepare()
790 return ret; in nt35510_unprepare()
795 ret = mipi_dsi_dcs_enter_sleep_mode(dsi); in nt35510_unprepare()
796 if (ret) { in nt35510_unprepare()
797 dev_err(nt->dev, "failed to enter sleep mode (%d)\n", ret); in nt35510_unprepare()
798 return ret; in nt35510_unprepare()
804 ret = nt35510_power_off(nt); in nt35510_unprepare()
805 if (ret) in nt35510_unprepare()
806 return ret; in nt35510_unprepare()
815 int ret; in nt35510_prepare() local
817 ret = nt35510_power_on(nt); in nt35510_prepare()
818 if (ret) in nt35510_prepare()
819 return ret; in nt35510_prepare()
822 ret = mipi_dsi_dcs_exit_sleep_mode(dsi); in nt35510_prepare()
823 if (ret) { in nt35510_prepare()
824 dev_err(nt->dev, "failed to exit sleep mode (%d)\n", ret); in nt35510_prepare()
825 return ret; in nt35510_prepare()
830 ret = mipi_dsi_dcs_set_display_on(dsi); in nt35510_prepare()
831 if (ret) { in nt35510_prepare()
832 dev_err(nt->dev, "failed to turn display on (%d)\n", ret); in nt35510_prepare()
833 return ret; in nt35510_prepare()
876 int ret; in nt35510_probe() local
913 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(nt->supplies), in nt35510_probe()
915 if (ret < 0) in nt35510_probe()
916 return ret; in nt35510_probe()
917 ret = regulator_set_voltage(nt->supplies[0].consumer, in nt35510_probe()
919 if (ret) in nt35510_probe()
920 return ret; in nt35510_probe()
921 ret = regulator_set_voltage(nt->supplies[1].consumer, in nt35510_probe()
923 if (ret) in nt35510_probe()
924 return ret; in nt35510_probe()
940 ret = drm_panel_of_backlight(&nt->panel); in nt35510_probe()
941 if (ret) { in nt35510_probe()
942 dev_err(dev, "error getting external backlight %d\n", ret); in nt35510_probe()
943 return ret; in nt35510_probe()
962 ret = mipi_dsi_attach(dsi); in nt35510_probe()
963 if (ret < 0) in nt35510_probe()
972 int ret; in nt35510_remove() local
976 ret = nt35510_power_off(nt); in nt35510_remove()
977 if (ret) in nt35510_remove()