mirror of
https://github.com/armbian/build.git
synced 2025-08-09 20:56:57 +02:00
* sunxi-5.17: Fix include uapi spi spidev module * add a compatible string alias "spi-dev" for spidev module * overlay: Change the string compatible "spidev" to "spi-dev" * remove unused patches * drv: spi: spidev: fix header uapi * Add alias "spi-dev" for module spidev Add the armbian alias "spi-dev" to load and initialize the spidev module from the device tree. * Move patches for orangepi3-lts to series * Remove unused patches
49 lines
1.6 KiB
Diff
49 lines
1.6 KiB
Diff
From 2653defc5e22ba86bd1d455eb01fc7edd2958473 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 08/50] drv:spi:spidev remove warnings
|
|
|
|
---
|
|
drivers/spi/spidev.c | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
|
|
index a5cceca8b..b8ac14a53 100644
|
|
--- a/drivers/spi/spidev.c
|
|
+++ b/drivers/spi/spidev.c
|
|
@@ -674,6 +674,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" },
|
|
@@ -688,6 +689,7 @@ MODULE_DEVICE_TABLE(spi, spidev_spi_ids);
|
|
|
|
#ifdef CONFIG_OF
|
|
static const struct of_device_id spidev_dt_ids[] = {
|
|
+ { .compatible = "armbian,spi-dev" },
|
|
{ .compatible = "rohm,dh2228fv" },
|
|
{ .compatible = "lineartechnology,ltc2488" },
|
|
{ .compatible = "semtech,sx1301" },
|
|
@@ -750,9 +752,14 @@ static int spidev_probe(struct spi_device *spi)
|
|
* spidev should never be referenced in DT without a specific
|
|
* compatible string, it is a Linux implementation thing
|
|
* rather than a description of the hardware.
|
|
+ * But people don't care and use DT overlays to activate SPIdev
|
|
+ * on demand. Armbian has added a compatible string alias "spi-dev"
|
|
+ * for this module.
|
|
*/
|
|
+
|
|
if (spi->dev.of_node && of_device_is_compatible(spi->dev.of_node, "spidev")) {
|
|
dev_err(&spi->dev, "spidev listed directly in DT is not supported\n");
|
|
+ dev_info(&spi->dev, "Use a compatible alias string like spi-dev in DT\n");
|
|
return -EINVAL;
|
|
}
|
|
|
|
--
|
|
2.34.1
|
|
|
|
|