Lines Matching +full:panel +full:- +full:specific
1 // SPDX-License-Identifier: GPL-2.0+
3 * NEC NL8048HL11 Panel Driver
7 * Based on the omapdrm-specific panel-nec-nl8048hl11 driver
24 struct drm_panel panel; member
30 #define to_nl8048_device(p) container_of(p, struct nl8048_panel, panel)
38 ret = spi_write(lcd->spi, data, sizeof(data)); in nl8048_write()
40 dev_err(&lcd->spi->dev, "SPI write to %u failed: %d\n", in nl8048_write()
90 static int nl8048_disable(struct drm_panel *panel) in nl8048_disable() argument
92 struct nl8048_panel *lcd = to_nl8048_device(panel); in nl8048_disable()
94 gpiod_set_value_cansleep(lcd->reset_gpio, 0); in nl8048_disable()
99 static int nl8048_enable(struct drm_panel *panel) in nl8048_enable() argument
101 struct nl8048_panel *lcd = to_nl8048_device(panel); in nl8048_enable()
103 gpiod_set_value_cansleep(lcd->reset_gpio, 1); in nl8048_enable()
125 static int nl8048_get_modes(struct drm_panel *panel, in nl8048_get_modes() argument
130 mode = drm_mode_duplicate(connector->dev, &nl8048_mode); in nl8048_get_modes()
132 return -ENOMEM; in nl8048_get_modes()
137 connector->display_info.width_mm = nl8048_mode.width_mm; in nl8048_get_modes()
138 connector->display_info.height_mm = nl8048_mode.height_mm; in nl8048_get_modes()
139 connector->display_info.bus_flags = DRM_BUS_FLAG_DE_HIGH in nl8048_get_modes()
166 /* Reinitialize the panel. */ in nl8048_resume()
167 spi_setup(lcd->spi); in nl8048_resume()
181 lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL); in nl8048_probe()
183 return -ENOMEM; in nl8048_probe()
186 lcd->spi = spi; in nl8048_probe()
188 lcd->reset_gpio = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_LOW); in nl8048_probe()
189 if (IS_ERR(lcd->reset_gpio)) { in nl8048_probe()
190 dev_err(&spi->dev, "failed to parse reset gpio\n"); in nl8048_probe()
191 return PTR_ERR(lcd->reset_gpio); in nl8048_probe()
194 spi->mode = SPI_MODE_0; in nl8048_probe()
195 spi->bits_per_word = 32; in nl8048_probe()
199 dev_err(&spi->dev, "failed to setup SPI: %d\n", ret); in nl8048_probe()
207 drm_panel_init(&lcd->panel, &lcd->spi->dev, &nl8048_funcs, in nl8048_probe()
210 drm_panel_add(&lcd->panel); in nl8048_probe()
219 drm_panel_remove(&lcd->panel); in nl8048_remove()
220 drm_panel_disable(&lcd->panel); in nl8048_remove()
221 drm_panel_unprepare(&lcd->panel); in nl8048_remove()
243 .name = "panel-nec-nl8048hl11",
252 MODULE_DESCRIPTION("NEC-NL8048HL11 Driver");