Add DEVICE_DT_GET_COMMA helper macro to include/zephyr/device.h to
easily get a device pointer followed by a comma when expanding
devicetree foreach iterators like DT_FOREACH_STATUS_OKAY.
Update samples, drivers, and tests to use the common definition.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Assisted-by: Antigravity:gemini-1.5-pro
With CONFIG_UART_NS16550_DW8250_DW_APB, uart_ns16550_irq_tx_ready()
reports the transmitter ready whenever USR.TFNF is set, i.e. as soon as
the TX FIFO has room, while uart_ns16550_fifo_fill() writes up to
fifo_size bytes without checking how much room there actually is. When
the ISR runs with data left in the FIFO, the excess bytes are written to
a full FIFO and lost.
On the Silicon Labs SiWx917 (ulpuart, ns16550 with the DW8250 option)
this happens right after boot and about once per thousand fills under
load: the UART ISR is entered with no interrupt pending (IIR reads 0xC1)
while the FIFO still holds 15 of the 16 bytes of the previous fill, so
the fill loses up to 15 bytes. With the Bluetooth monitor in
interrupt-driven mode on that UART the stream had a truncated New Index
frame after every boot and lost 15-byte chunks every 1-2 seconds, while
the polled mode was unaffected.
Stop the DW8250 fill loop as soon as USR.TFNF clears, so that the driver
never writes more than the FIFO can take and returns the number of bytes
it actually accepted.
Fixes#117777
Assisted-by: Claude:claude-fable-5
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The controller reset faults if it reaches the peripheral before
the bus clock enable has taken effect, and whether it does
depends on unrelated code layout. Poll the clock state before
issuing the reset and fail the setup if it never comes up.
Assisted-by: Claude:opus-5
Signed-off-by: Jonathan Beri <jmberi@gmail.com>
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The driver always selected the XTAL reference, which only
exists on v3.0 and newer silicon. On v1.3 the clock source
switch falls through to abort() and the boot panics before any
output. Select the legacy PLL_F20M source and its 20 MHz rate
when the minimum supported revision is below v3.0.
Assisted-by: Claude:opus-5
Signed-off-by: Jonathan Beri <jmberi@gmail.com>
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Replace direct NVIC pending-state calls with k_irq_set_pending()/
k_irq_is_pending()/k_irq_clear_pending(), dropping the dependency on
cmsis_core.h where nothing else needed it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC pending-state calls with k_irq_set_pending()/
k_irq_is_pending()/k_irq_clear_pending(), dropping the dependency on
cmsis_core.h where nothing else needed it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC pending-state calls with k_irq_set_pending()/
k_irq_is_pending()/k_irq_clear_pending(), dropping the dependency on
cmsis_core.h where nothing else needed it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC pending-state calls with k_irq_set_pending()/
k_irq_is_pending()/k_irq_clear_pending(), dropping the dependency on
cmsis_core.h where nothing else needed it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The NXP MCX A family integrates the same DWC Ethernet QoS
controller as the MCX N series, but uses different PHY interface
selection. Extend the driver to also support the MCX A family
by guarding the SoC-specific parts with CONFIG_SOC_FAMILY_MCXA.
Add the PTP clock source and a ptp_clock child node to the MCXA5x
ethernet controller node, so the dwc_mac PTP clock driver can be
used.
ETH_NXP_ENET_QOS does not support PTP for the MCX A family, so
use the dwc_mac driver by default for the MCX A family, if PTP
support is required.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
The NXP MCX N family integrates the same DWC Ethernet QoS
controller as the MCXE31X series, but uses different clocks, PHY
interface selection and interrupt lines. Extend the driver to
also support the MCX N family by guarding the SoC-specific parts
with CONFIG_SOC_FAMILY_MCXN.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Now that all in-tree users have been migrated to the inclusive SPI
terminology, formally deprecate the old names:
- SPI_OP_MODE_MASTER, SPI_OP_MODE_SLAVE and the SPI_MOSI_OVERRUN_*
compatibility aliases now emit a deprecation warning through
__DEPRECATED_MACRO.
- The "slave" member of struct spi_config and the
spi_context_is_slave() compatibility wrapper are marked
__deprecated.
- The SPI_CTX_RUNTIME_OP_MODE_MASTER/SLAVE aliases now emit a
deprecation warning through __DEPRECATED_MACRO.
- The SPI_SLAVE Kconfig shim now selects DEPRECATED.
Document the renames in the v4.5 migration guide and release notes.
Per the API lifecycle policy the deprecated names are kept for two
releases, and are scheduled for removal in Zephyr v5.0.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use the renamed peripheral member of struct spi_config in the
MIPI-DBI SPI configuration initializer and in the Bouffalo Lab and
ESP32 MIPI-DBI drivers, following coding guideline rule A.2.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral and SDO/SDI terminology in the remaining
SPI-using drivers (audio, auxdisplay, bluetooth HCI, dac, eeprom,
ethernet, flash, fpga, gpio, haptics, hdlc_rcp_if, ieee802154,
input, led, led_strip, lora, mfd, misc, mux, rtc, sdhc, stepper,
video, watchdog, wifi) and the ec_host_cmd SPI STM32 backend,
following coding guideline rule A.2: switch to
SPI_OP_MODE_CONTROLLER/PERIPHERAL and SPI_SDO_OVERRUN_DT, rename
Zephyr-owned identifiers (the HCI SPI header buffers, the winc1500
bus wrapper transfer parameters), and update comments, log messages
and Kconfig help prose.
Vendor and out-of-scope identifiers keep their names: STM32
LL_SPI_MODE_SLAVE in the ec_host_cmd backend, the ATWINC1500 SDK I2C
SLAVE_ADDRESS definition, and the I2S codec clock-role variable in
tlv320aic26.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral and SDO/SDI terminology in ADC drivers,
following coding guideline rule A.2: switch the SPI configuration
constants to SPI_OP_MODE_CONTROLLER and update comments and log
messages.
The AD7124 internal master clock identifiers refer to the ADC's
clock source as named in the Analog Devices datasheet, not to SPI
bus roles, and keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral and SDO/SDI terminology in display drivers
and the NXP LCDIC MIPI-DBI driver, following coding guideline rule
A.2: switch the SPI configuration constants to
SPI_OP_MODE_CONTROLLER, rename the spi_config field access to
->peripheral, and update comments.
Display controller command and register names from the vendor
datasheets (Levetop LT7680_CCR_SPI_MASTER, Solomon Systech
SSD1325_SET_MASTER_CONFIG and SSD16XX_CMD_MASTER_ACTIVATION,
Sitronix ST75256_MULTI_MASTER/SLAVE multi-display commands) keep
their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral and SDO/SDI terminology in sensor drivers,
following coding guideline rule A.2: switch the SPI configuration
constants to SPI_OP_MODE_CONTROLLER and update SPI wiring comments.
For the Broadcom AFBR-S50 sensor, the spi-sdi-gpios/spi-sdo-gpios
devicetree properties (named from the sensor's own perspective per
the OSHWA resolution) replace spi-mosi-gpios/spi-miso-gpios. The old
property names are still accepted, marked as deprecated in the
binding, and used as fallbacks; the Zephyr platform glue in
modules/hal_afbr is updated to the renamed fields. The Broadcom
Argus API names (s2pi_slave_t, S2PI_*) come from the vendor library
and keep their names.
Occurrences that concern I2C rather than SPI (I2C controller ACK
behavior comments in NXP drivers, the lsm6dso sensor-hub I2C master
code using ST HAL APIs and application note quotes) and vendor
register names (TDK MPUREG_MASTER_LOCK) are out of scope and keep
their wording.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Realtek RTS5817 SPI
driver, following coding guideline rule A.2: switch to the renamed
core symbols and update comments, log messages and Kconfig help
prose.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral and SDO/SDI terminology in the remaining
SPI drivers, following coding guideline rule A.2. These changes are
limited to uses of the renamed core symbols (SPI_OP_MODE_CONTROLLER/
PERIPHERAL, spi_config.peripheral, spi_context_is_peripheral(),
SPI_SDO_OVERRUN_DT), driver-local identifiers (e.g. the silabs
mosi_overrun config members renamed to sdo_overrun), comments and
log messages. The Kconfig.renesas_ra8 hardware chip-select prompt
and help prose are reworded as well.
Vendor HAL/SDK and datasheet register identifiers keep their names,
notably: Ambiq IOSLAVE* base macros, Telink spi_master_* HAL calls,
TI driverlib SSI_MODE_MASTER, GD32 SPI_MASTER register bit, Nuvoton
BSP SPI_MASTER/SPI_SLAVE/QSPI_*/USPI_MASTER/SPI_CTL_SLAVE_Msk,
Microchip MSS_QSPI_CONTROL_MASTER and XEC CHPA_MOSI/CHPA_MISO
register bits, Silabs emlib EUSART/USART init symbols, and the
Zephyr PCIe core PCIE_CONF_CMDSTAT_MASTER bus-master bit referenced
by spi_pw.c (out of scope for this migration).
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Infineon CAT1 (PDL and
HAL based), PSoC-6 and XMC4xxx SPI drivers, following coding
guideline rule A.2: switch to the renamed core symbols, rename
driver-local identifiers (is_slave, spi_psoc6_master_get_defaults),
and update comments and log messages.
All Cypress/Infineon PDL identifiers (CY_SCB_SPI_MASTER/SLAVE,
Cy_SCB_*Master* APIs, enableMisoLateSample, masterSlaveIntEnableMask)
keep their vendor names, along with the devicetree property tokens
that mirror them (enable-miso-late-sample,
master-slave-int-enable-mask, miso-src).
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the NXP MCUX SPI drivers
(flexcomm, dspi, ecspi, flexio, rv32m1 lpspi and nxp lpspi),
following coding guideline rule A.2: switch to the renamed core
symbols, rename driver-local callbacks, helpers and variables
(spi_mcux_master_transfer_callback, spi_flexio_master_init,
lpspi_master_setup_native_cs, master_config/slave_config locals),
and update comments and log messages.
All NXP MCUX SDK API names, types and enum flags (SPI_Master*,
DSPI_Master*, kDSPI_*, ECSPI_*, FLEXIO_SPI_Master*, LPSPI_Master*,
*_master_config_t, *_master_handle_t, enableMaster) and CMSIS
register field macros (LPSPI_CFGR1_MASTER_MASK, *_MASTER_PCS_SHIFT)
keep their vendor names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Nordic nrfx SPI/SPIM/
SPIS shim drivers, following coding guideline rule A.2: switch to the
renamed core symbols, make SPI_NRFX_SPIS select SPI_PERIPHERAL
instead of the deprecated SPI_SLAVE, and reword Kconfig prose,
comments and log messages.
The nrfx HAL API names keep their vendor names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the ESP32 SPI driver,
following coding guideline rule A.2: switch to the renamed core
symbols, make ESP32_SPI_TARGET select SPI_PERIPHERAL instead of the
deprecated SPI_SLAVE, reword the Kconfig prompt/help, and update
comments.
All ESP-IDF HAL names (spi_slave_hal_* API and types,
hal/spi_slave_hal.h, SPI_MASTER_FREQ_* macros) keep their vendor
names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the TI OMAP MCSPI driver,
following coding guideline rule A.2: switch to the renamed core
symbols and the CONFIG_SPI_PERIPHERAL guard, and update comments and
log messages.
The ti,d1-miso-d0-mosi devicetree property and its matching code
tokens keep their names, as the property is defined by the TI binding
and mirrors the TI TRM signal naming.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the ITE IT8xxx2 SPI driver,
following coding guideline rule A.2: switch to the renamed core
symbols and update log messages.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the ITE IT51xxx SPI driver,
following coding guideline rule A.2: switch to the renamed core
symbols and update log messages.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Xilinx AXI Quad SPI
driver, following coding guideline rule A.2: switch to the renamed
core symbols and the CONFIG_SPI_PERIPHERAL guard, and update comments
and log messages.
The SPICR_MASTER*, SPISR_SLAVE_* and IPIXR_SLAVE_* register bit
macros mirror the Xilinx PG153 datasheet register field names and
keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the STM32 SPI driver,
following coding guideline rule A.2: rename the Zephyr-owned
ll_spi_swap_mosi_miso() wrapper to ll_spi_swap_sdo_sdi(), rename
local variables, switch to the renamed core symbols and the
CONFIG_SPI_PERIPHERAL guard, and update comments, log messages and
Kconfig help prose.
All ST LL/HAL API names (LL_SPI_MODE_MASTER/SLAVE,
LL_SPI_StartMasterTransfer, LL_SPI_EnableMosiMisoSwap,
LL_SPI_SetMasterSSIdleness, ...) keep their vendor names, and the
verbatim errata sheet quote in Kconfig.stm32 is left intact.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the LiteX SPI and LiteSPI
drivers, following coding guideline rule A.2: switch to the renamed
core symbols and update comments and log messages.
All master_*/mosi_*/miso_* identifiers tied to LiteX
gateware-generated CSR register names or devicetree reg-names
(master_cs, master_rxtx, master_phyconfig, master_status,
master_ev_*, master_clk_divisor, SPIFLASH_MASTER_*, reg-names
"mosi"/"miso") keep their names, as they must match the LiteX
gateware and devicetree definitions.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Microchip PolarFire MSS
SPI driver, following coding guideline rule A.2: rename the
driver-local mss_spi_select_slave() helper and the
MSS_SPI_MIN/MAX_SLAVE bounds macros, switch to the renamed core
symbols, and update comments.
The MSS_SPI_CONTROL_MASTER register bit macro mirrors the PolarFire
MSS SPI datasheet and keeps its name.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the ADI MAX32 SPI driver,
following coding guideline rule A.2: rename driver-local variables,
switch to the renamed core symbols and the CONFIG_SPI_PERIPHERAL
guard, and update comments.
The MXC_SPI_SetSlave() HAL function and the
ADI_MAX32_SPI_CTRL_MASTER_MODE register bit macro come from the ADI
MSDK and keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Bouffalo Lab SPI driver,
following coding guideline rule A.2: rename the driver-local
spi_bflb_trigger_master()/spi_bflb_detrigger_master() helpers, switch
to the renamed core symbols, and update comments.
The GLB_REG_SPI_*_MASTER_MODE_POS register field macros come from the
Bouffalo Lab HAL and keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Atmel SAM0 SERCOM SPI
driver, following coding guideline rule A.2: rename
spi_sam0_shift_master() to spi_sam0_shift_controller(), switch to the
renamed core symbols, and update comments.
The SERCOM_SPI_CTRLA_MODE_SPI_MASTER_Val register field value macro
mirrors the Microchip SERCOM header and keeps its name.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Microchip FLEXCOM G1 SPI
driver, following coding guideline rule A.2: rename the driver-local
helpers spi_slave_to_mr_pcs() and spi_sam_shift_master(), switch to
the renamed core symbols, and update comments and log messages.
The SPI_MR_MSTR_Msk register field macro comes from the Microchip SoC
header and keeps its name.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Atmel SAM SPI driver,
following coding guideline rule A.2: rename the driver-local helpers
spi_slave_to_mr_pcs() and spi_sam_shift_master(), switch to the
renamed core symbols, and update comments and log messages.
The Atmel SPI_MR/SPI_CSR register field macros keep their vendor
names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Renesas RZ SPI and RSPI
drivers, following coding guideline rule A.2: switch to the renamed
core symbols and the CONFIG_SPI_PERIPHERAL guard, and update comments
and log messages.
Renesas FSP identifiers (SPI_MODE_MASTER/SLAVE, mosi_idle,
*_MOSI_IDLE_VALUE_FIXING_DISABLE, BSP_FEATURE_BSP_MASTER_MPU_*) keep
their names, and the RZ_MASTER_MPU_* macros and related comments keep
theirs as they designate the Renesas RZ "Master MPU" bus-master
hardware block.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Renesas RX RSPI driver,
following coding guideline rule A.2: rename the driver-internal
transceive helpers, switch to the renamed core symbols and the
CONFIG_SPI_PERIPHERAL guard, update comments, and reword the
hardware chip-select Kconfig prompt and help text.
The rspi_chnl_settings_t.master_slave_mode member, the
RSPI_MS_MODE_MASTER/SLAVE enum constants (Renesas RDP r_rspi_rx_if.h)
and the SPCR.MSTR register bit field (iodefine.h) come from the
vendor HAL/datasheet and keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Renesas RA8 SPI-B
driver, following coding guideline rule A.2: rename the
driver-internal transceive helpers, switch to the renamed core
symbols and the CONFIG_SPI_PERIPHERAL guard.
The SPI_MODE_MASTER/SPI_MODE_SLAVE operating mode constants come from
the Renesas FSP HAL and keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Renesas RA SCI-B SPI
driver, following coding guideline rule A.2: switch to the renamed
core symbols and the CONFIG_SPI_PERIPHERAL guard, and update comments
and log messages.
The SPI_MODE_MASTER/SPI_MODE_SLAVE operating mode constants come from
the Renesas FSP HAL and keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Renesas RA SCI SPI
driver, following coding guideline rule A.2: switch to the renamed
core symbols and the CONFIG_SPI_PERIPHERAL guard, and update comments
and log messages.
The SPI_MODE_MASTER/SPI_MODE_SLAVE operating mode constants come from
the Renesas FSP HAL and keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Renesas RA SPI driver,
following coding guideline rule A.2: rename the driver-internal
transceive helpers, switch to the renamed core symbols and the
CONFIG_SPI_PERIPHERAL guard.
The SPI_MODE_MASTER/SPI_MODE_SLAVE operating mode constants come from
the Renesas FSP HAL and keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Microchip SERCOM G1 SPI
driver, following coding guideline rule A.2: rename the
driver-internal peripheral/controller helper functions and ISRs,
switch to the renamed core symbols and the CONFIG_SPI_PERIPHERAL
guard (including the SPI_MCHP_INTER_CHARACTER_SPACE default), and
update comments and log messages.
The SERCOM_SPI_CTRLA_MODE_SPI_MASTER/SLAVE register field macros come
from the Microchip device family pack headers and keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Realtek Ameba SPI
driver, following coding guideline rule A.2: rename
spi_ameba_is_slave() to spi_ameba_is_peripheral(), switch to the
renamed core symbols and the CONFIG_SPI_PERIPHERAL guard, and update
comments and log messages.
The SSI_MASTER/SSI_SLAVE role constants come from the Realtek Ameba
HAL and keep their names; the debug messages that print which HAL
role constant is selected keep referring to them verbatim.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the NXP S32 SPI driver,
following coding guideline rule A.2:
- Add a "peripheral" boolean devicetree property; the old "slave"
property is still accepted, marked as deprecated in the binding,
and used as a fallback when the new one is not set.
- Rename driver-internal identifiers, guards, comments and log
messages accordingly.
The SPI_MCR_MSTR register field macros and the SlaveMode member of
the SPI configuration structure come from the NXP S32 RTD HAL and
keep their names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Realtek Bee SPI driver,
following coding guideline rule A.2:
- Add an is-peripheral devicetree property; the old is-slave property
is still accepted, marked as deprecated in the binding, and used as
a fallback when the new one is not set.
- Rename driver-internal identifiers, guards, comments and log
messages accordingly.
The SPI0_SLAVE_TX/RX_FIFO_SIZE and SPI_Mode_Slave identifiers come
from the Realtek Bee SDK/HAL and keep their names, and the spi0_slave
devicetree node label keeps its name as it designates the dedicated
SPI0 slave-mode hardware instance of the SoC.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the Cadence SPI driver,
following coding guideline rule A.2: switch to the renamed core
symbols and the CONFIG_SPI_PERIPHERAL guard, and update comments and
log messages.
The SPI_SLAVE_IDLE_COUNT register offset macro keeps its name as it
mirrors the "Slave_Idle_count" register of the Cadence SPI controller
datasheet.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the DesignWare SPI driver,
following coding guideline rule A.2: rename spi_dw_is_slave() to
spi_dw_is_peripheral(), switch to the CONFIG_SPI_PERIPHERAL guard and
the renamed core symbols, and update comments and log messages.
The DW_SPI_CTRLR0_SLV_OE register bit macro keeps its name as it
mirrors the "Slave Output Enable" field of the Synopsys DesignWare
SSI databook.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use SDO/SDI and controller/peripheral terminology in the Raspberry Pi
Pico PIO SPI driver, following coding guideline rule A.2:
- Rename the sdo-gpios/sdi-gpios devicetree properties from
mosi-gpios/miso-gpios. The old property names are still accepted,
marked as deprecated in the binding, and used as a fallback by the
driver when the new ones are not set.
- Rename driver-internal identifiers and log messages accordingly.
- Migrate all in-tree boards, samples and test overlays to the new
property names.
The pico-sdk PIO helper APIs used by the driver keep their vendor
names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use SDO/SDI and controller/peripheral terminology in the SPI bitbang
driver, following coding guideline rule A.2:
- Rename the sdo-gpios/sdi-gpios devicetree properties from
mosi-gpios/miso-gpios. The old property names are still accepted,
marked as deprecated in the binding, and used as a fallback by the
driver when the new ones are not set.
- Rename driver-internal identifiers and log messages accordingly.
- Migrate all in-tree boards and sample overlays to the new property
names.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use controller/peripheral terminology in the SPI driver context
helpers, following coding guideline rule A.2:
- Rename spi_context_is_slave() to spi_context_is_peripheral(),
keeping the old name as a compatibility wrapper for out-of-tree
drivers.
- Rename the spi_ctx_runtime_op_mode enumerators to
SPI_CTX_RUNTIME_OP_MODE_CONTROLLER/PERIPHERAL, keeping the old
names as compatibility aliases.
- Guard peripheral-mode code with CONFIG_SPI_PERIPHERAL. The
deprecated CONFIG_SPI_SLAVE option selects SPI_PERIPHERAL, so
drivers that still test CONFIG_SPI_SLAVE keep working unchanged.
- Update comments accordingly.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Rename the SPI_SLAVE Kconfig option to SPI_PERIPHERAL, following
coding guideline rule A.2. The old option is kept as a compatibility
shim that selects SPI_PERIPHERAL, so existing configurations keep
working and both CONFIG macros are defined whenever either option is
enabled. This lets drivers migrate their guards independently.
The shim will additionally select DEPRECATED once all in-tree users
have been migrated.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>