Commit graph

51372 commits

Author SHA1 Message Date
Daniel Leung c8177ace3a kernel: work: handler null check is to NULL...
...instead of numeric zero.

Current usage is violation of MISRA rule 11.9.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-29 07:16:37 -04:00
Daniel Leung 143a18b36b lib: os: assign sys_notify callback default to NULL...
...instead of numeric zero.

Current usage violates MISRA rule 11.9.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-29 07:16:37 -04:00
Daniel Leung 0773441422 kernel: device: return NULL for pointer type
Return NULL instead of return numeric zero for pointer type.

Current usage violates MISRA rule 11.9.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-29 07:16:37 -04:00
Daniel Leung abfe045fd3 kernel: userspace: rename obj_list in struct dyn_obj
This renames the obj_list element in struct dyn_obj to
dobj_list, to avoid identifier collision with the static
obj_list defined in userspace.c.

Violation of MISRA rule 5.9.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-29 07:16:11 -04:00
Jennifer Williams 3e28a570c2 arch: x86: core: pcie: rephrase use of ain't
Rephrasing away from ain't, which is informal, uncommon, and can
be viewed as substandard or 'slang'.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-29 07:15:50 -04:00
Jennifer Williams b773ec1675 lib: os: cbprintf_complete: fix typo in cbvprintf width comment
This commit fixes a subtle typo - width instead of with.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-29 07:14:39 -04:00
Gerard Marull-Paretas e6248db31d doc: releases: add notes on device_pm_control_nop removal
Add details on the removal of device_pm_control_nop.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas cc6c9086de pm: deprecate device_pm_control_nop
All in-tree usage has been replaced with `NULL`, so flag it as
deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas 70fc2dc8f8 doc: remove references to device_pm_control_nop
Remove it from examples and from PM reference.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas d51acd4e88 drivers: gpio: cy8c95xx: remove usage of device_pm_control_nop
Replace usage of deprecated device_pm_control_nop with NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas 29733a8692 drivers: gpio: gpio_mmio32: remove usage of device_pm_control_nop
Replace usage of deprecated device_pm_control_nop with NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas d5fc40e748 samples: out_of_tree_driver: remove usage of device_pm_control_nop
Replace usage of deprecated device_pm_control_nop with NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas c1dd09819b samples: prod_consumer: remove usage of device_pm_control_nop
Replace usage of deprecated device_pm_control_nop with NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas 6610c0ce59 samples: net: virtual: remove usage of device_pm_control_nop
Remove usage of deprecated device_pm_control_nop with NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas 93774a4f84 net: remove references to device_pm_control_nop
Remove it from docstrings.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas a7e4ae5976 lib: os: reboot: misc cleanup
Remove redundant includes and out-of-date comment.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:34:00 -04:00
Gerard Marull-Paretas 2ec53e99e3 doc: releases: add notes on reboot header location change
Inform about the reboot header location changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:34:00 -04:00
Gerard Marull-Paretas 39d3d397ae power: provide old reboot header for compatibility
Make out-of-tree applications transition easier by providing the same
header as before pointing to the new one. Once Zephyr modules are also
migrated this header should produce a deprecation warning if included.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:34:00 -04:00
Gerard Marull-Paretas f163bdb280 power: move reboot functionality to os lib
Reboot functionality has nothing to do with PM, so move it out to the
subsys/os folder.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:34:00 -04:00
Sam Hurst 0f19812ce0 boards: arm: add support for STM32G071B Discovery board
Support the ST STM32G071B Discovery board with STM32G071RBTX SoC

Tested with:
    - `samples/basic/blinky`
    - `samples/basic/button`

