Unify the way the error code are tested:
- sl_status_t is an alias to an int. The compiler won't complain if an
int is assigned or compared to a sl_status_t. In the other hand,
"int" is well known to manage error code. So, just use "int"
everywhere.
- Always name the return code "ret"
- Unless it is meaningful, test the value of ret against 0
(SL_STATUS_OK is just a convoluted way to say 0).
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
siwx91x_wifi.c starts to contains to much code. Let' simplify it by
grouping all the station related functions in a separated file.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
siwx91x_wifi.c starts to contains to much code. Let's simplify it by
grouping all the power-save related functions in a separated file.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
siwx91x_wifi.c starts to contains to much code. Let' simplify it by
grouping all the Access Point related functions in a separated file.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
siwx91x_wifi.c starts to contains to much code. Let's simplify it by
grouping all the scan related functions in a separated file.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Functions in siwx91x_wifi_socket.h are not declared static. So it create
duplicated symbols if the file is included twice.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
This patch allows to link the request of the linklayer for a
temperature calibration to the temperature driver.
The linklayer will then adapt and trigger its calibration related to
the current temperature.
Signed-off-by: Romain Jayles <romain.jayles@st.com>
Adds a Kconfig for the STM32WBA associated BT configuration
The first configuration added is the possibility to activate the
calibration of the radio using the temperature
Signed-off-by: Romain Jayles <romain.jayles@st.com>
Support added for power domain regulation using TISCI added for
devices using the binding ti,sci-pm-domain.
This driver relies on the TISCI layer to make calls to the
device manager core to perform power management.
Signed-off-by: Dave Joseph <d-joseph@ti.com>
Change license owner to Prevas due to initially wrong owner due to company
mix-up during co-development.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
There were a lot of places where the return value was sum'ed up
which can be slightly easier to read, but can give an odd return
value in the end. This changes it to just return immediately if
an error is seen.
There was also runtime NULL checking of input arguments that are
rather programmer clown prevention. Change these to asserts.
The return value didn't have a consistant type through the file,
make it consistently an int.
This changes the name of the return value of fix_sign to be
signed_value differenating it from the ret name used elsewhere.
Use the sizeof(buffer) as the argument for reg reads and writes
rather than a hard number.
Some log messages ended with '\n'. Remove all these.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add configurations for setting the pad drive strength and the
interrupt active high/low and od/pp.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
There is a race condition where an interrupt can fire before the
drdy_handler is registered. The drdy_handler will tradionaly
callback the sample get clearing the interrupt... but if it's not
configured and NULL, the interrupt will stay forever latched. Read
the interrupt status to clear the interrupt flag allowing it to
trigger again.
Also, move the serial api function helpers in to the header
allowing them to be used from other c files.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Fix the oversampling value to be 1 from 0 for no oversampling to be
consistant with other sensor drivers.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add the attr_get api. Also rename functions where they implied
accelerometer to imply magnetometer.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
This driver supports the magnetometer in the ST lsm9ds1 sensor, on the
I2C bus.
This driver does not support the triggers.
This driver use the stmemsc HAL.
link: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Remember which DNS server was added by a source like DHCPv4 or v6
message. This will allow system to remove DNS servers that were added by
that source. Then when stopping for example DHCP, we can remove those
specific DNS servers and not leaving DNS servers hanging in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Pins can be configured to retain their config even when the power
domain they belong to is suspended. Update pinctrl_nrf to enable
retain only if the pin has been configured and is not in use
(pincnf is low-power/sleep), disable retain otherwise.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The usage of nrf_gpio_port_retain_disable/_enable, in cases where
the soc pins support retention, every pin must be
retained/unretained regardless of what power domain the pad is in.
This patch ensures retain is applied to all pins in all domains by
the gpio_nrfx device driver, not only pins specifically in the
fast_active_1 domain. Without this patch, pinctrl will correctly
retain pins, while gpio_nrfx will fail to unretain them when
again.
We no longer check the output state either, which was passed with
the flags arg of gpio_nrfx_gpd_retain_set() so this arg has been
removed.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The STM32MP13 clock control has set and clear registers
for the clocks. So clearing the set register won't have any effect.
Instead, we should write on the clear register.
Signed-off-by: Julien Racki <julien.racki@st.com>
The source code is missing the Receive enable in serial
poll-in function so the status flag will never become affect
and data will never be read
Add the RE write before checking for receive status flag
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
I2S driver support standard format, short/long sync, left/right justified.
Supporting 2 channels as a default.
Signed-off-by: Lewis Lee <llee@ambiq.com>
Fix STM32 WBA and H7 clock drivers to release the reference counter
added to access LSE configuration controllers once the clock is
configured. Keeping such an unbalanced access request is no more
needed since SoC functions manage reference counting of access requests.
Fixes issue 90942.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Use recently added SoCs functions to request access to SoC backup
domain resources These function use a reference counter to track these
request and ensure the resources are accessible as long as at least a
consumer requires access.
By the way, correct stm32_hsem.h header file inclusion that requires
brackets (<>) delimiters, not double quotes, as per convention on header
location.
Fixes issue 90942.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Use recently added SoCs functions to request access to SoC backup
domain resources These function use a reference counter to track these
request and ensure the resources are accessible as long as at least a
consumer requires access.
By the way, move inclusion of stm32_hsem.h header file after inclusion
of the LL header files and Zephyr header standard files.
Fixes issue 90942.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Use recently added SoCs functions to request access to SoC backup
domain resources These function use a reference counter to track these
request and ensure the resources are accessible as long as at least a
consumer requires access. When we're done accessing RTC registers and
other protected resource, release the access refcount.
By the way, simplify rtc_stm32_read() when COUNTER_NO_DATE is defined
that used a useless extra local variable.
By the way, correct stm32_hsem.h header file inclusion that requires
brackets (<>) delimiters, not double quotes, as per convention header
location.
Fixes issue 90942.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Use recently added SoCs functions to request access to SoC backup
domain resources These function use a reference counter to track these
request and ensure the resources are accessible as long as at least a
consumer requires access.
Fixes issue 90942.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
...when FIFO is empty"
This reverts commit 47e43d552e.
This is breaking sample.sensor.shell.pytest where characters
are either missing or repeated when printing to the console.
Originally this is just for RISC-V with PLIC interrupt
controller. That was made more general to avoid having arch
specific code in a generic driver. And now it is breaking
on non-RISC-V platforms. Note that the QEMU RISC-V boards
all have PLIC as interrupt controller and are passing sensor
shell pytest without this workaround. So this does not seem
to be an issue with PLIC and NS16550. So revert the commit
for now.
Fixes#92187
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When try to set twt, system will try to
get interface status firstly.
In shim driver, miss filling twt_capable field.
The twt_capable is set as false by default.
Failed to set twt because of incorrect
twt_capable.
Add enhance code to fill twt_capable field
in shim driver.
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
implements option to enable double endpoint buffer to improve throughtput
for non-control endpoints.
Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
Fix issues that Renesas RZ boards cannot run the below serial
samples properly with sci and scif.
- `samples/subsys/console/echo`
- `samples/subsys/shell/shell_module`
The modification is to make the callback invoked in tei interrupt.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
The CH32V003 has a 8 channel, 10 bit onboard ADC. Add an immediate
mode driver and the appropriate pinctrl bindings. Note that the
CH32V003 GPIO pins have both a floating input and an analogue input
mode, and the pinctrl is needed to put the pin in analogue mode.
Signed-off-by: Michael Hope <michaelh@juju.nz>
The WCH GPIO peripheral integrates with the EXTI and supports firing
interrupts when a GPIO pin changes.
Add optional support for firing a callback on rising edge, falling
edge, or both edges.
Tested on the `linkw` and the `ch32v006evt` using
`samples/basic/button`.
Signed-off-by: Michael Hope <michaelh@juju.nz>
The WCH External Trigger and Interrupt controller (EXTI) supports
between 8 and 22 lines where each line can trigger an interrupt on
rising edge, falling edge, or both edges. Lines are assigned to a
group, and each group has a separate interrupt. On the CH32V003/6,
there is one group of 8 lines, while on the CH32V208 there are
multiple groups with between one and six lines per group.
In the same way as the STM32 and GD32, define an EXTI driver that
configures the peripheral and an internal interface that can configure
individual lines.
Signed-off-by: Michael Hope <michaelh@juju.nz>