The unit of spi_context's tx_len and rx_len is byte instead of frame.
Thus, in spi_context_update_tx(), the value of ctx->tx_len should be
reduced by (len * dfs).
Also to fix the update of ctx->tx_len in spi_context_update_rx().
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
Remove the auto setting of the external spi clock if its not there,
also fix the calculation of calucation the spi divisor value.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The PM Device callbacks is rather unimplemented. There currently is
no device agnostic clock management api (yet), and the pinctrl isn't
fully implemented in this driver. Remove it all.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
This adds the missing fifo config from the dts which was missed in
the initial revision. This also adds the spi rtio fallback api.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
This change would also solve that according to the C11 standard,
section 6.5, paragraph 4, the usage of bitwise operators on
signed integers is implementation defined.
Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
This driver currently only supports one instance of this timer and uses
it as the system clock. The instance is selected by being the first one
listed in DT in all places except sys_clock_driver_init() where it uses
the node label "systick_timer".
This driver should be fixed to correctly support multiple instances
of this timer, and the one used for the system timer should be selected
based on a flag or alias, not based on label.
For now simply use the 0th instance like everywhere else which removes
the need to have this node labeled a special way and makes no functional
changes to current users.
Signed-off-by: Andrew Davis <afd@ti.com>
Device can be considered enabled only after the Soft Disconnect bit is
cleared. Move the post enable quirk past the SftDiscon bit clear.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add support for getting to the lowest power mode when polling is
used with disable-rx property and interrupts are not used for
that UARTE. So far disabling of the UARTE peripheral was done in
the interrupt but in some cases interrupt may not be available
and in that case uart_poll_out shall wait until byte is transferred
and put UARTE into the lowest power state.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Rely on DT_ANY_INST_HAS_PROP_STATUS_OKAY to only build the
gpio handling code for reset pin if this is being used by
one or more instance of the device.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Increase the T4 delay after releasing the reset of the
sensor in order to avoid getting I2C communication issues
at initialization time.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Rely on DT_ANY_INST_HAS_PROP_STATUS_OKAY to only build the
gpio handling code for reset and powerdown pins if this is
being used by one or more instance of the device.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
reset and powerdown pins are optionals.
gpio_is_ready_dt should not be called in case of reset or
powerdown are not present.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Previously, I2S_MCUX_FLEXCOMM was expected to use the external
MCLK only but it's possible for I2S_MCUX_FLEXCOMM to be sourced
from other clocks like the audio_pll_clk, in which case the
driver needs to be able to get the current clock frequency
in order to properly set dividers for requested sample rate.
Signed-off-by: Mike J. Chen <mjchen@google.com>
User callback can be used to re-trigger the alarm.
In such case, copy current callback before it is overritten.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Handle each error individually.
Do not skip RX loop on first error.
Revise DMA buf size to CONFIG_NET_BUF_DATA_SIZE.
Signed-off-by: Adib Taraben <theadib@gmail.com>
Current ESP32 clock system is mixed with RTC labeling/registers,
but it doesn't implement a real-time clock (RTC) driver.
To avoid confusion and allow adding a proper RTC driver later,
this commit renames the existing RTC interface to CLOCK and make
it as a subsystem without any peripheral attached to it.
This better reflects its actual purpose as a general clock controller.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Since the __IO macro use has been removed, make the whole reg pointer
volatile. This is similar to what is done in the gpio-davinci driver.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
The USB CDC driver is unable to process any bulk IN transfers
after receiving spurious 'Clear Feature - Endpoint Halt' request
from host due to perpetual locked state caused by previously
scheduled transfer, that will never be finished, as the endpoint's state
is set to NAK. Fix by ignoring spurious request.
Signed-off-by: Piotr Ciura <piotr.ciura@hidglobal.com>
This commit adds the API for accessing VIRTIO devices, and adds a driver
for a VIRTIO PCIE device based on the newly added API.
This commit is based on the Virtual I/O Device (VIRTIO) Version 1.3
specification:
https://docs.oasis-open.org/virtio/virtio/v1.3/csd01/virtio-v1.3-csd01.pdf
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Reformat the MCP2515 driver files using clang-format and remove excessive
newlines between variable declarations.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Terminate the if...else if construct with an else block in order to adhere
to coding guidelines.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add a shim that allows using the nRF TDM
(Time division multiplexed audio interface) HAL by I2S Zephyr API.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Make the video software generator a devicetree node, which allows enabling
several instances, and select it as chosen { zephyr,camera = &... }; node.
It can be enabled via a `video-sw-generator` snippet.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Since QVGA resolution is currently not working in CSI, use VGA
as default resolution to avoid failing during the init of the
driver.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add possibility to use the gc2145 sensor in CSI mode by
adding the bus-type property in the device-tree.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Do not enable by default the DVP streaming to avoid conflict
with the introduction of the MIPI mode of the GC2145.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add a ctrl VIDEO_CID_LINK_FREQ to indicate to a sink
the frequency at which a device streams data over
CSI2. Since not all source device currently provide the
LINK_FREQ control, add a helper function to retrieve
it, with a fall-back by doing an approximate via the
PIXEL_RATE control.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
It's possible if a device is an i3c v1.0 spec, no hdr, no mxds,
no controller caps, and does not have a mrl nor mwl. It should
return 0 if it doesn't need to do anything.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add a workaround for NRF52 anomaly 78: "High current consumption when
using timer STOP task only. Use the SHUTDOWN task instead."
Signed-off-by: Sven Depoorter <svndepoorter@gmail.com>
During intensive testing, it was found that the clock should
be set the same way on all ACE platforms
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Some I2C peripherals like TI charger or gauge chips need support for I2C
clock stretching. This patch includes that and makes these modules
usable with I2C emulation over GPIO.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
If the BCR value is not set for ibi w/ payload, then it still
has a ibi length of 1 due to the MDB. Set the PL accordingly.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The reset may cause initialization issues because of a missing
ACK from the sensor. The error check for the I2C communication
is removed to avoid issues during the initialization.
Closes#89850
Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
Replace semaphores with proper atomic flags when used without
multithreading enabled.
Signed-off-by: Michal Kozikowski <michal.kozikowski@nordicsemi.no>
A recent change 9eeb60c improperly removed a critical line in the driver.
This commit replaces that line and moves an irq_lock to above any pin
value manipulation since the timing is sensitive with the DHT protocol.
This should also fix the timing issue 9eeb60c attempted to fix.
Signed-off-by: John Shelton <moosery@gmail.com>
Added support for tmc51xx uart support alongside the
existing spi support. The tmc51xx driver is now consolidated
into a dedicated folder.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
Now added pos_reached_mask for polling rampstat when
position reached event is not supported, for example,
with uart drivers. Consequently, when the position is
reached, the position is reached, and the event flag is
set active. Hence, an additional value is now introduced.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>