armbian_build/patch/kernel/archive/sunxi-5.19/patches.armbian/drv-spi-spidev-Add-armbian-spi-dev-compatible.patch
The-going 97c6e5e9dd
sunxi-5.19: Initial state for megous patches (#4048)
* sunxi-5.19: Initial state for megous patches

* Add the ability to do 5.19

* Move to 5.19

- tested both
- removed broken Opi Zero xradio driver https://armbian.atlassian.net/browse/AR-1280

* sunxi-5.19: fix tag for switch

* sunxi-5.19: Initial state for armbian patches

* sunxi-5.19: Add armbian patches to series.conf file

* sanxi-5.19: Add other 2 patches

* sunxi-5.19: Limit to use the 'wireless/xradio' module

Limit the kernel version to less than 5.19 to use
the 'wireless/xradio' module

Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com>
2022-08-05 21:23:49 +03:00

38 lines
1.3 KiB
Diff

From 069951694fd99fe8faa72a9425b690f5a76f2580 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: [PATCH 055/170] 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 b2775d82d..5b36dd91c 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -683,6 +683,7 @@ static const struct file_operations spidev_fops = {
static struct class *spidev_class;
static const struct spi_device_id spidev_spi_ids[] = {
+ { .name = "spi-dev" },
{ .name = "dh2228fv" },
{ .name = "ltc2488" },
{ .name = "sx1301" },
@@ -705,10 +706,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 = "rohm,dh2228fv", .data = &spidev_of_check },
{ .compatible = "lineartechnology,ltc2488", .data = &spidev_of_check },
{ .compatible = "semtech,sx1301", .data = &spidev_of_check },
--
2.35.3