diff options
author | Stefan Binding <sbinding@opensource.cirrus.com> | 2022-01-21 18:24:24 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-02-01 18:38:46 +0100 |
commit | 000bee0ed70af79e610444096fb453430220960f (patch) | |
tree | 6884347260c04f07db2881cd1fb524043171f46f /include | |
parent | spi: Make spi_alloc_device and spi_add_device public again (diff) | |
download | linux-000bee0ed70af79e610444096fb453430220960f.tar.xz linux-000bee0ed70af79e610444096fb453430220960f.zip |
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 */ |