lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240627-mikrobus-scratch-spi-v5-5-9e6c148bf5f0@beagleboard.org>
Date: Thu, 27 Jun 2024 21:56:15 +0530
From: Ayush Singh <ayush@...gleboard.org>
To: Mark Brown <broonie@...nel.org>, 
 Vaishnav M A <vaishnav@...gleboard.org>, Rob Herring <robh@...nel.org>, 
 Krzysztof Kozlowski <krzk+dt@...nel.org>, 
 Conor Dooley <conor+dt@...nel.org>, Derek Kiernan <derek.kiernan@....com>, 
 Dragan Cvetic <dragan.cvetic@....com>, Arnd Bergmann <arnd@...db.de>, 
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Nishanth Menon <nm@...com>, 
 Vignesh Raghavendra <vigneshr@...com>, Tero Kristo <kristo@...nel.org>, 
 Michael Walle <mwalle@...nel.org>, Andrew Lunn <andrew@...n.ch>, 
 jkridner@...gleboard.org, robertcnelson@...gleboard.org
Cc: linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org, 
 devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
 Ayush Singh <ayush@...gleboard.org>
Subject: [PATCH v5 5/7] spi: Make of_register_spi_device() available

DONOTMERGE

Export of_register_spi_device() from SPI Core to allow registering SPI
devices from device tree when the device node is not a child node of spi
controller.

Signed-off-by: Ayush Singh <ayush@...gleboard.org>
---
 drivers/spi/spi.c       | 3 ++-
 include/linux/spi/spi.h | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 565b2e2dd5b9..8cd4d61958a2 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2566,7 +2566,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi,
 	return 0;
 }
 
-static struct spi_device *
+struct spi_device *
 of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc)
 {
 	struct spi_device *spi;
@@ -2612,6 +2612,7 @@ of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc)
 	spi_dev_put(spi);
 	return ERR_PTR(rc);
 }
+EXPORT_SYMBOL_GPL(of_register_spi_device);
 
 /**
  * of_register_spi_devices() - Register child devices onto the SPI bus
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 58e692226475..861b1cb4cca6 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -1686,6 +1686,9 @@ spi_transfer_is_last(struct spi_controller *ctlr, struct spi_transfer *xfer)
 
 #if IS_ENABLED(CONFIG_OF)
 struct spi_controller *of_find_spi_controller_by_node(struct device_node *node);
+
+struct spi_device *
+of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc);
 #endif
 
 #endif /* __LINUX_SPI_H */

-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