mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
ODROID-XU4: add odroid32 spi lcd driver.(CS-GPIO Error fix)
Change-Id: I697ab4aa709637bb2bbccab5768798db639292c9
This commit is contained in:
4
drivers/spi/spidev.c
Normal file → Executable file
4
drivers/spi/spidev.c
Normal file → Executable file
@@ -812,6 +812,10 @@ static int spidev_remove(struct spi_device *spi)
|
||||
/* make sure ops on existing fds can abort cleanly */
|
||||
spin_lock_irq(&spidev->spi_lock);
|
||||
spidev->spi = NULL;
|
||||
|
||||
if(spi->master->cleanup)
|
||||
spi->master->cleanup(spi);
|
||||
|
||||
spin_unlock_irq(&spidev->spi_lock);
|
||||
|
||||
/* prevent new opens */
|
||||
|
||||
24
drivers/staging/fbtft/fbtft_device.c
Normal file → Executable file
24
drivers/staging/fbtft/fbtft_device.c
Normal file → Executable file
@@ -867,6 +867,25 @@ static struct fbtft_device_display displays[] = {
|
||||
},
|
||||
}
|
||||
}
|
||||
}, {
|
||||
.name = "odroid32",
|
||||
.spi = &(struct spi_board_info) {
|
||||
.modalias = "fb_ili9340",
|
||||
.max_speed_hz = 32000000,
|
||||
.mode = SPI_MODE_0,
|
||||
.controller_data = &hktft9340_controller_data,
|
||||
.platform_data = &(struct fbtft_platform_data) {
|
||||
.display = {
|
||||
.buswidth = 8,
|
||||
},
|
||||
.bgr = true,
|
||||
.gpios = (const struct fbtft_gpio []) {
|
||||
{ "reset", 21 },
|
||||
{ "dc", 22 },
|
||||
{},
|
||||
},
|
||||
}
|
||||
}
|
||||
}, {
|
||||
.name = "piscreen",
|
||||
.spi = &(struct spi_board_info) {
|
||||
@@ -1606,6 +1625,11 @@ static int __init fbtft_device_init(void)
|
||||
static void __exit fbtft_device_exit(void)
|
||||
{
|
||||
if (spi_device) {
|
||||
if (spi_device->controller_data) {
|
||||
struct s3c64xx_spi_csinfo *cs = spi_device->controller_data;
|
||||
if (cs->line)
|
||||
gpio_free(cs->line);
|
||||
}
|
||||
device_del(&spi_device->dev);
|
||||
kfree(spi_device);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user