-
Notifications
You must be signed in to change notification settings - Fork 0
/
ili9488.c
70 lines (55 loc) · 1.63 KB
/
ili9488.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// SPDX-License-Identifier: GPL-2.0
#include <linux/spi/spi.h>
#include <linux/of.h>
#include <linux/acpi.h>
#include <linux/backlight.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/property.h>
#include <video/mipi_display.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_mipi_dbi.h>
#include <drm/drm_modeset_helper.h>
static int ili9488_probe(struct spi_device *spidev)
{
struct device *device;
const char *compatible_propery;
device = &spidev->dev;
device_property_read_string(device, "compatible", &compatible_propery);
dev_warn(device, "compatible: %s", compatible_propery);
return 0;
}
static void ili9488_remove(struct spi_device *spidev)
{
dev_warn(&spidev->dev, "ENTER ili9488_remove function driver bound to ACPI table");
return;
}
/* Device Tree Node to be compatible with */
static const struct of_device_id ili9488_of_match[] = {
{ .compatible = "garosa,garosanvkr25fawd" },
{},
};
MODULE_DEVICE_TABLE(of, ili9488_of_match);
static const struct spi_device_id ili9488_spi_devid[] = {
{ "garosanvkr25fawd", 0 },
{ }
};
MODULE_DEVICE_TABLE(spi, ili9488_spi_devid);
/* Driver declaration */
static struct spi_driver ili9488_spi_driver = {
.driver = {
.name = "ili9488",
.of_match_table = ili9488_of_match,
},
.id_table = ili9488_spi_devid,
.probe = ili9488_probe,
.remove = ili9488_remove,
};
module_spi_driver(ili9488_spi_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Vincent Davis ([email protected])");
MODULE_DESCRIPTION("Ilitek ILI9488 DRM driver");