Lines Matching full:lcd
32 static int nl8048_write(struct nl8048_panel *lcd, unsigned char addr, in nl8048_write() argument
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()
46 static int nl8048_init(struct nl8048_panel *lcd) in nl8048_init() argument
79 ret = nl8048_write(lcd, nl8048_init_seq[i].addr, in nl8048_init()
87 return nl8048_write(lcd, 2, 0x00); in nl8048_init()
92 struct nl8048_panel *lcd = to_nl8048_device(panel); in nl8048_disable() local
94 gpiod_set_value_cansleep(lcd->reset_gpio, 0); in nl8048_disable()
101 struct nl8048_panel *lcd = to_nl8048_device(panel); in nl8048_enable() local
103 gpiod_set_value_cansleep(lcd->reset_gpio, 1); in nl8048_enable()
154 struct nl8048_panel *lcd = dev_get_drvdata(dev); in nl8048_suspend() local
156 nl8048_write(lcd, 2, 0x01); in nl8048_suspend()
164 struct nl8048_panel *lcd = dev_get_drvdata(dev); in nl8048_resume() local
167 spi_setup(lcd->spi); in nl8048_resume()
168 nl8048_write(lcd, 2, 0x00); in nl8048_resume()
169 nl8048_init(lcd); in nl8048_resume()
178 struct nl8048_panel *lcd; in nl8048_probe() local
181 lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL); in nl8048_probe()
182 if (!lcd) in nl8048_probe()
185 spi_set_drvdata(spi, lcd); 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()
191 return PTR_ERR(lcd->reset_gpio); in nl8048_probe()
203 ret = nl8048_init(lcd); 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()
217 struct nl8048_panel *lcd = spi_get_drvdata(spi); in nl8048_remove() local
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()