diff options
author | Mark Brown <broonie@kernel.org> | 2018-10-21 17:00:17 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-10-21 17:00:17 +0100 |
commit | 7b9734dbc5b042bb8d8d930797f346b280057c4e (patch) | |
tree | c4b5f1c1600e1a5f6fc0b17a56a89682f127e6e2 /include | |
parent | 4b51c747e4a52175e63d125db8365b38b06f0343 (diff) | |
parent | 5f143af7501e7c435c56e181a655493edaa92509 (diff) |
Merge remote-tracking branch 'spi/topic/of' into spi-next
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/spi/spi.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 3de9958ca28b..6be77fa5ab90 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -1272,7 +1272,6 @@ spi_register_board_info(struct spi_board_info const *info, unsigned n) { return 0; } #endif - /* If you're hotplugging an adapter with devices (parport, usb, etc) * use spi_new_device() to describe each device. You can also call * spi_unregister_device() to start making that device vanish, but @@ -1304,6 +1303,22 @@ spi_transfer_is_last(struct spi_controller *ctlr, struct spi_transfer *xfer) return list_is_last(&xfer->transfer_list, &ctlr->cur_msg->transfers); } +/* OF support code */ +#if IS_ENABLED(CONFIG_OF) + +/* must call put_device() when done with returned spi_device device */ +extern struct spi_device * +of_find_spi_device_by_node(struct device_node *node); + +#else + +static inline struct spi_device * +of_find_spi_device_by_node(struct device_node *node) +{ + return NULL; +} + +#endif /* IS_ENABLED(CONFIG_OF) */ /* Compatibility layer */ #define spi_master spi_controller |