Lines Matching refs:spi
43 struct spi_device *spi; member
57 static int lb035q02_write_reg(struct spi_device *spi, u8 reg, u16 val) in lb035q02_write_reg() argument
85 return spi_sync(spi, &msg); in lb035q02_write_reg()
88 static void init_lb035q02_panel(struct spi_device *spi) in init_lb035q02_panel() argument
91 lb035q02_write_reg(spi, 0x01, 0x6300); in init_lb035q02_panel()
92 lb035q02_write_reg(spi, 0x02, 0x0200); in init_lb035q02_panel()
93 lb035q02_write_reg(spi, 0x03, 0x0177); in init_lb035q02_panel()
94 lb035q02_write_reg(spi, 0x04, 0x04c7); in init_lb035q02_panel()
95 lb035q02_write_reg(spi, 0x05, 0xffc0); in init_lb035q02_panel()
96 lb035q02_write_reg(spi, 0x06, 0xe806); in init_lb035q02_panel()
97 lb035q02_write_reg(spi, 0x0a, 0x4008); in init_lb035q02_panel()
98 lb035q02_write_reg(spi, 0x0b, 0x0000); in init_lb035q02_panel()
99 lb035q02_write_reg(spi, 0x0d, 0x0030); in init_lb035q02_panel()
100 lb035q02_write_reg(spi, 0x0e, 0x2800); in init_lb035q02_panel()
101 lb035q02_write_reg(spi, 0x0f, 0x0000); in init_lb035q02_panel()
102 lb035q02_write_reg(spi, 0x16, 0x9f80); in init_lb035q02_panel()
103 lb035q02_write_reg(spi, 0x17, 0x0a0f); in init_lb035q02_panel()
104 lb035q02_write_reg(spi, 0x1e, 0x00c1); in init_lb035q02_panel()
105 lb035q02_write_reg(spi, 0x30, 0x0300); in init_lb035q02_panel()
106 lb035q02_write_reg(spi, 0x31, 0x0007); in init_lb035q02_panel()
107 lb035q02_write_reg(spi, 0x32, 0x0000); in init_lb035q02_panel()
108 lb035q02_write_reg(spi, 0x33, 0x0000); in init_lb035q02_panel()
109 lb035q02_write_reg(spi, 0x34, 0x0707); in init_lb035q02_panel()
110 lb035q02_write_reg(spi, 0x35, 0x0004); in init_lb035q02_panel()
111 lb035q02_write_reg(spi, 0x36, 0x0302); in init_lb035q02_panel()
112 lb035q02_write_reg(spi, 0x37, 0x0202); in init_lb035q02_panel()
113 lb035q02_write_reg(spi, 0x3a, 0x0a0d); in init_lb035q02_panel()
114 lb035q02_write_reg(spi, 0x3b, 0x0806); in init_lb035q02_panel()
130 init_lb035q02_panel(ddata->spi); in lb035q02_connect()
239 static int lb035q02_probe_of(struct spi_device *spi) in lb035q02_probe_of() argument
241 struct device_node *node = spi->dev.of_node; in lb035q02_probe_of()
242 struct panel_drv_data *ddata = spi_get_drvdata(spi); in lb035q02_probe_of()
246 gpio = devm_gpiod_get(&spi->dev, "enable", GPIOD_OUT_LOW); in lb035q02_probe_of()
248 dev_err(&spi->dev, "failed to parse enable gpio\n"); in lb035q02_probe_of()
258 dev_err(&spi->dev, "failed to find video source\n"); in lb035q02_probe_of()
267 static int lb035q02_panel_spi_probe(struct spi_device *spi) in lb035q02_panel_spi_probe() argument
273 if (!spi->dev.of_node) in lb035q02_panel_spi_probe()
276 ddata = devm_kzalloc(&spi->dev, sizeof(*ddata), GFP_KERNEL); in lb035q02_panel_spi_probe()
280 spi_set_drvdata(spi, ddata); in lb035q02_panel_spi_probe()
282 ddata->spi = spi; in lb035q02_panel_spi_probe()
284 r = lb035q02_probe_of(spi); in lb035q02_panel_spi_probe()
289 r = devm_gpio_request_one(&spi->dev, ddata->backlight_gpio, in lb035q02_panel_spi_probe()
298 dssdev->dev = &spi->dev; in lb035q02_panel_spi_probe()
307 dev_err(&spi->dev, "Failed to register panel\n"); in lb035q02_panel_spi_probe()
319 static int lb035q02_panel_spi_remove(struct spi_device *spi) in lb035q02_panel_spi_remove() argument
321 struct panel_drv_data *ddata = spi_get_drvdata(spi); in lb035q02_panel_spi_remove()