Lines Matching +full:- +full:33000

1 // SPDX-License-Identifier: GPL-2.0
58 #define MCS_GMCT2_2N 0xE200 /* Gamma Correction 2.2- Setting */
91 .clock = 33000,
114 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in otm8009a_dcs_write_buf()
117 dev_warn(ctx->dev, "mipi dsi dcs write buffer failed\n"); in otm8009a_dcs_write_buf()
134 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in otm8009a_init_sequence()
229 ret = mipi_dsi_dcs_set_column_address(dsi, 0, OTM8009A_HDISPLAY - 1); in otm8009a_init_sequence()
233 ret = mipi_dsi_dcs_set_page_address(dsi, 0, OTM8009A_VDISPLAY - 1); in otm8009a_init_sequence()
266 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in otm8009a_disable()
269 backlight_disable(ctx->bl_dev); in otm8009a_disable()
288 if (ctx->reset_gpio) { in otm8009a_unprepare()
289 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in otm8009a_unprepare()
293 regulator_disable(ctx->supply); in otm8009a_unprepare()
295 ctx->prepared = false; in otm8009a_unprepare()
305 ret = regulator_enable(ctx->supply); in otm8009a_prepare()
307 dev_err(panel->dev, "failed to enable supply: %d\n", ret); in otm8009a_prepare()
311 if (ctx->reset_gpio) { in otm8009a_prepare()
312 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in otm8009a_prepare()
313 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in otm8009a_prepare()
315 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in otm8009a_prepare()
323 ctx->prepared = true; in otm8009a_prepare()
332 backlight_enable(ctx->bl_dev); in otm8009a_enable()
345 mode = drm_mode_duplicate(connector->dev, &modes[i]); in otm8009a_get_modes()
347 dev_err(panel->dev, "failed to add mode %ux%u@%u\n", in otm8009a_get_modes()
351 return -ENOMEM; in otm8009a_get_modes()
354 mode->type = DRM_MODE_TYPE_DRIVER; in otm8009a_get_modes()
358 mode->type |= DRM_MODE_TYPE_PREFERRED; in otm8009a_get_modes()
364 connector->display_info.width_mm = mode->width_mm; in otm8009a_get_modes()
365 connector->display_info.height_mm = mode->height_mm; in otm8009a_get_modes()
379 * DSI-BASED BACKLIGHT
387 if (!ctx->prepared) { in otm8009a_backlight_update_status()
388 dev_dbg(&bd->dev, "lcd not ready yet for setting its backlight!\n"); in otm8009a_backlight_update_status()
389 return -ENXIO; in otm8009a_backlight_update_status()
392 if (bd->props.power <= BACKLIGHT_POWER_REDUCED) { in otm8009a_backlight_update_status()
395 * as otm8009a driver support only 8-bit brightness (1 param). in otm8009a_backlight_update_status()
398 data[1] = bd->props.brightness; in otm8009a_backlight_update_status()
422 struct device *dev = &dsi->dev; in otm8009a_probe()
428 return -ENOMEM; in otm8009a_probe()
430 ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); in otm8009a_probe()
431 if (IS_ERR(ctx->reset_gpio)) { in otm8009a_probe()
432 dev_err(dev, "cannot get reset-gpio\n"); in otm8009a_probe()
433 return PTR_ERR(ctx->reset_gpio); in otm8009a_probe()
436 ctx->supply = devm_regulator_get(dev, "power"); in otm8009a_probe()
437 if (IS_ERR(ctx->supply)) { in otm8009a_probe()
438 ret = PTR_ERR(ctx->supply); in otm8009a_probe()
439 if (ret != -EPROBE_DEFER) in otm8009a_probe()
446 ctx->dev = dev; in otm8009a_probe()
448 dsi->lanes = 2; in otm8009a_probe()
449 dsi->format = MIPI_DSI_FMT_RGB888; in otm8009a_probe()
450 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | in otm8009a_probe()
453 drm_panel_init(&ctx->panel, dev, &otm8009a_drm_funcs, in otm8009a_probe()
456 ctx->bl_dev = devm_backlight_device_register(dev, dev_name(dev), in otm8009a_probe()
460 if (IS_ERR(ctx->bl_dev)) { in otm8009a_probe()
461 ret = PTR_ERR(ctx->bl_dev); in otm8009a_probe()
466 ctx->bl_dev->props.max_brightness = OTM8009A_BACKLIGHT_MAX; in otm8009a_probe()
467 ctx->bl_dev->props.brightness = OTM8009A_BACKLIGHT_DEFAULT; in otm8009a_probe()
468 ctx->bl_dev->props.power = BACKLIGHT_POWER_OFF; in otm8009a_probe()
469 ctx->bl_dev->props.type = BACKLIGHT_RAW; in otm8009a_probe()
471 drm_panel_add(&ctx->panel); in otm8009a_probe()
476 drm_panel_remove(&ctx->panel); in otm8009a_probe()
488 drm_panel_remove(&ctx->panel); in otm8009a_remove()
501 .name = "panel-orisetech-otm8009a",