Lines Matching +full:gpio +full:- +full:cfg
1 // SPDX-License-Identifier: GPL-2.0+
12 #include <linux/dma-buf.h>
13 #include <linux/gpio/consumer.h>
55 const struct st7735r_cfg *cfg; member
62 struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev); in st7735r_pipe_enable()
65 struct mipi_dbi *dbi = &dbidev->dbi; in st7735r_pipe_enable()
69 if (!drm_dev_enter(pipe->crtc.dev, &idx)) in st7735r_pipe_enable()
95 switch (dbidev->rotation) { in st7735r_pipe_enable()
110 if (priv->cfg->rgb) in st7735r_pipe_enable()
167 { .compatible = "jianda,jd-t18003-t01", .data = &jd_t18003_t01_cfg },
174 { "jd-t18003-t01", (uintptr_t)&jd_t18003_t01_cfg },
182 struct device *dev = &spi->dev; in st7735r_probe()
183 const struct st7735r_cfg *cfg; in st7735r_probe() local
192 cfg = device_get_match_data(&spi->dev); in st7735r_probe()
193 if (!cfg) in st7735r_probe()
194 cfg = (void *)spi_get_device_id(spi)->driver_data; in st7735r_probe()
201 dbidev = &priv->dbidev; in st7735r_probe()
202 priv->cfg = cfg; in st7735r_probe()
204 dbi = &dbidev->dbi; in st7735r_probe()
205 drm = &dbidev->drm; in st7735r_probe()
207 dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in st7735r_probe()
208 if (IS_ERR(dbi->reset)) in st7735r_probe()
209 return dev_err_probe(dev, PTR_ERR(dbi->reset), "Failed to get GPIO 'reset'\n"); in st7735r_probe()
213 return dev_err_probe(dev, PTR_ERR(dc), "Failed to get GPIO 'dc'\n"); in st7735r_probe()
215 dbidev->backlight = devm_of_find_backlight(dev); in st7735r_probe()
216 if (IS_ERR(dbidev->backlight)) in st7735r_probe()
217 return PTR_ERR(dbidev->backlight); in st7735r_probe()
225 if (cfg->write_only) in st7735r_probe()
226 dbi->read_commands = NULL; in st7735r_probe()
228 dbidev->left_offset = cfg->left_offset; in st7735r_probe()
229 dbidev->top_offset = cfg->top_offset; in st7735r_probe()
231 ret = mipi_dbi_dev_init(dbidev, &st7735r_pipe_funcs, &cfg->mode, in st7735r_probe()