Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: spi: remove deprecated functions #73730

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/develop/api/terminology.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Explanation
Be aware that **async** is orthogonal to context-switching. Some APIs
may provide completion information through a callback, but may suspend
while waiting for the resource necessary to initiate the operation; an
example is :c:func:`spi_transceive_async`.
example is :c:func:`spi_transceive_signal`.

If a function is both **no-wait** and **async** then selecting the
no-wait path only guarantees that the function will not sleep. It does
Expand Down
3 changes: 3 additions & 0 deletions doc/releases/release-notes-3.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ Deprecated in this release
* SPI

* Deprecated :c:func:`spi_is_ready` API function has been removed.
* Deprecated :c:func:`spi_transceive_async` API function has been removed.
* Deprecated :c:func:`spi_read_async` API function has been removed.
* Deprecated :c:func:`spi_write_async` API function has been removed.

Architectures
*************
Expand Down
44 changes: 2 additions & 42 deletions include/zephyr/drivers/spi.h
kartben marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ typedef void (*spi_callback_t)(const struct device *dev, int result, void *data)
/**
* @typedef spi_api_io
* @brief Callback API for asynchronous I/O
* See spi_transceive_async() for argument descriptions
* See spi_transceive_signal() for argument descriptions
*/
typedef int (*spi_api_io_async)(const struct device *dev,
const struct spi_config *config,
Expand Down Expand Up @@ -932,20 +932,6 @@ static inline int spi_transceive_signal(const struct device *dev,
return api->transceive_async(dev, config, tx_bufs, rx_bufs, cb, sig);
}

/**
* @brief Alias for spi_transceive_signal for backwards compatibility
*
* @deprecated Use @ref spi_transceive_signal instead.
*/
__deprecated static inline int spi_transceive_async(const struct device *dev,
const struct spi_config *config,
const struct spi_buf_set *tx_bufs,
const struct spi_buf_set *rx_bufs,
struct k_poll_signal *sig)
{
return spi_transceive_signal(dev, config, tx_bufs, rx_bufs, sig);
}

/**
* @brief Read the specified amount of data from the SPI driver.
*
Expand Down Expand Up @@ -978,25 +964,12 @@ static inline int spi_read_signal(const struct device *dev,
return spi_transceive_signal(dev, config, NULL, rx_bufs, sig);
}

/**
* @brief Alias for spi_read_signal for backwards compatibility
*
* @deprecated Use @ref spi_read_signal instead.
*/
__deprecated static inline int spi_read_async(const struct device *dev,
const struct spi_config *config,
const struct spi_buf_set *rx_bufs,
struct k_poll_signal *sig)
{
return spi_read_signal(dev, config, rx_bufs, sig);
}

/**
* @brief Write the specified amount of data from the SPI driver.
*
* @note This function is asynchronous.
*
* @note This function is a helper function calling spi_transceive_async.
* @note This function is a helper function calling spi_transceive_signal.
*
* @note This function is available only if @kconfig{CONFIG_SPI_ASYNC}
* and @kconfig{CONFIG_POLL} are selected.
Expand All @@ -1022,19 +995,6 @@ static inline int spi_write_signal(const struct device *dev,
return spi_transceive_signal(dev, config, tx_bufs, NULL, sig);
}

/**
* @brief Alias for spi_write_signal for backwards compatibility
*
* @deprecated Use @ref spi_write_signal instead.
*/
__deprecated static inline int spi_write_async(const struct device *dev,
const struct spi_config *config,
const struct spi_buf_set *tx_bufs,
struct k_poll_signal *sig)
{
return spi_write_signal(dev, config, tx_bufs, sig);
}

#endif /* CONFIG_POLL */

#endif /* CONFIG_SPI_ASYNC */
Expand Down
Loading