Skip to content

Commit 7046c90

Browse files
bbilasnashif
authored andcommitted
drivers: spi: remove deprecated spi_is_ready function
`spi_is_ready` is depreceted since v3.3 so let's remove it. Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
1 parent 69065fa commit 7046c90

File tree

2 files changed

+5
-25
lines changed

2 files changed

+5
-25
lines changed

doc/releases/release-notes-3.7.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ Deprecated in this release
6060
Application developer will now need to set the advertised name themselves by updating the advertising data
6161
or the scan response data.
6262

63+
* SPI
64+
65+
* Deprecated :c:func:`spi_is_ready` API function has been removed.
66+
6367
Architectures
6468
*************
6569

include/zephyr/drivers/spi.h

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,8 @@ struct spi_dt_spec {
389389
* data from the devicetree.
390390
*
391391
* Important: multiple fields are automatically constructed by this macro
392-
* which must be checked before use. @ref spi_is_ready performs the required
392+
* which must be checked before use. @ref spi_is_ready_dt performs the required
393393
* @ref device_is_ready checks.
394-
* @deprecated Use @ref spi_is_ready_dt instead.
395394
*
396395
* @param node_id Devicetree node identifier for the SPI device whose
397396
* 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)
683682
return spi_cs_is_gpio(&spec->config);
684683
}
685684

686-
/**
687-
* @brief Validate that SPI bus is ready.
688-
*
689-
* @param spec SPI specification from devicetree
690-
*
691-
* @retval true if the SPI bus is ready for use.
692-
* @retval false if the SPI bus is not ready for use.
693-
*/
694-
__deprecated
695-
static inline bool spi_is_ready(const struct spi_dt_spec *spec)
696-
{
697-
/* Validate bus is ready */
698-
if (!device_is_ready(spec->bus)) {
699-
return false;
700-
}
701-
/* Validate CS gpio port is ready, if it is used */
702-
if (spi_cs_is_gpio_dt(spec) &&
703-
!gpio_is_ready_dt(&spec->config.cs.gpio)) {
704-
return false;
705-
}
706-
return true;
707-
}
708-
709685
/**
710686
* @brief Validate that SPI bus (and CS gpio if defined) is ready.
711687
*

0 commit comments

Comments
 (0)