mirror of https://github.com/armbian/build.git
38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: The-going <48602507+The-going@users.noreply.github.com>
|
|
Date: Wed, 2 Feb 2022 11:56:51 +0300
|
|
Subject: drv:spi:spidev Add armbian spi-dev compatible
|
|
|
|
---
|
|
drivers/spi/spidev.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
|
|
index 58ae4304fdab..c4c73a61a571 100644
|
|
--- a/drivers/spi/spidev.c
|
|
+++ b/drivers/spi/spidev.c
|
|
@@ -703,6 +703,7 @@ static const struct class spidev_class = {
|
|
* spidev_dt_ids array below. Both arrays are kept in the same ordering.
|
|
*/
|
|
static const struct spi_device_id spidev_spi_ids[] = {
|
|
+ { .name = /* armbian */ "spi-dev" },
|
|
{ .name = /* cisco */ "spi-petra" },
|
|
{ .name = /* dh */ "dhcom-board" },
|
|
{ .name = /* elgin */ "jg10309-01" },
|
|
@@ -730,10 +731,12 @@ static int spidev_of_check(struct device *dev)
|
|
return 0;
|
|
|
|
dev_err(dev, "spidev listed directly in DT is not supported\n");
|
|
+ dev_info(dev, "Use a compatible alias string like spi-dev in DT\n");
|
|
return -EINVAL;
|
|
}
|
|
|
|
static const struct of_device_id spidev_dt_ids[] = {
|
|
+ { .compatible = "armbian,spi-dev", .data = &spidev_of_check },
|
|
{ .compatible = "cisco,spi-petra", .data = &spidev_of_check },
|
|
{ .compatible = "dh,dhcom-board", .data = &spidev_of_check },
|
|
{ .compatible = "elgin,jg10309-01", .data = &spidev_of_check },
|
|
--
|
|
Armbian
|
|
|