The LSM9DS1 is a system-in-package featuring
a 3D digital linear acceleration sensor, a 3D digital angular rate
sensor and a 3D digital magnetic sensor.
This driver implements only the linear acceleration sensor and the
angular rate sensor, on the I2C bus.
This driver is without trigger support.
The driver is based on the stmemsc HAL.
link: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
This commit adds a new API function, `dai_ssp_dma_control_set`, to the
Intel SSP DAI driver. This function is designed to set DMA control
parameters specifically for the SSP interface.
The addition of this API function allows for more granular control of
DMA settings, which can be beneficial in scenarios where DMA
configuration needs to be modified independently of other DAI settings.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Refactor the TLV parsing code from the dai_ssp_parse_aux_data function
into a new, separate function called dai_ssp_parse_tlv. This change
improves the modularity of the code and allows for the TLV parsing logic
to be reused in other contexts where only TLV data needs to be parsed
without the entire configuration blob.
The new dai_ssp_parse_tlv function takes a pointer to the TLV data and
its length as parameters, enabling it to process a buffer containing
multiple TLV entries. The original dai_ssp_parse_aux_data function is
now simplified to prepare the TLV data and call the new parsing
function.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
The modem pipe APIs include synchronous calls to open/close,
which internally use a fixed timeout of 10 seconds. The timeout
should be configurable through the APIs, anywhere from K_NO_WAIT
to K_FOREVER.
This commit adds timeout parameters to the open/close APIs, and
updates in-tree usage of the open/close APIs to explicitly
provide the previously implicit timeout of 10 seconds.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
When dynamic fifo sizing is enabled the driver can assign fifo size
lower or equal to the reset value. Software must respect the maximum
sizes because fifo width registers are optimized during synthesis and
the larger values simply get discarded.
Use 16-bit values for FIFO depths because maximum FIFO depth the vendor
can configure the DWC2 otg is 32768.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Iface name which is used by native posix ethernet driver can only be
specified at compile-time. I wanted to run two instances of the same
program on native posix but did not want to make two separate builds only
to change the iface name. I have implemented getting the iface name from
command line.
Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
Update to enable CANXL_INT_RXSMB_OVER and
CAN_INT_ERR_FAST(ERR for CAN-FD).
Statistic CAN errors and count CAN TX and RX errors via
BCANXL that uses CANXL MRU to exchange informations with CAN host.
Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
This commit introduces the ability to set the CAN
interface from command-line. This is helpful
if we want to run multiple instances of the app
with different CAN interfaces without making
separate compilations for each instance.
Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
Remove address-of operator ('&') when assigning `init_fn`
function pointer in `DEVICE_DT_INST_DEFINE` macro.
This change aims to maintain consistency among the drivers in
`drivers/serial`, ensuring that all function pointer assignments
follow the same pattern.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
When using SPI-NOR SFDP autodeteection, the flash size printed to
the log is rounded to 1 MiByte. If flash is smaller than 1 MiByte
it is printed as 0 MiByte.
With this patch smaller flash sizes are printed in kiByte, for instance
512 kiByte is printed correctly.
Signed-off-by: Stefan Petersen <spe@ciellt.se>
The driver right now only allows inverting the input value, which can be
useful for differential channels but is quite confusing for single ended
ones. Implement a simple output inversion flag instead to make up for
that.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Initialise flashdisk devices in `POST_KERNEL` instead of `APPLICATION`.
This aligns with the other disk drivers, which are all `POST_KERNEL`,
and causes no problems as `disk_access_register` is a purely software
action and does not perform any operations on the underlying device.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Use `depends on DT_HAS_* default y` instead of `default y if DT_HAS_*`
as the driver depends on devicetree instance.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Sometimes, performing a rstact which will reset all devices during init
on the bus may not be ideal. Add a KConfig to easily turn off.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
When ubx_m10_ubx_cfg_rst is returning something negative there is a loop
in the code which in turn can easily turn into an endless loop if the
function is never returning something positive or zero.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
It's not allowed to sleep during initialization of driver as called by
bg_thread_main --> z_sys_init_run_level(INIT_LEVEL_POST_KERNEL)
--> do_device_init --> ubx_m10_init
There is no thread_base.timeout struct setup so far.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
ubx_m10_init_pipe is calling modem_backend_uart_init which in turn is
memsetting the backend data structure and thus also overwrites the work
queue function pointer in it.
Remove call to ubx_m10_init_pipe as data structures are already set up.
Tested with u-blox NEO M9N.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
The motion event handler is currently setup to always retrigger until
there's no more motion data from the sensor. Change that to only
retrigger if the motion pin is asserted when the handler has finished
running, this saves a bunch of unnecessary spi transactions.
Ideally this driver would use a level interrupt, but I'd rather avoid
that as that is unsupported by many gpio controllers.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Device drivers should not be calling `pm_device_runtime_enable` on
themselves, it should be left up to the application. If automatic
enablement is desired, `zephyr,pm-device-runtime-auto` exists as a
devicetree property.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The `pm_device_runtime_get` and `pm_device_runtime_put` functions work
correctly regardless of whether `PM_DEVICE_RUNTIME` is enabled or not.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The `count` semaphore was being used as an atomic counter, so replace
it with an atomic variable, which is a simpler solution and enables
removing the conditionals with `PM_DEVICE_RUNTIME`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The register offset definition of the I/O port Data Base Address
register (0x60, 0x61) and Command/Status Base Address register
(0x62, 0x63) are reversed. This commit fixes it to avoid confusion.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
The current implementation is such that if two or more events are
generated in quick succession, only one is handled. This would
have happened as follows.
At the beginning of the ISR, the contents of INTPEND are read.
Then, the ISR unconditionally clears all events that are set.
When two (or more) events are generated in rapid succession,
it may happen that by the time we enter the ISR, INTPEND is set
only for one event, but while we process the ISR, EVENTS_TRIGGERED
will be set for more than just that one event (more events are
generated).
By unconditionally clearing all events, we can potentially lose
all events that are generated during ISR processing.
This patch changes the ISR so that it only clears those events
that have a corresponding bit set in INTPEND at the time it is read.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
the dts binding of the ethernet-phy has the option
"no-reset" and the according driver already has the
right logic to make use of it, but unfortunately
the connection between them was missing.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Apparently, disabling the intterupt is not enough,
because without clearing the flag, some errors are occurring.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There were code paths that could have lead to divide by zero given an
invalid scale setting for accel or gyro. In practice this should be an
invalid setup even before getting to these conversion functions. The
conversion functions now better show all valid values are accounted for
by using CODE_UNREACHABLE in the default case.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Constify the config and reorder the data fields for better packing.
This reduces the RAM usage of `mipi_dbi_spi` by 20 bytes.
Signed-off-by: Michael Hope <mlhx@google.com>
Adds support for setting the number of conversion results that are
collected and averaged before updating the temperature register.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Perform the modulo operation on `bitpos` before using it. This should
make code slightly more clear.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>