Lines Matching full:boe

434 static int boe_panel_init_dcs_cmd(struct boe_panel *boe)  in boe_panel_init_dcs_cmd()  argument
436 struct mipi_dsi_device *dsi = boe->dsi; in boe_panel_init_dcs_cmd()
437 struct drm_panel *panel = &boe->base; in boe_panel_init_dcs_cmd()
440 if (boe->desc->init_cmds) { in boe_panel_init_dcs_cmd()
441 const struct panel_init_cmd *init_cmds = boe->desc->init_cmds; in boe_panel_init_dcs_cmd()
473 static int boe_panel_enter_sleep_mode(struct boe_panel *boe) in boe_panel_enter_sleep_mode() argument
475 struct mipi_dsi_device *dsi = boe->dsi; in boe_panel_enter_sleep_mode()
493 struct boe_panel *boe = to_boe_panel(panel); in boe_panel_unprepare() local
496 if (!boe->prepared) in boe_panel_unprepare()
499 ret = boe_panel_enter_sleep_mode(boe); in boe_panel_unprepare()
507 if (boe->desc->discharge_on_disable) { in boe_panel_unprepare()
508 regulator_disable(boe->avee); in boe_panel_unprepare()
509 regulator_disable(boe->avdd); in boe_panel_unprepare()
511 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_unprepare()
513 regulator_disable(boe->pp1800); in boe_panel_unprepare()
515 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_unprepare()
517 regulator_disable(boe->avee); in boe_panel_unprepare()
518 regulator_disable(boe->avdd); in boe_panel_unprepare()
520 regulator_disable(boe->pp1800); in boe_panel_unprepare()
523 boe->prepared = false; in boe_panel_unprepare()
530 struct boe_panel *boe = to_boe_panel(panel); in boe_panel_prepare() local
533 if (boe->prepared) in boe_panel_prepare()
536 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_prepare()
539 ret = regulator_enable(boe->pp1800); in boe_panel_prepare()
545 ret = regulator_enable(boe->avdd); in boe_panel_prepare()
548 ret = regulator_enable(boe->avee); in boe_panel_prepare()
554 gpiod_set_value(boe->enable_gpio, 1); in boe_panel_prepare()
556 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_prepare()
558 gpiod_set_value(boe->enable_gpio, 1); in boe_panel_prepare()
561 ret = boe_panel_init_dcs_cmd(boe); in boe_panel_prepare()
567 boe->prepared = true; in boe_panel_prepare()
572 regulator_disable(boe->avee); in boe_panel_prepare()
574 regulator_disable(boe->avdd); in boe_panel_prepare()
577 regulator_disable(boe->pp1800); in boe_panel_prepare()
578 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_prepare()
727 struct boe_panel *boe = to_boe_panel(panel); in boe_panel_get_modes() local
728 const struct drm_display_mode *m = boe->desc->modes; in boe_panel_get_modes()
742 connector->display_info.width_mm = boe->desc->size.width_mm; in boe_panel_get_modes()
743 connector->display_info.height_mm = boe->desc->size.height_mm; in boe_panel_get_modes()
744 connector->display_info.bpc = boe->desc->bpc; in boe_panel_get_modes()
745 drm_connector_set_panel_orientation(connector, boe->orientation); in boe_panel_get_modes()
757 static int boe_panel_add(struct boe_panel *boe) in boe_panel_add() argument
759 struct device *dev = &boe->dsi->dev; in boe_panel_add()
762 boe->avdd = devm_regulator_get(dev, "avdd"); in boe_panel_add()
763 if (IS_ERR(boe->avdd)) in boe_panel_add()
764 return PTR_ERR(boe->avdd); in boe_panel_add()
766 boe->avee = devm_regulator_get(dev, "avee"); in boe_panel_add()
767 if (IS_ERR(boe->avee)) in boe_panel_add()
768 return PTR_ERR(boe->avee); in boe_panel_add()
770 boe->pp1800 = devm_regulator_get(dev, "pp1800"); in boe_panel_add()
771 if (IS_ERR(boe->pp1800)) in boe_panel_add()
772 return PTR_ERR(boe->pp1800); in boe_panel_add()
774 boe->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); in boe_panel_add()
775 if (IS_ERR(boe->enable_gpio)) { in boe_panel_add()
777 PTR_ERR(boe->enable_gpio)); in boe_panel_add()
778 return PTR_ERR(boe->enable_gpio); in boe_panel_add()
781 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_add()
783 drm_panel_init(&boe->base, dev, &boe_panel_funcs, in boe_panel_add()
785 err = of_drm_get_panel_orientation(dev->of_node, &boe->orientation); in boe_panel_add()
791 err = drm_panel_of_backlight(&boe->base); in boe_panel_add()
795 boe->base.funcs = &boe_panel_funcs; in boe_panel_add()
796 boe->base.dev = &boe->dsi->dev; in boe_panel_add()
798 drm_panel_add(&boe->base); in boe_panel_add()
805 struct boe_panel *boe; in boe_panel_probe() local
809 boe = devm_kzalloc(&dsi->dev, sizeof(*boe), GFP_KERNEL); in boe_panel_probe()
810 if (!boe) in boe_panel_probe()
817 boe->desc = desc; in boe_panel_probe()
818 boe->dsi = dsi; in boe_panel_probe()
819 ret = boe_panel_add(boe); in boe_panel_probe()
823 mipi_dsi_set_drvdata(dsi, boe); in boe_panel_probe()
827 drm_panel_remove(&boe->base); in boe_panel_probe()
834 struct boe_panel *boe = mipi_dsi_get_drvdata(dsi); in boe_panel_shutdown() local
836 drm_panel_disable(&boe->base); in boe_panel_shutdown()
837 drm_panel_unprepare(&boe->base); in boe_panel_shutdown()
842 struct boe_panel *boe = mipi_dsi_get_drvdata(dsi); in boe_panel_remove() local
851 if (boe->base.dev) in boe_panel_remove()
852 drm_panel_remove(&boe->base); in boe_panel_remove()
858 { .compatible = "boe,tv101wum-nl6",
864 { .compatible = "boe,tv101wum-n53",
870 { .compatible = "boe,tv105wum-nw0",
879 .name = "panel-boe-tv101wum-nl6",
889 MODULE_DESCRIPTION("BOE tv101wum-nl6 1200x1920 video mode panel driver");