Commit 7046c903 authored by Bartosz Bilas's avatar Bartosz Bilas Committed by Anas Nashif
Browse files

drivers: spi: remove deprecated spi_is_ready function

`spi_is_ready` is depreceted since v3.3 so let's remove it.

Signed-off-by: default avatarBartosz Bilas <bartosz.bilas@hotmail.com>
parent 69065fa3
Loading
Loading
Loading
Loading
+4 −0
Changes for doc/releases/release-notes-3.7.rst: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -60,6 +60,10 @@ Deprecated in this release
   Application developer will now need to set the advertised name themselves by updating the advertising data
   or the scan response data.

 * SPI

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

Architectures
*************

+1 −25
Changes for include/zephyr/drivers/spi.h: 1 added line, 25 removed lines.
Original line number Diff line number Diff line
@@ -389,9 +389,8 @@ struct spi_dt_spec {
 * data from the devicetree.
 *
 * Important: multiple fields are automatically constructed by this macro
 * which must be checked before use. @ref spi_is_ready performs the required
 * which must be checked before use. @ref spi_is_ready_dt performs the required
 * @ref device_is_ready checks.
 * @deprecated Use @ref spi_is_ready_dt instead.
 *
 * @param node_id Devicetree node identifier for the SPI device whose
 *                struct spi_dt_spec to create an initializer for
@@ -683,29 +682,6 @@ static inline bool spi_cs_is_gpio_dt(const struct spi_dt_spec *spec)
	return spi_cs_is_gpio(&spec->config);
}

/**
 * @brief Validate that SPI bus is ready.
 *
 * @param spec SPI specification from devicetree
 *
 * @retval true if the SPI bus is ready for use.
 * @retval false if the SPI bus is not ready for use.
 */
__deprecated
static inline bool spi_is_ready(const struct spi_dt_spec *spec)
{
	/* Validate bus is ready */
	if (!device_is_ready(spec->bus)) {
		return false;
	}
	/* Validate CS gpio port is ready, if it is used */
	if (spi_cs_is_gpio_dt(spec) &&
	    !gpio_is_ready_dt(&spec->config.cs.gpio)) {
		return false;
	}
	return true;
}

/**
 * @brief Validate that SPI bus (and CS gpio if defined) is ready.
 *