Reworked i2c_sam_twi driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h
We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Reworked i2c_sam_twi driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h
We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add pinctl support for the SAM TWI and TWIHS I2C devices. We update
the TWI and TWIHS I2C bindings to have pinctrl-0 bindings that are
expected to have 2 phandles to the TWCK & TWD pinctrl nodes.
The pinctrl nodes will have an 'atmel,pins' property that describes the
GPIO port, pin and periphal configuration for that pin.
We update sam*-pinctrl.dtsi files with all the various pin ctrl
configuration operations supported by the given SoC family. These
files are based on data extracted from the Atmel ASF HAL
(in include/sam<FAMILY>/pio/*.h).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add the following macro's to get clock info by name:
DT_CLOCKS_LABEL_BY_NAME
DT_CLOCKS_CELL_BY_NAME
DT_INST_CLOCKS_LABEL_BY_NAME
DT_INST_CLOCKS_CELL_BY_NAME
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Co-Authored-By: Marti Bolivar <marti.bolivar@nordicsemi.no>
We've had clocks in base.yaml but didn't have clock-names. Add it to
base.yaml with similar functionality to interrupt-names, reg-names, etc.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
During registration, first thing LWM2M does is trying to close a socket
indicated by sock_fd stored in its context. In case it is not
initialized to some invalid value (-1 in this case), LWM2M may close an
ambigous socket.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Given that nsim_em can run the tests instead of just building them as
with em_starterkit_em7d, make it a default platform instead of
em_starterkit_em7d to get most of the testing when nsim simulator is
installed on the developer machine.
Tests run are 1000x more useful than just building them, even if we do
not have a large installed base of nsim.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The parameter is integral milliseconds; K_NO_WAIT is not an acceptable
value to indicate no delay.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit adds the GCC `-mabi=lp64` flag to force the LP64 (64-bit
long and pointer) ABI, which is mandatory for running the Zephyr
AArch64 architecture port.
Note that this flag is, strictly speaking, not necessary in most cases
because the AArch64 GCC defaults to using the LP64 ABI. This flag is
required, however, if compiling Zephyr with a GCC that is configured
with `--with-abi=ilp32`, which makes ILP32 the default ABI.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
After #22013, bt_le_adv_param got additional fields which were passed to
the bluetooth API uninitialized in the BT Mesh module. This
zero-initializes the entire structure in all usages to avoid passing
uninitialized data now and in the future.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Following issue is addressed in this bugfix:
When using offloaded sockets with modem ublox_sara_r4,
the socket is only closed if it is in connected state
at the time of the function call. When using UDP sockets,
this leads to a socket never being closed.
Signed-off-by: Hans Wilmers <hans@wilmers.no>
Calculation of RSSI was done incorrectly for Sara U201.
When evaluating +CSQ command responses, the RSSI can be calculated
from the first value, which is <signal_strength>. Instead, the
RSSI was calculated from the second value, which is <qual>.
With the subsequent mapping to RSSI, this results in a wrong
value for RSSI.
This is now corrected by using value <signal_strength> to calculate
the RSSI.
Tested using Sara U201.
Signed-off-by: Hans Wilmers <hans@wilmers.no>
This commit references modem_pin() and modem_shell()
modem_pin(): use new gpio api
The existing pin driver does not respect gpio
configuration in device tree for active high / low
This commit allows for the device tree to determine the
active logic level.
modem_shell(): use correct string length
The ms_send macro uses iface.write() to send a string.
iface.write() requires the length of the string not the
size of the string.
This commit corrects the string length.
drivers: ublox-sara-r4: fix vint polling
This eliminates the implication that the enable and disable values can
be something other than 1 and 0, and fixes the code so it won't enter
an infinite loop if the GPIO read returns an error.
Signed-off-by: Steven Slupsky <sslupsky@gmail.com>
In order to avoid retransmissions from the peer's side
on active connection close, acknowledge the incoming FIN+ACK
in FIN_WAIT_1 state.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
We cannot directly use the local address in net_context when
registering the connection as it is not proper type. So create
temp address variable for that purposes.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Avoid dynamic allocations and all the issues if we run out of
memory, by placing the connection endpoint directly to TCP
connection struct.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When we build this driver with CONFIG_UART_ASYNC_API enabled we get the
following build error:
uart_sam0.c: In function 'uart_sam0_init':
uart_sam0.c:558:35: error: redefinition of 'dev_data'
558 | struct uart_sam0_dev_data *const dev_data = DEV_DATA(dev);
uart_sam0.c:498:35: note: previous definition of 'dev_data' was here
498 | struct uart_sam0_dev_data *const dev_data = DEV_DATA(dev);
Fix this be removnig the duplicate at line 558.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The params in the macro's were a bit confused in what was cell_name and
what was name. The order was correct and matched other _BY_NAME macros.
Rename the params to just 'name' and 'cell' to match other macro's and
fix any other minor issues associated with this confusion.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The macros should have been DMAS_CELL_ not DMAS_CELLS_ as this matches
the other devicetree macro naming convention.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Avoid entering an infinite loop when configuring the the NXP Kinetis
LPUART IRQ.
Fixes 9a65318a5b.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add support for multiple advertising set. Move the advertising state
flags to be per advertising set and loop over advertising sets instead
of looking up legacy advertiser set or handle 0.
Since it is not certain that the advertising set terminated event can
arrive directly after the connection complete event there is currently
a limitation that there can only be one local identity used by
connectable advertisers at a time. This guarantees that we know
the local identity being used in the connection complete event.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Only attempt to restart the background scanner in connection complete
event when the new connection is a master role connection or the
initiator was successfully canceled.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Enable enhanced connection complete when extended advertising has been
enabled. This event is mandatory if extended advertising is supported.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Runtime initialization failed to reset the lock field, causing
problems when the pipe object is located on a stack and passed by
reference to other code. Lacking an API for initializing a spinlock
by itself use the idiom from _K_PIPE_INITIALIZER().
To simplify maintainability the initialization order is changed
slightly to match the structure field declaration order.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Update documentation about IC variations. Now SoC supports both
variations A and B and this board is compatible with both.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Update documentation about IC variations. Now SoC supports both
variations A and B and this board is compatible with both.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Bug fix and improved `payload` handling in `http_client_req`.
Changes to `http_client_req` behaviour:
If the user provides `payload_len` it is used to generate the
`Content-Length` header. This is done even if `payload_cb` is used to
provide the actual data. If no `payload_len` is specified then no
`Content-Length` is generated.
If `payload_cb` is provided it is called to send the payload data.
Otherwise `payload` is used as the payload buffer and sent. If
`payload_len` is not zero, it is used as the size of `payload`.
Otherwise `payload` is assumed to be a string and `strlen` is used to
determine its size. This is to maintain current behaviour and not break
existing samples.
Fixes#24431
Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
Convert driver to use new DT_INST macros throughout. Removed per
instance Kconfig symbols and replaced with DT_NODELABEL references
where needed.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Replace use of Kconfig UART_X symbols by calls to DT API.
Clean driver from symbols definitions
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Convert driver to use new DT_INST macros throughout. We can remove
various defines from dts_fixup.h now as well.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert driver to use new DT_INST macros throughout. We remove the
aliases and use nodelabel instead in the soc_gpio.h to determine the
label for the specific gpio controller.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>