Skip to content

Commit d52563c

Browse files
author
Tomasz Bursztyka
committed
spi: Remove SPI legacy API
No drivers nor samples are using it anymore. Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent a0a04af commit d52563c

File tree

7 files changed

+0
-258
lines changed

7 files changed

+0
-258
lines changed

drivers/spi/Kconfig

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ menuconfig SPI
1717

1818
if SPI
1919

20-
config SPI_LEGACY_API
21-
bool "Use legacy SPI API (soon to be deprecated)"
22-
default n
23-
help
24-
Driver and user API implements/use the legacy SPI API.
25-
If unselected, the new API will be used (default).
26-
2720
config SPI_ASYNC
2821
bool "Enable Asynchronous call support"
2922
default n
@@ -64,11 +57,6 @@ config SYS_LOG_SPI_LEVEL
6457

6558
- 4 DEBUG, write SYS_LOG_DBG in addition to previous levels
6659

67-
config SPI_CS_GPIO
68-
bool "SPI port CS pin is controlled via a GPIO port"
69-
depends on GPIO && SPI_LEGACY_API
70-
default n
71-
7260
config SPI_0
7361
bool "SPI port 0"
7462
default n
@@ -96,14 +84,6 @@ config SPI_0_OP_MODES
9684
config SPI_0_IRQ_PRI
9785
int "Port 0 interrupt priority"
9886

99-
config SPI_0_DEFAULT_CFG
100-
hex "Port 0 default configuration"
101-
default 0x80
102-
103-
config SPI_0_DEFAULT_BAUD_RATE
104-
int "Port 0 default baud rate"
105-
default 500000
106-
10787
config SPI_0_CS_GPIO_PORT
10888
string "The GPIO port which is used to control CS"
10989
depends on SPI_CS_GPIO
@@ -144,14 +124,6 @@ config SPI_1_IRQ_PRI
144124
int "Port 0 interrupt priority"
145125
depends on !HAS_DTS_SPI
146126

147-
config SPI_1_DEFAULT_CFG
148-
hex "Port 1 default configuration"
149-
default 0x80
150-
151-
config SPI_1_DEFAULT_BAUD_RATE
152-
int "Port 1 default baud rate"
153-
default 500000
154-
155127
config SPI_1_CS_GPIO_PORT
156128
string "The GPIO port which is used to control CS"
157129
depends on SPI_CS_GPIO
@@ -192,14 +164,6 @@ config SPI_2_IRQ_PRI
192164
int "Port 2 interrupt priority"
193165
depends on !HAS_DTS_SPI
194166

195-
config SPI_2_DEFAULT_CFG
196-
hex "Port 2 default configuration"
197-
default 0x80
198-
199-
config SPI_2_DEFAULT_BAUD_RATE
200-
int "Port 2 default baud rate"
201-
default 500000
202-
203167
config SPI_2_CS_GPIO_PORT
204168
string "The GPIO port which is used to control CS"
205169
depends on SPI_CS_GPIO

drivers/spi/spi_handlers.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <spi.h>
88
#include <syscall_handler.h>
99

10-
#ifndef CONFIG_SPI_LEGACY_API
1110
static void verify_spi_buf_array(const struct spi_buf *bufs, size_t len,
1211
int writable, void *ssf)
1312
{
@@ -75,4 +74,3 @@ _SYSCALL_HANDLER(spi_release, dev, config_p)
7574
_SYSCALL_OBJ(dev, K_OBJ_DRIVER_SPI);
7675
return _impl_spi_release((struct device *)dev, config);
7776
}
78-
#endif

drivers/spi/spi_sam0.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
#include <soc.h>
1515
#include <board.h>
1616

17-
#if defined(CONFIG_SPI_LEGACY_API)
18-
#error "This driver does not support the SPI legacy API."
19-
#endif
20-
2117
/* Device constant configuration parameters */
2218
struct spi_sam0_config {
2319
SercomSpi *regs;

include/spi.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
* @brief Public API for SPI drivers and applications
1010
*/
1111

12-
#if defined(CONFIG_SPI_LEGACY_API)
13-
14-
/*
15-
* This is the default, and will be the way until the new API below
16-
* will be enforced everywhere.
17-
*/
18-
#include <spi_legacy.h>
19-
20-
#else
21-
2212
#ifndef __SPI_H__
2313
#define __SPI_H__
2414

@@ -427,4 +417,3 @@ static inline int _impl_spi_release(struct device *dev,
427417
#include <syscalls/spi.h>
428418

429419
#endif /* __SPI_H__ */
430-
#endif /* CONFIG_SPI_LEGACY_API */

include/spi_legacy.h

Lines changed: 0 additions & 203 deletions
This file was deleted.

samples/drivers/led_lpd8806/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ CONFIG_BOOT_BANNER=y
55
CONFIG_POLL=y
66

77
CONFIG_SPI=y
8-
# CONFIG_SPI_LEGACY_API is not set
98

109
CONFIG_LED_STRIP=y
1110
CONFIG_LPD880X_STRIP=y

samples/drivers/led_ws2812/boards/96b_carbon.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
CONFIG_POLL=y
22
CONFIG_SPI=y
3-
# CONFIG_SPI_LEGACY_API is not set
43

54
CONFIG_WS2812_STRIP=y
65
CONFIG_WS2812_STRIP_SPI_DEV_NAME="ws2812_spi"

0 commit comments

Comments
 (0)