diff options
author | Stefan Binding <sbinding@opensource.cirrus.com> | 2022-01-21 17:24:24 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-02-01 17:38:46 +0000 |
commit | 000bee0ed70af79e610444096fb453430220960f (patch) | |
tree | 6884347260c04f07db2881cd1fb524043171f46f /include | |
parent | e3dc1399506f894110667ee5c66a6a70f06f3348 (diff) | |
download | linux-000bee0ed70af79e610444096fb453430220960f.tar.bz2 |
spi: Create helper API to lookup ACPI info for spi device
This can then be used to find a spi resource inside an
ACPI node, and allocate a spi device.
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220121172431.6876-3-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/spi/spi.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 0346a3ff27fd..d159cef12f1a 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -16,6 +16,7 @@ #include <linux/gpio/consumer.h> #include <uapi/linux/spi/spi.h> +#include <linux/acpi.h> struct dma_chan; struct software_node; @@ -759,6 +760,11 @@ extern int devm_spi_register_controller(struct device *dev, struct spi_controller *ctlr); extern void spi_unregister_controller(struct spi_controller *ctlr); +#if IS_ENABLED(CONFIG_ACPI) +extern struct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr, + struct acpi_device *adev); +#endif + /* * SPI resource management while processing a SPI message */ |