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:
parent
3d31d50c0d
commit
2ca7e41b26
4 changed files with 7 additions and 9 deletions
|
@ -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>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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)
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
|
|
|
@ -528,10 +528,11 @@ static int lis2mdl_pm_action(const struct device *dev,
|
||||||
STMEMSC_CTX_SPI(&lis2mdl_config_##inst.stmemsc_cfg), \
|
STMEMSC_CTX_SPI(&lis2mdl_config_##inst.stmemsc_cfg), \
|
||||||
.stmemsc_cfg = { \
|
.stmemsc_cfg = { \
|
||||||
.spi = SPI_DT_SPEC_INST_GET(inst, \
|
.spi = SPI_DT_SPEC_INST_GET(inst, \
|
||||||
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) \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue