armbian_build/patch/kernel/archive/sunxi-6.1/patches.armbian/drv-spi-spidev-Add-armbian-spi-dev-compatible.patch
The-going b7ab460983
Move sunxi legacy to 5.15.y, current to 6.1.y and edge to 6.2.y (#4890)
* sunxi-6.1: rebase to v6.1.14, reexport patches megous

* sunxi-6.1: rename fixes patches

* sunxi-6.1: reexport armbian patches

* sunxi-6.1: fix the series.conf file to the current state

* sunxi-6.1: switch edge to v6.1.14

* Adjust sunxi to 5.15 / 6.1 / 6.2

- change configs
- adjust broken patches
- disable patch that only changes /readme.md and it has issues

---------

Co-authored-by: Igor Pečovnik <igor@armbian.com>
2023-03-03 22:13:49 +01:00

38 lines
1.3 KiB
Diff

From aa4f86d35a4937aa3fb40e6133ba75db533dbdf6 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 041/158] 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 71c3db60e..4593051f4 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -692,6 +692,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" },
@@ -714,10 +715,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