Coverity identified out-of-bounds access. A uint8_t being cast to
an enum is undefined in that the enum can be allocated 4bytes.
Change the internal function to use the base type of the variable,
uint8_t to avoid potential compiler size alignement problems.
Fixes#81927
Signed-off-by: David Leach <david.leach@nxp.com>
The function fxls8974_get_temp_data always returns zero, indicating
success.Therefore, the error checking if condition is unnecessary and
can be removed.
Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io>
find a sensor driver bug don't judge the data whether read back
correctly, deal with buffer data directly.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Remove Kconfig dependency on SOC_FAMILY_KINETIS as the temperature
sensor is available also on MCX family.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
The Drivers using Pinctrl should be turning Pinctrl on
this should not be the responsibility of the board. This
commit removes CONFIG_PINCTRL from the boards side for nxp boards.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Update the devicetree binding for the nxp,kinetis-acmp comparator and
move the binding to dts/bindings/comparator.
The update to the binding includes:
- Remove unused io-channel-cells property
- Remove unused sensor-device include
- Adding missing properties dac config, discrete mode config, and
input configs.
- Rename properties to exclude redundant vendor prefix since props in
this binding are not inhereted, and as such, don't need to be
namespaced.
- Deprecate the old names of the renamed properties
The sensor based device driver has been updated to support both the
deprecated and new property names. This allows it to use both
nxp,enable-sample and filter-enable-sample for example.
Additionally, remove the unused io-channel-cells properties from
in-tree nodes of compatible = "nxp,kinetis-acmp"
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The mcux_acmp will get support by the comparator subsystem. To avoid
namespace clashes, namespace the driver, kconfigs and use the
MCUX_ACMP config solely to select the MCUX SDK driver.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Remove the ‘HAS_MCUX_ACMP’ Kconfig, and also remove it from
driver and soc Kconfig files. It is not needed since we already
depend on 'ACMP' enabled in the dt file, the 'HAS_MCUX_ACMP'
kconfig is a relic of the past before devicetree was stable.
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
The NXP Kinetis temperature sensor depends on CONFIG_ADC. Make the driver
Kconfig select CONFIG_ADC to get better CI coverage (enabling the driver
when CONFIG_SENSOR is enabled without depending on CONFIG_ADC=y).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>