Commit 154023f7 authored by Ali Hozhabri's avatar Ali Hozhabri Committed by Martí Bolívar
Browse files

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: default avatarAli Hozhabri <ali.hozhabri@st.com>
parent e2c0cb97
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1091,8 +1091,6 @@ static struct dsa_api dsa_api_f = {
#if defined(CONFIG_DSA_SPI)
#define DSA_SPI_BUS_CONFIGURATION(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),				\
			0U)
#else
+0 −2
Original line number Diff line number Diff line
@@ -34,8 +34,6 @@ LOG_MODULE_REGISTER(ws2812_spi);
 *   isn't an EEPROM)
 */
#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))

struct ws2812_spi_cfg {
+0 −10
Original line number Diff line number Diff line
@@ -12,16 +12,6 @@ properties:
  dsa-slave-ports:
    type: int
    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:
    type: phandle-array
    description: |
+0 −8
Original line number Diff line number Diff line
@@ -24,14 +24,6 @@ include: [spi-device.yaml, ws2812.yaml]

properties:

  spi-cpol:
    type: boolean
    description: Set SPI clock polarity.

  spi-cpha:
    type: boolean
    description: Set SPI clock phase.

  spi-one-frame:
    type: int
    required: true