drivers/sensor: lis2mdl: use common SPI duplex option

Driver used a custom SPI duplex option. Replaced with the common one
found in spi-device.yaml.

Signed-off-by: Simon Frank <simon.frank@lohmega.com>
This commit is contained in:
Simon Frank 2024-06-24 12:17:22 +02:00 committed by Anas Nashif
commit 2ca7e41b26
4 changed files with 7 additions and 9 deletions

View file

@ -191,7 +191,6 @@
lis2mdl: lis2mdl@0 { lis2mdl: lis2mdl@0 {
compatible = "st,lis2mdl"; compatible = "st,lis2mdl";
spi-max-frequency = <1000000>; spi-max-frequency = <1000000>;
spi-full-duplex;
reg = <0>; reg = <0>;
}; };
}; };

View file

@ -238,6 +238,9 @@ Device Drivers and Devicetree
}; };
}; };
* `st,lis2mdl` property `spi-full-duplex` changed to `duplex =
SPI_FULL_DUPLEX`. Full duplex is now the default.
Analog-to-Digital Converter (ADC) Analog-to-Digital Converter (ADC)
================================= =================================

View file

@ -531,7 +531,8 @@ static int lis2mdl_pm_action(const struct device *dev,
LIS2MDL_SPI_OPERATION, \ LIS2MDL_SPI_OPERATION, \
0), \ 0), \
}, \ }, \
.spi_4wires = DT_INST_PROP(inst, spi_full_duplex), \ .spi_4wires = DT_INST_PROP(inst, duplex) == \
SPI_FULL_DUPLEX, \
LIS2MDL_CONFIG_COMMON(inst) \ LIS2MDL_CONFIG_COMMON(inst) \
} }

View file

@ -23,8 +23,3 @@ properties:
description: | description: |
Set to enable the offset cancellation. Otherwise it would be Set to enable the offset cancellation. Otherwise it would be
disabled as default. disabled as default.
spi-full-duplex:
type: boolean
description: |
Enable SPI 4wires mode with separated MISO and MOSI lines