Commit Graph

51989 Commits

Author SHA1 Message Date
Joakim Andersson 9c62841b58 Bluetooth: controller: Update privacy to use new delayable work API
Update the implementation of controller based privacy to use the new
delayable work API for the RPA timer. Always use schedule for the
timer since RPAs should not be used more than the configured RPA
timeout.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Joakim Andersson b9ea5d9910 Bluetooth: host: Update RFCOMM to new delayable work API
Update RFCOMM to use the new delayable work API for the RTX host timer
used for disconnecting and idling.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Joakim Andersson 25f1ac2679 Bluetooth: samples: Update periodic_sync to new delayable work API
Update the periodic sync sample to use the new delayable work API
for blinking the LED.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Joakim Andersson 3554f83408 Bluetooth: samples: Update eddystone sample to new delayable work API
Update the eddystone sample to use th enew delayable work API for the
idle timer.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Joakim Andersson fab281fc00 Bluetooth: samples: Update central_iso sample to new delayable work API
Update the central_iso sample to use the new delayable work API for
sending ISO data.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Joakim Andersson 83dc781702 Bluetooth: host: Update ATT to use the new delayable work API
Update ATT to use the new delayable work API for the transaction
host timer.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Joakim Andersson 8e85259e7b Bluetooth: host: Update SMP to use new delayable work API
Update SMP to use the new delayable work API for the pairing procedure
host timer.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Joakim Andersson afc29f3a1c Bluetooth: host: Update L2CAP to use the new delayable work API
Update L2CAP to use the new delayable work API for the signaling
RTX host timer.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Joakim Andersson 597080204e drivers: Bluetooth: Update H5 driver to new delayable work API.
Update the Bluetooth H5 driver to use the new delayable work API.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Joakim Andersson 7a7afa570b Bluetooth: host: refactor SMP channel context layout
Refactor the SMP channel context to in order to simplify the memset of
the struct in smp_init. This makes the code easier to read, and easier
to add more structs that should not be reset by memset.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Joakim Andersson 52a21a9478 Bluetooth: host: Update RPA timer to new delayable work API
Update the RPA timer to the new delayable work API.
Checking for submitted RPA timer no longer needed with the schedule
function, which does not change the deadline.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-05 19:44:09 -04:00
Daniel Leung 845bf6dbd7 boards: set CONFIG_KERNEL_VM_OFFSET=0 on qemu_x86_virt
Since CONFIG_KERNEL_VM_OFFSET no longer needs to be the same as
CONFIG_SRAM_OFFSET, set it to zero to reclaim the hole in
virtual address space.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-05 19:42:25 -04:00
Daniel Leung 37672958ac x86: mmu: relax KERNEL_VM_OFFSET == SRAM_OFFSET
There was a restriction that KERNEL_VM_OFFSET must equal to
SRAM_OFFSET so that page directory pointer (PDP) or page
directory (PD) can be reused. This is not very practical in
real world due to various hardware designs, especially those
where SRAM is not aligned to PDP or PD. So rework those bits.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-05 19:42:25 -04:00
Anas Nashif 52398df7b6 doc: integrate dict logging into main logging section
This belong alongside other logging related documentation. No for this
to exist on its own.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-05 19:07:24 -04:00
Anas Nashif b3c107a432 samples: device_pm: include device_runtime.h
include the now relocated device_runtime.h.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-05 19:07:09 -04:00
Kumar Gala 5d97f8ce4c ci: Update to docker image v0.17.1
Update docker image to v0.17.1 to get SDK 0.13.0-alpha-1 to
allow testing of ARC64 as well as the SDK update to gcc-10.3 and
qemu 6.0.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-05 17:56:53 -05:00
Gerard Marull-Paretas 5bdcf710eb doc: release: document device PM changes
Add some explanation and details on the device PM changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 56f1a8ce98 pm: rename PM_DEVICE_GET/SET_POWER_STATE to PM_DEVICE_STATE_GET/SET
Adjust name to be consistent with device PM naming conventions.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 6633b05530 pm: move device_pm.c to device_runtime.c
File name should reflect what it contains.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 7988ab4a26 pm: rename device_set/get_power_state to pm_device_set/get
Make name consistent with other device PM APIs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 1e50e08bca pm: move device_set/get_power_state to pm/device.h
These are device PM APIs, so move them to the device PM API header.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas dbf46b3815 pm: rename device_pm_cb to pm_device_cb
Prefix all device PM functions/data structures with pm.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 7bfd3a11f3 device: rename device_pm_control to pm_control
Remove device_ prefix since it is redundant.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 570b43a70e pm: rename device_pm_state_str to pm_device_state_str
Prefix all device PM functions/data structures with pm.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas d31a9be27c pm: device: rename device_pm struct to pm_device
Prefix all PM related functions/structures with pm.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 2c7b763e47 pm: replace DEVICE_PM_* states with PM_DEVICE_*
Prefix device PM states with PM.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 2d39c01592 pm: deprecate power/power.h header
Generate a warning if included pointing to the new header.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 3863be02a5 drivers: replace power/power.h with pm/device.h
Drivers need access to the device PM API, so just include pm/device.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas ddfd27dbfb pm: replace power/power.h with pm/pm.h
Replace old header with the new one.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 5a4cdd24a0 tests: replace power/power.h with pm/pm.h
Replace old header with the new one.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 13f528bc59 kernel: replace power/power.h with pm/pm.h
Replace old header with the new one.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas b287725d41 samples: replace power/power.h with pm/pm.h
Replace old header with the new one.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 280ca7a632 arch: replace power/power.h with pm/pm.h
Replace old header with the new one.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas f61649b7ba soc: replace power/power.h with pm/pm.h
Replace old header with the new one.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas a23de40f15 doc: pm: update runtime API names
Replace with pm_device_* API.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas c524075780 pm: runtime: rename API with pm_device prefix
Use `pm_device_*` prefix for the device runtime PM API. This adds the
API to the `pm` namespace, making it clear part of the PM subsystem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas f69759d34a pm: rename CONFIG_PM_DEVICE_IDLE to CONFIG_PM_DEVICE_RUNTIME
Make naming clear on the purpose of this option.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas decc177e17 pm: runtime: return ENOSYS when not available
Zephyr policy is to use `-ENOSYS` when a functionality is not built.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 0aa3df06c2 pm: move private enum to source using it
`enum device_pm_state` is not used publicly, so move it to the source
using it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas ef91546a51 tests: power: move to pm folder
Adjust naming to make things more consistent.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 605a3d1a8a samples: pm: move to pm folder
Adjust naming to make things more consistent.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 99cbee3f16 pm: move power subsystem to pm
Adjust naming to make things consistent.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 25bb163dc2 pm: reorganize headers
- Move PM related APIs to `include/pm` so that it follows API `pm_`
  prefix namespace. In order to make transition easier
  `include/power/power.h` is kept pointing to `include/pm/pm.h`.
- Move most of device PM related content from `include/device.h` to
  `include/pm/device.h` and `include/pm/runtime.h`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Martí Bolívar 14a1145324 doc: samples: restore :maxdepth: 2
Commit 09ba258b05 changed the maxdepth
of the entire samples toctree to 4 from 2 while making a fix to the
tensorflow docs.

Unfortunately that makes the docs index page for the samples too long,
as there are a lot of samples. It's better to just link each one by
one and let the user click to the one they want to find out
information on building and running the sample. Since the individual
README for each sample is usually quite short; it's not a lot of
scrolling, and the per-sample toctree is already available in the
sidebar anyway.

Fix this issue with the index page by restoring the original maxdepth.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-05 18:32:15 -04:00
Martí Bolívar fdce0ec893 doc: samples: bme280: fix missing end of sentence
Looks like I forgot to finish a sentence. There's nothing really
special besides the top level requirement for an enabled node which is
mentioned at the top of the page. Add a reference to the bindings
index while we're here to make it clearer what such nodes contain.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-05 16:52:00 -05:00
Erwan Gouriou 07e5644ac6 drivers/pwm: stm32: Leftovers in clock_control conversion to dts
Fix omissions.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-05 16:51:02 -05:00
Erwan Gouriou 37d2227412 samples/drivers/watchdog: stm32: Configure bus using device tree
Move bus configuration to device tree.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-05 16:51:02 -05:00
Erwan Gouriou 13860524dd tests/drivers/spi: nucleo_g474re: Configure bus using device tree
Bus config should now be done using device tree.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-05 16:51:02 -05:00
Erwan Gouriou 7d21af4d39 tests/drivers/watchdog: stm32: Move bus config to dts
Bus frequency configuration should now be done using device tree.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-05 16:51:02 -05:00
Erwan Gouriou 02ce386d05 boards: nucleo_l152re: Explicitly set apb2-prescaler
This board clock configuration was relying on default Kconfig
value for APB2 value, and hence apb2 has not been converted
to device tree.
Explicit apb2 value in dts.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-05 16:34:37 -05:00