Skip to content

Commit

Permalink
spi: Merge rename of spi-cs-setup-ns DT property
Browse files Browse the repository at this point in the history
The newly added spi-cs-setup-ns doesn't really fit with the existing
property names for delays, rename it so that it does before it makes it
into a release and becomes ABI.
  • Loading branch information
Mark Brown committed Jan 11, 2023
2 parents 6b35b17 + e0fe6a3 commit b442990
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ properties:
description:
Maximum SPI clocking speed of the device in Hz.

spi-cs-setup-ns:
spi-cs-setup-delay-ns:
description:
Delay in nanosecods to be introduced by the controller after CS is
Delay in nanoseconds to be introduced by the controller after CS is
asserted.

spi-rx-bus-width:
Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi,
if (!of_property_read_u32(nc, "spi-max-frequency", &value))
spi->max_speed_hz = value;

if (!of_property_read_u16(nc, "spi-cs-setup-ns", &cs_setup)) {
if (!of_property_read_u16(nc, "spi-cs-setup-delay-ns", &cs_setup)) {
spi->cs_setup.value = cs_setup;
spi->cs_setup.unit = SPI_DELAY_UNIT_NSECS;
}
Expand Down

0 comments on commit b442990

Please sign in to comment.