Benjamin Björnsson
d4f00fe3c4
drivers: sensor: ccs811: Update driver to use gpio_dt_spec
...
Simplify driver by using gpio_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:52:26 -05:00
Benjamin Björnsson
3ac870b03b
drivers: sensor: ccs811: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:52:26 -05:00
Benjamin Björnsson
15aefccf17
drivers: sensor: ccs811: Change parameters of helper functions
...
Change parameter list of functions for consistency with other drivers.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:52:26 -05:00
Benjamin Björnsson
3b2f21e291
drivers: sensor: bmi270: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:46:01 -05:00
Benjamin Björnsson
fc7e67966a
drivers: sensor: bmi270: Change parameters of helper functions
...
Change parameter list of functions for consistency with other drivers.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:46:01 -05:00
Benjamin Björnsson
8c2a6e34a8
drivers: sensor: bmc150_magn: Update driver to use gpio_dt_spec
...
Simplify driver by using gpio_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:40:03 -05:00
Benjamin Björnsson
c145539b54
drivers: sensor: bmc150_magn: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:40:03 -05:00
Benjamin Björnsson
f06ea0e12e
drivers: sensor: dht: Update driver to use gpio_dt_spec
...
Simplify driver by using gpio_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:34:28 -05:00
Benjamin Björnsson
4edf96d40b
drivers: sensor: dps310: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:32:19 -05:00
Benjamin Björnsson
481fe82fa9
drivers: sensor: dps310: Change parameters of helper functions
...
Change parameter list of functions for consistency with other drivers.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:32:19 -05:00
Benjamin Björnsson
b22c6a8867
drivers: sensor: hmc5883l: Update driver to use gpio_dt_spec
...
Simplify driver by using gpio_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:24:43 -05:00
Benjamin Björnsson
be1e512aad
drivers: sensor: hmc5883l: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:24:43 -05:00
Benjamin Björnsson
d4731daaf6
drivers: sensor: lps25hb: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 15:46:00 -05:00
Maximilian Deubel
1c1c72ea08
ADXL362: Add separate activity/inactivity triggers
...
This patch modifies the ADXL362 driver to use the new
SENSOR_TRIG_MOTION trigger for activity detection
and SENSOR_TRIG_STATIONARY for inactivity detection.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2022-06-23 10:28:34 -05:00
Benjamin Björnsson
73ca3c72bc
drivers: sensor: adxl345: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 14:37:07 +02:00
Benjamin Björnsson
82901bd563
drivers: sensor: fxos8700: Update driver to use gpio_dt_spec
...
Simplify driver by using gpio_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:27:17 +02:00
Benjamin Björnsson
47b3e65290
drivers: sensor: fxos8700: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:27:17 +02:00
Benjamin Björnsson
1e44af1e2c
drivers: sensor: lis3mdl: Update driver to use gpio_dt_spec
...
Simplify driver by using gpio_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:27:02 +02:00
Benjamin Björnsson
37b59c3427
drivers: sensor: lis3mdl: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:27:02 +02:00
Benjamin Björnsson
e06359f616
drivers: sensor: fxas21002: Update driver to use gpio_dt_spec
...
Simplify driver by using gpio_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:25:52 +02:00
Benjamin Björnsson
5f4be73ba0
drivers: sensor: fxas21002: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:25:52 +02:00
Maximilian Deubel
ad3d8e8581
ADXL362: fix write to FIFO_SAMPLES register
...
This patch removes a superfluous write to the INTMAP1 register
that happens because the byte count was previously wrong.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2022-06-21 10:48:52 +02:00
Benjamin Björnsson
0f62594f65
drivers: sensor: ens210: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-20 08:46:01 -05:00
Benjamin Björnsson
5afcea07b2
drivers: sensor: ens210: Change parameters of helper functions
...
Change parameter list of functions for consistency with other drivers.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-20 08:46:01 -05:00
Kumar Gala
e3f991b7b8
drivers: sensor: ams_iAQcore: Update driver to use i2c_dt_spec
...
Move driver to use i2c_dt_spec for I2C bus access.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-20 08:25:32 -05:00
Benjamin Björnsson
6cff868c70
drivers: sensor: fdc2x1x: Update driver to use gpio_dt_spec
...
Simplify driver by using gpio_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-20 08:18:55 -05:00
Benjamin Björnsson
9bb7c9771f
drivers: sensor: fdc2x1x: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-20 08:18:55 -05:00
Benjamin Björnsson
534988ffcf
drivers: sensor: bmm150: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-17 11:09:19 -05:00
Benjamin Björnsson
94861280f6
drivers: sensor: bq274xx: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-17 08:52:44 -05:00
Benjamin Björnsson
0c42b0f1a6
drivers: sensor: bq274xx: Change parameters of helper functions
...
Change parameter list of functions for consistency with other drivers.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-17 08:52:44 -05:00
Benjamin Björnsson
4974a2d165
drivers: sensor: bmg160: Update driver to use gpio_dt_spec
...
Simplify driver by using gpio_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-17 08:48:40 -05:00
Benjamin Björnsson
0db8f22892
drivers: sensor: bmg160: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-17 08:48:40 -05:00
Benjamin Björnsson
67d53d9232
drivers: sensor: bma280: Update driver to use gpio_dt_spec
...
Simplify driver by using gpio_dt_spec for gpio access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-17 10:18:16 +02:00
Benjamin Björnsson
3be45afe79
drivers: sensor: bma280: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-17 10:18:16 +02:00
Kumar Gala
7a9a5f525f
drivers: sensor: apds9960: Update driver to use gpio_dt_spec
...
Move driver to use gpio_dt_spec for GPIO interrupt handling.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-16 10:51:42 -05:00
Kumar Gala
cf947c5b13
drivers: sensor: apds9960: Update driver to use i2c_dt_spec
...
Move driver to use i2c_dt_spec for I2C bus access.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-16 10:51:42 -05:00
Kumar Gala
fa74cadbf0
drivers: sensor: hp206c: Update driver to use i2c_dt_spec
...
Move driver to use i2c_dt_spec for I2C bus access.
Also removed unused gpio.h header include.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-16 10:37:59 -05:00
Kumar Gala
ef6146d802
drivers: sensor: adt7420: Update driver to use gpio_dt_spec
...
Move driver to use gpio_dt_spec for GPIO interrupt handling.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-16 10:35:48 -05:00
Kumar Gala
6563245300
drivers: sensor: adt7420: Update driver to use i2c_dt_spec
...
Move driver to use i2c_dt_spec for I2C bus access.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-16 10:35:48 -05:00
Thomas Stranger
38b23fd825
drivers: shtc3: fix normal mode measurement time.
...
The measurement time in normal mode was too short.
With this commit the maximum value of the datasheet is applied.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-06-15 17:02:27 -05:00
Kumar Gala
61c2b35335
drivers: sensor: amg88xx: Update driver to use gpio_dt_spec
...
Move driver to use gpio_dt_spec for GPIO interrupt handling.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-14 09:21:21 -05:00
Kumar Gala
1fbc9632c1
drivers: sensor: amg88xx: Update driver to use i2c_dt_spec
...
Move driver to use i2c_dt_spec for I2C bus access.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-14 09:21:21 -05:00
Keith Packard
7c6fe0735d
drivers/adxl372: Fix computation of sensor value
...
Sensor value computation was creating a 64-bit integer value, passing
that to 'abs' and assigning that to an int32_t result and then sanity
checking the result. If the computation goes badly wrong, then the range
reduction of 64-bit to 32-bit values could generate a falsely in-range
value.
Instead, perform the computation in 64-bits, range check that value and
then assign to a 32-bit variable.
Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-14 01:50:36 +09:00
Kumar Gala
bb03af637c
drivers: gpio: remove unused HAS_DTS_GPIO Kconfig symbol
...
All the gpio drivers are based on devicetree and thus we always set
HAS_DTS_GPIO, thus we don't need this Kconfig option anymore. Remove
uses as its safe to assume DTS is supported for GPIO.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-10 09:47:31 +02:00
Chay Guo
08641f0616
driver: sensor: mcux_acmp: add discrete mode
...
The ACMP on i.MXRT11xx support discrete mode,
updated the driver to support discrete mode configuration.
Signed-off-by: Chay Guo <changyi.guo@nxp.com>
2022-06-09 11:30:49 +02:00
Maximilian Deubel
3530fc088b
ADXL362: Add DTS properties for low-power modes
...
This patch adds DTS properties for using wake-up mode
and the autosleep function to the ADXL362 driver.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2022-06-05 14:42:40 +02:00
Fabio Baltieri
e24314f10f
include: add more missing zephyr/ prefixes
...
Adds few missing zephyr/ prefixes to leftover #include statements that
either got added recently or were using double quote format.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-05-27 15:20:27 -07:00
Trent Piepho
094345629b
drivers/sensor: lsm6dso: Add support for lsm6dso32
...
This sensor is virtually identical to the lsm6dso. The only difference
is the accelerometer ranges are double those of the lsm6dso.
Use the same driver. The difference is detected by using "st,lsm6dso32"
as the first compatible entry, followed by "st,lsm6dso".
An bit flag in the existing accel_range config field is used to check if
the chip is the doubled range or not.
Signed-off-by: Trent Piepho <trent.piepho@igorinstitute.com>
2022-05-25 13:16:04 -07:00
Trent Piepho
5edd4221ad
drivers/sensor: lsm6dso: Refactor common config out of I2C/SPI macros
...
Move common settings out of the SPI and I2C instantiation macros and
into a common macro, which the aforementioned two macros can then use.
Signed-off-by: Trent Piepho <trent.piepho@igorinstitute.com>
2022-05-25 13:16:04 -07:00
Trent Piepho
c269692b1d
drivers/sensor: lsm6dso: Remove LE to CPU conversions
...
In ST HAL v2.00, the functions to get the raw sensors values, e.g.
lsm6dso_acceleration_raw_get(), convert from little-endian to CPU.
Previous versions of ST HAL didn't do this.
The conversion here in the driver is converting a second time. It's not
an issue on a LE system, the conversion is a no-op, but on a BE system
it would be broken.
Signed-off-by: Trent Piepho <trent.piepho@igorinstitute.com>
2022-05-25 13:16:04 -07:00