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>
QDEC sensor driver fails to inform user of the overflow in the
ACC register, which makes the most recently fetched data invalid.
An error code return has been added to nrfx_qdec_sample_fetch(),
that indicates that an overflow has occured, based on oveflow flag.
Also, raw_acc field was added in the qdec_nrfx_data structure, to
adjust QDEC to sensor API rules - two subsequent sensor_channel_get()
calls should will yield the same values.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Because MC3419's TRIGGER's Kconfig was different from the typical
configuration, the `build_all` test settings were not correctly
applied.
The Kconfig configuration has been revised to be set in conjunction
with MC3419_TRIGGER_OWN_THREAD, even if MC3419_TRIGGER is not
explicitly specified.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Change the STM32 Temperature Sensor bindings to accept the average slope
value in string form instead of integer. With this change, it is possible
to use the raw decimal value found in each MCU's datasheet instead of
needing to scale it (differently depending on series!). This also allows
regrouping the property in a single file to reduce duplication.
Also update all DTSI files affected by this change and the dietemp driver
to accept the property's new format.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Update all the conversion code in the STM32 dietemp sensor driver to be
more readable and match the Reference Manuals. Additionally, comment all
the code to make it easy to understand.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Move the reading of calibration data from manufacturing flash to a
dedicated function. This makes introduction of new STM32 series easier.
Additionally, use the sys_read16 primitive to read data instead of
manipulating and dereferencing raw manufacturing flash pointers.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Rename the fields of the STM32 dietemp sensor driver data structure to
match the names in Reference Manual more closely, and add documentation
comments to all of them.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Factor out the ADC-sample-to-temperature conversion logic from the sensor
subsystem API implementation, and move it to a dedicated function.
This makes the driver more readable.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Moves the temperature sensor channel enable and selection to separate
functions. This improves the driver's readability and makes introduction
of new STM32 series easier.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Moves all Renesas sensor drivers into a vendor specific subdirectory
matching the organization used for other drivers.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
This is a bug fix for adxl372_get_status function.
This function is used to get STATUS1, STATUS2, FIFO_ENTRIES2
and FIFO_ENTRIES1 registers (they are continuously present
in the memory in this order). User can choose if it wants
STATUS2 and/or FIFO registers by passing pointers where
to store received values. Bug was when user doesn't want
STATUS2 and want FIFO regs. In that case calculated length
would be 3 which will result in reading of STATUS1, STATUS2
and FIFO_ENTRIES2 regs and not expected STATUS1, FIFO_ENTRIES2
and FIFO_ENTRIES1.
Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
Separating declarations of variables not referenced with #ifdef
when CONFIG_IIS328DQ_THRESHOLD is disabled.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Since b249535 (sensors: Add channel specifier) the signature of
sensor_reconfigure_read_iodev() changed, but sensor_handlers.c
apparently hasn't been updated.
Fix compile time error by updating sensor_reconfigure_read_iodev()
signature in sensor_handlers.c
Signed-off-by: Andrea Merello <andrea.merello@iit.it>
Refactors the cmake and kconfig bits of the tdk sensor drivers into the
vendor subdirectory to make them consistent with other vendor-sorted
sensor drivers. The tdk driver implementations were previously moved
into the vendor subdirectory in commit
41f1c3a2b7.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Only read the compensation parameters from the chip on first power up,
as they are static on the device.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Support the BME680 being on a power domain, which may not be powered at
boot. For example, Nordic Thingy53.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add all the necessary files to add apds9253 Avago sensor driver.
Sensor available at https://docs.broadcom.com/doc/APDS-9253-001-DS
Signed-off-by: Margherita Milani <margherita.milani@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Remove all entries that as not being used.
This also update hal to re-enable warning flags
as such as -Wno-unused-variable.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
`explorir_m_uart_flush_until_end` terminates immediately if the read
variable is initially equal to `EXPLORIR_M_MAX_RESPONSE_DELAY` and
`uart_poll_in` does not read anything.
Fix this by only checking the read variable if `uart_poll_in` reads a char.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Select PINCTRL subsystem by drivers which require it.
Prevent the need from enabling this symbol at board or soc level.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Add driver support for Bosch bmp180 pressure sensor running on i2c bus.
It pushes the driver files to the bmp180 directory under
drivers/sensor/bosch. The driver implement the Sensor API
and support channel DIE_TEMP and PRESSURE.
Driver had been tested with the NRF5340DK.
V2 fixup
---------
Drivers: Bosch bmp180 fixups for PR v2
fix BMP180 in CMakeLists.txt
rename regControl to ctrlreg
simplify the logic in set_attribute
use BMP180_GET_CMD_TEMP_DELAY
Drivers: Bosch bmp180 use system byteorder macros
To aware of ENDIANESS use the macros from byteorders.h
Drivers: Bosch bmp180 comments added to #endif
Add a comment to the #endif /* CONFIG_FOO */
Drivers: Bosch bmp180 , fix twister run error
twister report an error related to using floor() with a float
fix this using floorf() function.
Drivers: Bosch bmp180, rework review v2
fix code style issues
simplify the structure for bus and i2c.
prepare to remove the empty bmp180_i2c.c
Drivers: Bosch bmp180, remove bmp180_i2c.c
bmp180: update CMakeList.txt remove bmp180_i2c.c
bmp180: remove unused variable
fixups for complient checks
replace homebrew bitshift with byteorder.h macro
sys_get_be16 and sys_get_be24
cleanup remove unused spi.h
change struct reg16/24 to uint8_t[]
remove channel AMBIENT_TEMP
bmp180/Kconfig add missing help text
fix indent issue in bmp180_pm_action
merge BMP180_CONFIG_I2C into BMP180_INST
Move DT_DRV_COMPAT out of the header file
drop LOG_DBG() from read calibration data
remove bus_io implementation and header cleanup
move headers and structs out from bmp180.h
fix typo in comment
apply clang format changes, only if not line lenght violation
fix indent code error after joined lines
conversion from Pa to kPh was wrong, fixed it
Remove default=n from Kconfig, it is the default.
Move the conversion ready test into a function (duplicate code)
and apply retry policy
parameter naming with indicate the usage
change BMP180_INST(inst) to clang format
fix int32_t overflow in convension formular
fix wrong devider in convension formula
move BSWAP_s16 BSWAP_u16 from .h to .c
Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
This transforms the existing driver for the Microchip MCP9808
to be used as a generic driver to be used with all
JEDEC JC 42.4 compliant temperature sensor chips.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Adds support for setting the operating mode of the TMP116/7 sensor to
either shutdown, continuous conversion or one-shot mode.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
A 16-bit value built using byte shifts and ORs from a given
couple of lsb and msb bytes will result to be the same on both
little-endian and big-endian architectures, e.g.
uint8_t lsb, msb;
int16_t val;
/* val is the same number on both le and be archs, but has
different layout in memory */
val = (msb << 8) | lsb;
All the xyz_raw_get() APIs of stmemsc sensor module build the sensor
data using the above method and DO NOT hence require (it actually leads
to wrong values on big-endian machines) to use any le/be swap routines,
such as sys_le16_to_cpu().
Fix#75758
Signed-off-by: Armando Visconti <armando.visconti@st.com>
For applications that rely on low noise/variance in accelerometer
sample reading. Application can take advantage of integrated LPF
Thus this PR adds LPF configuration capability to the mc3419 driver
Signed-off-by: Anuj Pathak <anuj@croxel.com>
Incorrect value set by user when using sensor_attr_set can fail silently
since it always returns 0.
Fix by adding ret. Also added return on sensor_attr_get.
Signed-off-by: Aiman Mazlan <mohammad.aiman@stratusauto.com>
Fixes the adxl345 accelerometer driver to return zero on sample fetch
success, as specified by the sensor driver API. Prior to this change,
the driver incorrectly returned a positive non-zero value on sample
fetch success, which in turn caused a bus fault getting data with the
sensor shell.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.6
Requires https://github.com/zephyrproject-rtos/hal_st/pull/21
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Tmp114 has an average function, according to the datasheet this is
default disabled. Add attribute to enable this feature.
Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>