Commit Graph

8 Commits

Author SHA1 Message Date
Matthias Hauser 6975262047 drivers: sensor: correct scale in WSEN_ITDS driver
correct scale in WSEN_ITDS driver to overcome sign extension issues

Signed-off-by: Matthias Hauser <Matthias.Hauser@we-online.de>
2023-08-15 12:26:28 -05:00
Matthias Hauser ee5c998257 drivers: sensor: fetch all channels on WSEN_ITDS sensor
fetch all channels on WSEN_ITDS sensor

Signed-off-by: Matthias Hauser <Matthias.Hauser@we-online.de>
2023-07-31 09:29:16 -05:00
Maureen Helm a392d8727c drivers: sensor: wsen_itds: Store sensor trigger as a pointer
Fixes the wsen_itds sensor driver to store the user-supplied sensor
trigger as a pointer rather than a copy. This enables the trigger
handler to use CONTAINER_OF to retrieve a context pointer when the
trigger is embedded in a larger struct.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2023-04-08 18:38:02 +02:00
Kumar Gala 1f34441c2d drivers: sensor: wsen_itds: Update driver to use gpio_dt_spec
Move driver to use gpio_dt_spec for GPIO interrupt handling.  Since
the driver can support multiple instances its possible that some
have irq's in dts and some don't.  So we add a check in
itds_trigger_set to make sure we have a GPIO device if we are
trying to set a trigger.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-27 09:47:06 -05:00
Kumar Gala ce41b3c82f drivers: sensor: wsen_itds: 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-27 09:47:06 -05:00
Gerard Marull-Paretas fb60aab245 drivers: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all drivers to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:58:21 +02:00
Tomasz Bursztyka e18fcbba5a device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.

A coccinelle rule is used for this:

@r_const_dev_1
  disable optional_qualifier
@
@@
-struct device *
+const struct device *

@r_const_dev_2
 disable optional_qualifier
@
@@
-struct device * const
+const struct device *

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
Saravanan Sekar 9ac3c9d42a drivers: sensors: itds: Add support for WSEN-ITDS 3-axis accel sensor
Add support for wsen-itds 3-axis accel sensor, provides acceleration,
temperature data reading and supports configuring of output data rate,
operating mode and scale.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2020-07-20 12:45:56 +02:00