Lines Matching +full:10 +full:- +full:inch
1 // SPDX-License-Identifier: GPL-2.0-only
3 * MIPI-DSI based S6E63J0X03 AMOLED lcd 1.63 inch panel driver.
5 * Copyright (c) 2014-2017 Samsung Electronics Co., Ltd
58 { /* Gamma 10 */
122 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in s6e63j0x03_dcs_write_seq()
151 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in s6e63j0x03_power_on()
157 gpiod_set_value(ctx->reset_gpio, 1); in s6e63j0x03_power_on()
159 gpiod_set_value(ctx->reset_gpio, 0); in s6e63j0x03_power_on()
167 return regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in s6e63j0x03_power_off()
177 index = NUM_GAMMA_STEPS - 1; in s6e63j0x03_get_brightness_index()
185 struct backlight_device *bl_dev = ctx->bl_dev; in s6e63j0x03_update_gamma()
201 bl_dev->props.brightness = brightness; in s6e63j0x03_update_gamma()
209 unsigned int brightness = bl_dev->props.brightness; in s6e63j0x03_set_brightness()
221 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in s6e63j0x03_disable()
228 ctx->bl_dev->props.power = BACKLIGHT_POWER_REDUCED; in s6e63j0x03_disable()
248 ctx->bl_dev->props.power = BACKLIGHT_POWER_OFF; in s6e63j0x03_unprepare()
255 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in s6e63j0x03_panel_init()
278 default_mode.hdisplay - 1 + FIRST_COLUMN); in s6e63j0x03_panel_init()
282 ret = mipi_dsi_dcs_set_page_address(dsi, 0, default_mode.vdisplay - 1); in s6e63j0x03_panel_init()
335 ctx->bl_dev->props.power = BACKLIGHT_POWER_REDUCED; in s6e63j0x03_prepare()
347 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in s6e63j0x03_enable()
396 ctx->bl_dev->props.power = BACKLIGHT_POWER_ON; in s6e63j0x03_enable()
406 mode = drm_mode_duplicate(connector->dev, &default_mode); in s6e63j0x03_get_modes()
408 dev_err(panel->dev, "failed to add mode %ux%u@%u\n", in s6e63j0x03_get_modes()
411 return -ENOMEM; in s6e63j0x03_get_modes()
416 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in s6e63j0x03_get_modes()
419 connector->display_info.width_mm = 29; in s6e63j0x03_get_modes()
420 connector->display_info.height_mm = 29; in s6e63j0x03_get_modes()
435 struct device *dev = &dsi->dev; in s6e63j0x03_probe()
441 return -ENOMEM; in s6e63j0x03_probe()
445 ctx->dev = dev; in s6e63j0x03_probe()
447 dsi->lanes = 1; in s6e63j0x03_probe()
448 dsi->format = MIPI_DSI_FMT_RGB888; in s6e63j0x03_probe()
449 dsi->mode_flags = MIPI_DSI_MODE_VIDEO_NO_HFP | in s6e63j0x03_probe()
452 ctx->supplies[0].supply = "vdd3"; in s6e63j0x03_probe()
453 ctx->supplies[1].supply = "vci"; in s6e63j0x03_probe()
454 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), in s6e63j0x03_probe()
455 ctx->supplies); in s6e63j0x03_probe()
459 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in s6e63j0x03_probe()
460 if (IS_ERR(ctx->reset_gpio)) in s6e63j0x03_probe()
461 return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), in s6e63j0x03_probe()
462 "cannot get reset-gpio\n"); in s6e63j0x03_probe()
464 drm_panel_init(&ctx->panel, dev, &s6e63j0x03_funcs, in s6e63j0x03_probe()
466 ctx->panel.prepare_prev_first = true; in s6e63j0x03_probe()
468 ctx->bl_dev = backlight_device_register("s6e63j0x03", dev, ctx, in s6e63j0x03_probe()
470 if (IS_ERR(ctx->bl_dev)) in s6e63j0x03_probe()
471 return dev_err_probe(dev, PTR_ERR(ctx->bl_dev), in s6e63j0x03_probe()
474 ctx->bl_dev->props.max_brightness = MAX_BRIGHTNESS; in s6e63j0x03_probe()
475 ctx->bl_dev->props.brightness = DEFAULT_BRIGHTNESS; in s6e63j0x03_probe()
476 ctx->bl_dev->props.power = BACKLIGHT_POWER_OFF; in s6e63j0x03_probe()
478 drm_panel_add(&ctx->panel); in s6e63j0x03_probe()
487 drm_panel_remove(&ctx->panel); in s6e63j0x03_probe()
488 backlight_device_unregister(ctx->bl_dev); in s6e63j0x03_probe()
498 drm_panel_remove(&ctx->panel); in s6e63j0x03_remove()
500 backlight_device_unregister(ctx->bl_dev); in s6e63j0x03_remove()
521 MODULE_DESCRIPTION("MIPI-DSI based s6e63j0x03 AMOLED LCD Panel Driver");