The bmp581 driver currently returns pressure in pascals, when
the sensor_channel enum specifies kilopascals.
Signed-off-by: Maxmillion McLaughlin <max@sorcerer.earth>
MAX31855 driver had a wrong position of sign bits causing
invalid reading of negative temperature values. Fixed by
shifting position of sign bit by one bit.
Signed-off-by: Petr Vilím <petr.vilim@proton.me>
Streaming mode now supported through In-band Interrupts (I3C).
By default, a dedicated INT GPIO is prioritized, even if the sensor
is on an I3C bus.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
I3C is now a bus supported, by relying on RTIO IODEV which is supported
for all buses (I2C, I3C and SPI). Tested backwards compatibility: I2C
and I3C.
No IBI support yet.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Use cache API for disabling and enabling ICACHE. The driver handles waiting
for ongoing cache invalidation.
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
Added driver for the PAJ7620 gesture sensor. For now,
just added basic gesture mode, although sensor also
has other modes (proximity and cursor modes).
Signed-off-by: Paul Timke Contreras <ptimkec@live.com>
The tmp116 sensor driver also supports tmp117 and tmp119. Therefore rename
to indicate that is supports a range of tmp devices.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
The lsm6dsv16x driver is using an incorrect value for the index
into the acceleration range. This results in using the wrong
range. The issue was found to be a bug in a MACRO in
lsm6dsv16x_decoder.h that was used to find the index in the
acceleration range. The MACRO was improperly counting zeros from the
leading edge, instead of the trailing edge.
Signed-off-by: Derek Valleroy <derekvalleroy@fb.com>
Fix build error which happens when LSM6DSV16X_STREAM=y and there
are no lsm6dsv16x driver instances on i3c bus.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
ADC output values can have noise, even if the input is 0V. Add a noise
threshold so that raw ADC readings below the threshold can be zeroed
out. By default the threshold is disabled.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The ti,opt3001 ambient light sensor is capable of asserting its interrupt
gpio upon conversion completion. The interrupt gpio can then be used to
trigger a reading of the conversion result automatically.
Due to this, it makes sense for the driver to implement the sensor trigger
functionality.
Add a devicetree property, int-gpios, to the ti,opt3001 bindings to allow
describing the gpio used for getting interrupts from the ti,opt3001.
Implement the sensor trigger functionality with options for using the
global worker thread or letting the ti,opt3001 create its own thread for
servicing the interrupts.
In both cases, when an interrupt is received the driver will read a new
measurement from the chip and clear the interrupt. The sample is then ready
to be read by the user of the sensor.
When manually triggering a sample_fetch, the trigger handler is not
invoked.
Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
Since #83575 bma4xx driver relies on RTIO to work. This means that
CONFIG_I2C_RTIO should be defined together with CONFIG_I2C in the
Kconfig, otherwise I2C_DT_IODEV_DEFINE() won't be available at
build time.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Clamp the returned humidity to a non-negative value. This ensure that
the return value is always within the expected range, even if the
calibration parameters are read out incorrectly or corrupted.
This check is applied in the example Bosch driver for the float
conversion case, so there are situations that warrant it.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This sensor may trigger data at a very fast pace (20,000 fps) and this
may not be useful for the application. Instead, it may affect its
proper functioning. Therefore, this patch includes a cool-down timer
before which time the INT line won't be enabled.
Please note that this sensor accumulates the delta compared to the
last reading, so on its own, not reading data-changes does not imply
losing data, as long as it does not saturate.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Working with DRDY and Motion triggers.
DRDY contains a backup software timer to guarantee checking in with
the sensor.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Add a streaming implementation for the BMA4XX using both
FIFO watermark and FIFO full interrupts. A batch duration of
3,000 have been used for verification.
Signed-off-by: Peggy Chen <peggy.chen@cienet.com>
Updated the sensor configuration to use the bma4xx_safely_configure
function for safer and more reliable initialization.
Signed-off-by: Peggy Chen <peggy.chen@cienet.com>
Added register definitions, bit masks, and related constants
for the BMA4XX sensor in a separate header file.
Signed-off-by: Peggy Chen <peggy.chen@cienet.com>
The vendor prefix has been changed from 'ltr' to 'liteon'.
This change is made to better reflect the actual name of
the vendor, which is LiteOn. The previous prefix 'ltr'
was referring to the LiteOn Optical Sensor family, which
could lead to misunderstandings.
Signed-off-by: Konrad Sikora <kontakt@konradsikora.pl>
Use SENSOR_ATTR_OFFSET attribute to initialize the Sensor Fusion GBIAS.
This is useful when the device is not sill (e.g. hold in hand) and so
the gyroscope calibration does not run.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Move gyro_freq setting inside lsm6dsv16x_gyro_set_odr_raw() routine,
so that it is properly saved in all cases (i.e. from DT configuration
and from runtime ATTR set case).
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The LSM6DSV32X part is nearly identical to the LSM6DSV16X but has different
sensitivity scales for the accelerometer (4-32G versus 2-16G). This commit
adds support for this part via the "st,lsm6dsv32x" compatible string.
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
Moves the MPU6050 accel/gyro scale settings from KConfig to Devicetree.
Adds a new setting for the MPU6050 sample rate divider register and
transmits it to the sensor upon initialization.
This helps to reduce the interrupt firing rate when combined with the
data ready trigger.
A default division factor is provided which ensures compatibility with
existing applications.
The MPU6050 sample application is extended and used for hardware tests.
Signed-off-by: Tilmann Unte <unte@es-augsburg.de>
Add support for setting the sample frequency via `attr_set` and the
output data rate from device tree source.
Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>