Lines Matching +full:panel +full:- +full:specific
1 // SPDX-License-Identifier: GPL-2.0
3 * Toppoly TD028TTEC1 Panel Driver
7 * Based on the omapdrm-specific panel-tpo-td028ttec1 driver
13 * Copyright (C) 2006-2007 OpenMoko, Inc.
16 * Ported and adapted from Neo 1973 U-Boot by:
82 struct drm_panel panel; member
87 #define to_td028ttec1_device(p) container_of(p, struct td028ttec1_panel, panel)
91 * on the stack in case of gcc-plugin-structleak
96 struct spi_device *spi = lcd->spi; in jbt_ret_write_0()
105 dev_err(&spi->dev, "%s: SPI write failed: %d\n", __func__, ret); in jbt_ret_write_0()
117 struct spi_device *spi = lcd->spi; in jbt_reg_write_1()
129 dev_err(&spi->dev, "%s: SPI write failed: %d\n", __func__, ret); in jbt_reg_write_1()
141 struct spi_device *spi = lcd->spi; in jbt_reg_write_2()
154 dev_err(&spi->dev, "%s: SPI write failed: %d\n", __func__, ret); in jbt_reg_write_2()
162 static int td028ttec1_prepare(struct drm_panel *panel) in td028ttec1_prepare() argument
164 struct td028ttec1_panel *lcd = to_td028ttec1_device(panel); in td028ttec1_prepare()
242 static int td028ttec1_enable(struct drm_panel *panel) in td028ttec1_enable() argument
244 struct td028ttec1_panel *lcd = to_td028ttec1_device(panel); in td028ttec1_enable()
249 static int td028ttec1_disable(struct drm_panel *panel) in td028ttec1_disable() argument
251 struct td028ttec1_panel *lcd = to_td028ttec1_device(panel); in td028ttec1_disable()
258 static int td028ttec1_unprepare(struct drm_panel *panel) in td028ttec1_unprepare() argument
260 struct td028ttec1_panel *lcd = to_td028ttec1_device(panel); in td028ttec1_unprepare()
285 static int td028ttec1_get_modes(struct drm_panel *panel, in td028ttec1_get_modes() argument
290 mode = drm_mode_duplicate(connector->dev, &td028ttec1_mode); in td028ttec1_get_modes()
292 return -ENOMEM; in td028ttec1_get_modes()
297 connector->display_info.width_mm = td028ttec1_mode.width_mm; in td028ttec1_get_modes()
298 connector->display_info.height_mm = td028ttec1_mode.height_mm; in td028ttec1_get_modes()
305 connector->display_info.bus_flags = DRM_BUS_FLAG_DE_HIGH in td028ttec1_get_modes()
325 lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL); in td028ttec1_probe()
327 return -ENOMEM; in td028ttec1_probe()
330 lcd->spi = spi; in td028ttec1_probe()
332 spi->mode = SPI_MODE_3; in td028ttec1_probe()
333 spi->bits_per_word = 9; in td028ttec1_probe()
337 dev_err(&spi->dev, "failed to setup SPI: %d\n", ret); in td028ttec1_probe()
341 drm_panel_init(&lcd->panel, &lcd->spi->dev, &td028ttec1_funcs, in td028ttec1_probe()
344 ret = drm_panel_of_backlight(&lcd->panel); in td028ttec1_probe()
348 drm_panel_add(&lcd->panel); in td028ttec1_probe()
357 drm_panel_remove(&lcd->panel); in td028ttec1_remove()
358 drm_panel_disable(&lcd->panel); in td028ttec1_remove()
359 drm_panel_unprepare(&lcd->panel); in td028ttec1_remove()
383 .name = "panel-tpo-td028ttec1",
391 MODULE_DESCRIPTION("Toppoly TD028TTEC1 panel driver");