Flashed samples via On-Board ST-LINK with:
    - west flash

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2021-04-28 20:31:27 -04:00
Jennifer Williams be5a3777ca lib: os: add final else where missing in onoff, p4wq, sem
onoff, p4wq, and sem had several places missing final else
statement in the if else if construct. This commit adds
else {} to comply with coding guideline 15.7.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-28 20:28:19 -04:00
Jennifer Williams 9517b87d35 lib: os: add final else where missing in heap*
heap* had several places missing final else statement in the
if else if construct. This commit adds else {} to comply with
coding guideline 15.7.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-28 20:28:19 -04:00
Jennifer Williams 254dfd4aba lib: os: add final else where missing in cbprintf_*
cbprintf_* had several places missing final elsestatement in the
if else if construct. This commit adds else {} to comply with
coding guideline 15.7.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-28 20:28:19 -04:00
Daniel Leung b504f8b6a2 soc: x86/ia32: add missing curly braces in soc.h
The if-statement in soc/x86/ia32/soc.h is missing curly braces.
So add them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-28 18:45:15 -04:00
Erwan Gouriou 6f27412c5e include/drivers/clock_control: stm32: Fixup to ensure backward compat
In order to ensure backward compatibility, use the dts config
only if nodes have prop "clocks".

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-28 16:43:51 -04:00
Erwan Gouriou 15130c9a1f include/drivers/clock_control: stm32: Fix typo in LSE definition
Fix typo to enjoy expected LSE setting

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-28 16:43:51 -04:00
Erwan Gouriou 8f7ce4186a dts/arm/st: l4: Remove default pll configuration
Remove default pll settings to ensure pll users are correctly
configuring all prescalers on purpose and avoid surprises.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-28 16:43:51 -04:00
Gerard Marull-Paretas 2ca00a8aef drivers: regulator: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:43:29 -04:00
Gerard Marull-Paretas 3b18fe0af7 drivers: pwm: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:43:29 -04:00
Gerard Marull-Paretas 7d10f84ca9 drivers: ps2: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:43:29 -04:00
Gerard Marull-Paretas 26bca11dc8 drivers: pm_cpu_ops: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:43:29 -04:00
Gerard Marull-Paretas 693629ade3 drivers: pinmux: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:43:29 -04:00
Gerard Marull-Paretas 3aa700358b drivers: i2c: ite_it8xxx2: fix typo
Remove '&' from previous usage of `device_pm_control_nop`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:42:59 -04:00
Gerard Marull-Paretas 861eac31b8 drivers: dma: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:41:29 -04:00
Gerard Marull-Paretas 6b05c6e06e drivers: display: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:41:29 -04:00
Gerard Marull-Paretas 374d46c235 drivers: disk: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:41:29 -04:00
Gerard Marull-Paretas ed97e6d106 drivers: dac: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:41:29 -04:00
Daniel Leung e1fc809419 doc: add documentation for dictionary-based logging
This adds new documentation for dictionary-based logging on
usage and low-level information.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-28 22:25:42 +02:00
Daniel Leung ae55a73b7a samples: logging: add a sample app for dictionary-based logging
This adds a sample application on dictionary-based logging.
The README file includes instruction on how to run the log parser
to generate human readable log messages.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-28 22:25:42 +02:00
Daniel Leung 9b4ae26e70 logging: add UART backend for dictionary based logging
This adds a new UART backend for dictionary based logging,
where this can output binary data in both binary and
hexidecimal strings.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-28 22:25:42 +02:00
Daniel Leung a5ab1a7518 logging: add support for dictionary based logging
This adds dictionary based logging support. Dictionary based
logging is binary based where one big difference is that
static strings are stored as pointers instead of the whole
string. This results in reduced space requirements for
storing log messages in certain scenairos.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-28 22:25:42 +02:00
Daniel Leung 2c6da987cd lib/os: cbprintf_packaged: simplify rodata check
NIOS2 is using _image_rodata_start/_end in its linker script
to mark the boundaries of rodata. So they no loner need
special treatment.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-28 22:25:42 +02:00
Daniel Leung 990919fb89 logging: simplify is_rodata() for NIOS2, RISC-V and SPARC
NIOS2, RISC-V and SPARC are using _image_rodata_start/_end in
their linker scripts to mark the boundaries of rodata. So
they no loner need special treatment.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-28 22:25:42 +02:00
Daniel Leung 2bd871df2a sparc: add _image_rodata_start/end to linker script
This adds the _image_rodata_start and _image_rodata_end
symbols to SPARC's arch linker script.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-28 22:25:42 +02:00
Daniel Leung b23784bf7e nios2: add _image_rodata_start/end to linker script
This adds the _image_rodata_start and _image_rodata_end
symbols to NIOS2's linker script.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-28 22:25:42 +02:00
Gerard Marull-Paretas bf7a396538 drivers: sensor: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 15:30:03 -04:00
Emil Gydesen cc35750603 Bluetooth: ISO: Add missing handling of interval and latency of unidir
Adds missing handling of the m_interval and m_latency if tx QOS is
not set, and handling of the s_interval and s_latency if rx QOS is
not set.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-04-28 14:34:48 -04:00
Enjia Mai e53d549e21 tests: mem_protect: add a test case of adding memory partition
Add a test case to validate when adding a new partition into a memory
domain with over its maximum specified limit number, an assertion
failure happens.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-04-28 14:34:17 -04:00
Gerard Marull-Paretas 9de14e8596 kernel: flag isr-ok functions using funcprops
Replace old notes marking ISR safe functions with the recently
introduced funcprops.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 14:32:39 -04:00
Gerard Marull-Paretas 446432a9ac doc: doxygen: add support for function properties
Add aliases for setting function properties. A function may have 0, one
or more function properties. Example usage:

@funcprops \isr_ok, \async

These aliases will translate to API Terminology references when Doxygen
is rendered on Sphinx. On the Doxygen side they will just translate to
plain text.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 14:32:39 -04:00