zephyr
zephyr copied to clipboard
STM32 die temperature sensor driver rework
This PR is a rework of the STM32 die temperature sensor driver.
The main reason for this PR is the upcoming introduction of STM32WB0 series, which has a few differences from other series (calibration data is 32-bit, formula is different, sensor is always enabled) - with this reworked driver, the main differences are factored out, so the series can be easily integrated.
While at it, the driver and bindings have been heavily documented, and modified to follow the Reference Manuals more closely.
This PR also fixes errors in certain SoCs' DTSI (STM32030/STM32070 and STM32100 lines, STM32F2 series) and a few MISRA Rule 20.9 violations (using #if xxx on potentially undefined macros, instead of #if defined(xxx)).
CI failure is due to mistake in patch (dietemp for STM32F100 lines is not placed properly), will fix in V2.
Patch v2:
- fixes all points raised in comments
- Properties are made required in dedicated commit (message explains why DTSI modification is not needed)
- Use snake case everywhere
- Split mixed modifications to different commits
- fixes CI failure
- move
dietempnode in proper place instm32f100Xb.dtsibinding
- move
- regroups
avgslopeproperty in a single binding - reworks all descriptions in bindings
- also removes ultraverbose listings in descriptions...
CI failures unrelated to PR content (twister failure caused by Renesas board, Compliance Checks seems to just be broken...)
Commits 1~3 are minor bugfixes that I think are eligible for backport to 3.7 - should they be dropped from this PR and contributed by a separate PR for this purpose, if applicable?
@MaureenHelm Would you mind having a look ?
@MaureenHelm Kind reminder