Lines Matching +full:panel +full:- +full:specific
1 // SPDX-License-Identifier: GPL-2.0
3 * LG.Philips LB035Q02 LCD Panel Driver
7 * Based on the omapdrm-specific panel-lgphilips-lb035q02 driver
24 struct drm_panel panel; member
30 #define to_lb035q02_device(p) container_of(p, struct lb035q02_device, panel)
60 return spi_sync(lcd->spi, &msg); in lb035q02_write()
109 static int lb035q02_disable(struct drm_panel *panel) in lb035q02_disable() argument
111 struct lb035q02_device *lcd = to_lb035q02_device(panel); in lb035q02_disable()
113 gpiod_set_value_cansleep(lcd->enable_gpio, 0); in lb035q02_disable()
118 static int lb035q02_enable(struct drm_panel *panel) in lb035q02_enable() argument
120 struct lb035q02_device *lcd = to_lb035q02_device(panel); in lb035q02_enable()
122 gpiod_set_value_cansleep(lcd->enable_gpio, 1); in lb035q02_enable()
143 static int lb035q02_get_modes(struct drm_panel *panel, in lb035q02_get_modes() argument
148 mode = drm_mode_duplicate(connector->dev, &lb035q02_mode); in lb035q02_get_modes()
150 return -ENOMEM; in lb035q02_get_modes()
155 connector->display_info.width_mm = lb035q02_mode.width_mm; in lb035q02_get_modes()
156 connector->display_info.height_mm = lb035q02_mode.height_mm; in lb035q02_get_modes()
163 connector->display_info.bus_flags = DRM_BUS_FLAG_DE_HIGH in lb035q02_get_modes()
181 lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL); in lb035q02_probe()
183 return -ENOMEM; in lb035q02_probe()
186 lcd->spi = spi; in lb035q02_probe()
188 lcd->enable_gpio = devm_gpiod_get(&spi->dev, "enable", GPIOD_OUT_LOW); in lb035q02_probe()
189 if (IS_ERR(lcd->enable_gpio)) { in lb035q02_probe()
190 dev_err(&spi->dev, "failed to parse enable gpio\n"); in lb035q02_probe()
191 return PTR_ERR(lcd->enable_gpio); in lb035q02_probe()
198 drm_panel_init(&lcd->panel, &lcd->spi->dev, &lb035q02_funcs, in lb035q02_probe()
201 drm_panel_add(&lcd->panel); in lb035q02_probe()
210 drm_panel_remove(&lcd->panel); in lb035q02_remove()
211 drm_panel_disable(&lcd->panel); in lb035q02_remove()
233 .name = "panel-lg-lb035q02",
241 MODULE_DESCRIPTION("LG.Philips LB035Q02 LCD Panel driver");