Lines Matching +full:spi +full:- +full:compatible

1 // SPDX-License-Identifier: GPL-2.0-only
3 * DRM driver for Solomon SSD13xx OLED displays (SPI bus)
8 #include <linux/spi/spi.h>
13 #define DRIVER_NAME "ssd130x-spi"
14 #define DRIVER_DESC "DRM driver for Solomon SSD13xx OLED displays (SPI)"
17 struct spi_device *spi; member
23 * but toggling the Data/Command control pin (D/C#). Since for 4-wire SPI
28 * and can be used by the ssd130x SPI driver to determine if the data sent
34 struct spi_device *spi = t->spi; in ssd130x_spi_write() local
38 gpiod_set_value_cansleep(t->dc, 0); in ssd130x_spi_write()
41 gpiod_set_value_cansleep(t->dc, 1); in ssd130x_spi_write()
43 /* Remove control byte since is not used in a 4-wire SPI interface */ in ssd130x_spi_write()
44 return spi_write(spi, reg + 1, count - 1); in ssd130x_spi_write()
51 return -EOPNOTSUPP; in ssd130x_spi_read()
62 static int ssd130x_spi_probe(struct spi_device *spi) in ssd130x_spi_probe() argument
68 struct device *dev = &spi->dev; in ssd130x_spi_probe()
77 return dev_err_probe(dev, -ENOMEM, in ssd130x_spi_probe()
78 "Failed to allocate SPI transport data\n"); in ssd130x_spi_probe()
80 t->spi = spi; in ssd130x_spi_probe()
81 t->dc = dc; in ssd130x_spi_probe()
91 spi_set_drvdata(spi, ssd130x); in ssd130x_spi_probe()
96 static void ssd130x_spi_remove(struct spi_device *spi) in ssd130x_spi_remove() argument
98 struct ssd130x_device *ssd130x = spi_get_drvdata(spi); in ssd130x_spi_remove()
103 static void ssd130x_spi_shutdown(struct spi_device *spi) in ssd130x_spi_shutdown() argument
105 struct ssd130x_device *ssd130x = spi_get_drvdata(spi); in ssd130x_spi_shutdown()
113 .compatible = "sinowealth,sh1106",
117 .compatible = "solomon,ssd1305",
121 .compatible = "solomon,ssd1306",
125 .compatible = "solomon,ssd1307",
129 .compatible = "solomon,ssd1309",
134 .compatible = "solomon,ssd1322",
138 .compatible = "solomon,ssd1325",
142 .compatible = "solomon,ssd1327",
147 .compatible = "solomon,ssd1331",
156 * The SPI core always reports a MODALIAS uevent of the form "spi:<dev>", even
160 * To workaround this issue, add a SPI device ID table. Even when this should
161 * not be needed for this driver to match the registered SPI devices.
178 MODULE_DEVICE_TABLE(spi, ssd130x_spi_table);