drivers: spi: update drivers that were using spi cpol and cpha

Modified files (yaml, dts, overlay, and c) which were using spi-cpol
and spi-cpha to be compatible with the new structure.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
This commit is contained in:
Ali Hozhabri 2023-10-05 16:11:52 +02:00 committed by Martí Bolívar
parent e2c0cb979f
commit 154023f754
4 changed files with 0 additions and 22 deletions

View file

@ -1091,8 +1091,6 @@ static struct dsa_api dsa_api_f = {
#if defined(CONFIG_DSA_SPI) #if defined(CONFIG_DSA_SPI)
#define DSA_SPI_BUS_CONFIGURATION(n) \ #define DSA_SPI_BUS_CONFIGURATION(n) \
.spi = SPI_DT_SPEC_INST_GET(n, \ .spi = SPI_DT_SPEC_INST_GET(n, \
COND_CODE_1(DT_INST_PROP(n, spi_cpol), (SPI_MODE_CPOL), ()) | \
COND_CODE_1(DT_INST_PROP(n, spi_cpha), (SPI_MODE_CPHA), ()) | \
SPI_WORD_SET(8), \ SPI_WORD_SET(8), \
0U) 0U)
#else #else

View file

@ -34,8 +34,6 @@ LOG_MODULE_REGISTER(ws2812_spi);
* isn't an EEPROM) * isn't an EEPROM)
*/ */
#define SPI_OPER(idx) (SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | \ #define SPI_OPER(idx) (SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | \
COND_CODE_1(DT_INST_PROP(idx, spi_cpol), (SPI_MODE_CPOL), (0)) | \
COND_CODE_1(DT_INST_PROP(idx, spi_cpha), (SPI_MODE_CPHA), (0)) | \
SPI_WORD_SET(SPI_FRAME_BITS)) SPI_WORD_SET(SPI_FRAME_BITS))
struct ws2812_spi_cfg { struct ws2812_spi_cfg {

View file

@ -12,16 +12,6 @@ properties:
dsa-slave-ports: dsa-slave-ports:
type: int type: int
description: Number of slave ports on the switch description: Number of slave ports on the switch
spi-cpha:
type: boolean
description: |
Set to indicate phase starts with asserted half-phase (CPHA=1).
For this driver using this property requires also using cpol.
spi-cpol:
type: boolean
description: |
Set to indicate clock leading edge is falling (CPOL=1).
For this driver using this property requires also using cpha.
reset-gpios: reset-gpios:
type: phandle-array type: phandle-array
description: | description: |

View file

@ -24,14 +24,6 @@ include: [spi-device.yaml, ws2812.yaml]
properties: properties:
spi-cpol:
type: boolean
description: Set SPI clock polarity.
spi-cpha:
type: boolean
description: Set SPI clock phase.
spi-one-frame: spi-one-frame:
type: int type: int
required: true required: true