Lines Matching +full:3 +full:- +full:inch
2 * Copyright © 2016-2017 Broadcom
8 * Portions of this file (derived from panel-simple.c) are:
25 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
36 * TC358762XBG DSI-DPI bridge, and an I2C-connected Atmel ATTINY88-MUR
47 #include <linux/media-bus-format.h>
58 #define RPI_DSI_DRIVER_NAME "rpi-ts-dsi"
63 REG_PORTA, /* BIT(2) for horizontal flip, BIT(3) for vertical flip */
83 /* DSI D-PHY Layer Registers */
161 /* DBI-B Host Registers */
200 * plugged in and clock re-computed from that.
221 return i2c_smbus_read_byte_data(ts->i2c, reg); in rpi_touchscreen_i2c_read()
229 ret = i2c_smbus_write_byte_data(ts->i2c, reg, val); in rpi_touchscreen_i2c_write()
231 dev_err(&ts->i2c->dev, "I2C write failed: %d\n", ret); in rpi_touchscreen_i2c_write()
245 mipi_dsi_generic_write(ts->dsi, msg, sizeof(msg)); in rpi_touchscreen_write()
327 mode = drm_mode_duplicate(connector->dev, m); in rpi_touchscreen_get_modes()
329 dev_err(panel->dev, "failed to add mode %ux%u@%u\n", in rpi_touchscreen_get_modes()
330 m->hdisplay, m->vdisplay, in rpi_touchscreen_get_modes()
335 mode->type |= DRM_MODE_TYPE_DRIVER; in rpi_touchscreen_get_modes()
338 mode->type |= DRM_MODE_TYPE_PREFERRED; in rpi_touchscreen_get_modes()
346 connector->display_info.bpc = 8; in rpi_touchscreen_get_modes()
347 connector->display_info.width_mm = 154; in rpi_touchscreen_get_modes()
348 connector->display_info.height_mm = 86; in rpi_touchscreen_get_modes()
349 drm_display_info_set_bus_formats(&connector->display_info, in rpi_touchscreen_get_modes()
365 struct device *dev = &i2c->dev; in rpi_touchscreen_probe()
378 return -ENOMEM; in rpi_touchscreen_probe()
382 ts->i2c = i2c; in rpi_touchscreen_probe()
387 return -ENODEV; in rpi_touchscreen_probe()
396 return -ENODEV; in rpi_touchscreen_probe()
403 endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); in rpi_touchscreen_probe()
405 return -ENODEV; in rpi_touchscreen_probe()
415 return -EPROBE_DEFER; in rpi_touchscreen_probe()
424 ts->dsi = mipi_dsi_device_register_full(host, &info); in rpi_touchscreen_probe()
425 if (IS_ERR(ts->dsi)) { in rpi_touchscreen_probe()
427 PTR_ERR(ts->dsi)); in rpi_touchscreen_probe()
428 return PTR_ERR(ts->dsi); in rpi_touchscreen_probe()
431 drm_panel_init(&ts->base, dev, &rpi_touchscreen_funcs, in rpi_touchscreen_probe()
437 drm_panel_add(&ts->base); in rpi_touchscreen_probe()
443 return -ENODEV; in rpi_touchscreen_probe()
450 mipi_dsi_detach(ts->dsi); in rpi_touchscreen_remove()
452 drm_panel_remove(&ts->base); in rpi_touchscreen_remove()
454 mipi_dsi_device_unregister(ts->dsi); in rpi_touchscreen_remove()
461 dsi->mode_flags = (MIPI_DSI_MODE_VIDEO | in rpi_touchscreen_dsi_probe()
464 dsi->format = MIPI_DSI_FMT_RGB888; in rpi_touchscreen_dsi_probe()
465 dsi->lanes = 1; in rpi_touchscreen_dsi_probe()
470 dev_err(&dsi->dev, "failed to attach dsi to host: %d\n", ret); in rpi_touchscreen_dsi_probe()
481 { .compatible = "raspberrypi,7inch-touchscreen-panel" },
510 MODULE_DESCRIPTION("Raspberry Pi 7-inch touchscreen driver");