diff options
| author | Takashi Iwai <tiwai@suse.de> | 2022-03-21 18:18:26 +0300 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2022-03-21 18:18:34 +0300 |
| commit | a6d4b685026cfe9837b07532db5d1e1681b5d129 (patch) | |
| tree | da872c8775a1ac87dc8122b1e1f9af19179dcb38 /include/linux | |
| parent | efb6402c3c4a7c26d97c92d70186424097b6e366 (diff) | |
| parent | 8a580a26760cb14535c160613fe9cd0e4dc6f5c6 (diff) | |
| download | linux-a6d4b685026cfe9837b07532db5d1e1681b5d129.tar.xz | |
Merge branch 'for-next' into for-linus
Pull 5.18 development branch
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/spi/spi.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 7ab3fed7b804..394b4241d989 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,13 @@ 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, + int index); +int acpi_spi_count_resources(struct acpi_device *adev); +#endif + /* * SPI resource management while processing a SPI message */ @@ -1452,8 +1460,20 @@ spi_register_board_info(struct spi_board_info const *info, unsigned n) * use spi_new_device() to describe each device. You can also call * spi_unregister_device() to start making that device vanish, but * normally that would be handled by spi_unregister_controller(). + * + * You can also use spi_alloc_device() and spi_add_device() to use a two + * stage registration sequence for each spi_device. This gives the caller + * some more control over the spi_device structure before it is registered, + * but requires that caller to initialize fields that would otherwise + * be defined using the board info. */ extern struct spi_device * +spi_alloc_device(struct spi_controller *ctlr); + +extern int +spi_add_device(struct spi_device *spi); + +extern struct spi_device * spi_new_device(struct spi_controller *, struct spi_board_info *); extern void spi_unregister_device(struct spi_device *spi); |
