Lines Matching +full:2 +full:x32 +full:- +full:bit
1 // SPDX-License-Identifier: GPL-2.0+
32 #define ILI9486_MADCTL_BGR BIT(3)
33 #define ILI9486_MADCTL_MV BIT(5)
34 #define ILI9486_MADCTL_MX BIT(6)
35 #define ILI9486_MADCTL_MY BIT(7)
38 * The PiScreen/waveshare rpi-lcd-35 has a SPI to 16-bit parallel bus converter
39 * in front of the display controller. This means that 8-bit values have to be
40 * transferred as 16-bit.
45 struct spi_device *spi = mipi->spi; in waveshare_command()
53 return -ENOMEM; in waveshare_command()
56 * The displays are Raspberry Pi HATs and connected to the 8-bit only in waveshare_command()
57 * SPI controller, so 16-bit command and parameters need byte swapping in waveshare_command()
58 * before being transferred as 8-bit on the big endian SPI bus. in waveshare_command()
63 gpiod_set_value_cansleep(mipi->dc, 0); in waveshare_command()
64 speed_hz = mipi_dbi_spi_cmd_max_speed(spi, 2); in waveshare_command()
65 ret = mipi_dbi_spi_transfer(spi, speed_hz, 8, buf, 2); in waveshare_command()
69 /* 8-bit configuration data, not 16-bit pixel data */ in waveshare_command()
73 num *= 2; in waveshare_command()
78 gpiod_set_value_cansleep(mipi->dc, 1); in waveshare_command()
90 struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev); in waveshare_enable()
91 struct mipi_dbi *dbi = &dbidev->dbi; in waveshare_enable()
95 if (!drm_dev_enter(pipe->crtc.dev, &idx)) in waveshare_enable()
120 0x0F, 0x32, 0x2E, 0x0B, 0x0D, 0x05, 0x47, 0x75, in waveshare_enable()
123 0x0F, 0x32, 0x2E, 0x0B, 0x0D, 0x05, 0x47, 0x75, in waveshare_enable()
130 switch (dbidev->rotation) { in waveshare_enable()
178 { .compatible = "waveshare,rpi-lcd-35" },
192 struct device *dev = &spi->dev; in ili9486_probe()
205 dbi = &dbidev->dbi; in ili9486_probe()
206 drm = &dbidev->drm; in ili9486_probe()
208 dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in ili9486_probe()
209 if (IS_ERR(dbi->reset)) { in ili9486_probe()
211 return PTR_ERR(dbi->reset); in ili9486_probe()
220 dbidev->backlight = devm_of_find_backlight(dev); in ili9486_probe()
221 if (IS_ERR(dbidev->backlight)) in ili9486_probe()
222 return PTR_ERR(dbidev->backlight); in ili9486_probe()
230 dbi->command = waveshare_command; in ili9486_probe()
231 dbi->read_commands = NULL; in ili9486_probe()