Commit graph

84 commits

Author SHA1 Message Date
Daniel Leung
9f02eeadf8 serial: allow callback setting to be exclusive
Both the IRQ API and Asynchronous API support callback.
However, since they are both interrupt driven, having
callbacks on both API would interfere with each other
in almost all cases. So this adds a kconfig to signal
that the callbacks should be exclusive to each other.
In other words, if one is set, the other should not
be active. Drivers implementing both APIs have been
updated to remove the callbacks from the other API.
Though, this still leaves the option to disable
the kconfig and allows both APIs to have callbacks
if one desires.

Fixes #48606

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-18 11:13:02 +00:00
Mike Fikes
c59b04299f doc: isotp introduce CF abbreviation
Introduce the CF abbreviation as is done for
other abbreviations (like FF) before first use.

Signed-off-by: Mike Fikes <mike@fikesfarm.com>
2023-07-16 07:32:24 -04:00
Aaron Massey
e1401fcf5e emul: Add SBS Gauge emulator backend_api
In order to support easier setup of test scenarios with fuel gauge
emulators, we should expose an API that can change internal emulator state.

Add a minimal fuel gauge emulator backend API for setting the charging
current and voltage with a sample implementation in the emul_sbs_gauge with
an associated driver test.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-07-07 09:22:20 +02:00
Tomasz Bursztyka
1b51be4ba0 doc/pcie: Add basic entry for PCIe doxygen documentation
This has been missing so let's add it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-06-17 07:58:41 -04:00
Evgeniy Paltsev
f8803090ca dos: ARC: mark DSP AGU/XY extensions as supported on ARC EM
DSP AGU/XY extensions ARC EM processors are supported now in
Zephyr.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-06-16 11:10:52 -04:00
Benjamin Cabé
b7e23b88ce doc: pinctrl: fix link to ELC2021 slide deck
updated link to point to a working location.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé
46f7c044c0 doc: i2c: fixed non-working link to I2C spec
Fixed improperly formatted link to I2C spec.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé
21c1a61551 doc: peripherals: fix bad link to Display API
fixed incorrect link reference to Display API

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Andrei Emeltchenko
21f59903c7 doc: smbus: Correct SMBus documentation
Fix syntax errors in the documentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-06-01 18:04:58 -04:00
Carlo Caione
f5c66e9708 doc: Add barriers API docs
Add an entry to the barriers API in the docs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-05-31 06:15:32 -04:00
Jamie McCrae
71e7cf888d doc: api: Add auxdisplay as unstable API
Adds the new auxiliary display peripheral as an unstable API.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae
71e10e743c doc: hardware: peripheral: Add auxdisplay documentation
Adds base auxdisplay documentation.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Yuval Peress
5ab14730f5 sensors: Add async read/decode documentation
Add documentation about the new async read and decode APIs including
some rough examples.

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-26 11:04:54 -05:00
Gerard Marull-Paretas
5b049f35b5 doc: drop usage of numref
Usage of numfig=True option in conf.py significantly increases doc build
time. While it is a nice feature, it's not extensively used in Zephyr
documentation, so let's remove its usage in favor of faster doc builds.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-22 11:08:53 +02:00
Keith Short
a6af1dd43d docs: bc12: Update for charging mode operation
Add details for using charging mode and add the BC1.2 emulator API
information to the document.

Signed-off-by: Keith Short <keithshort@google.com>
2023-05-08 09:57:56 +02:00
Yuval Peress
d162bdb202 bbram: Add documentation
- Add doxygen group and improve documentation for bbram.h
- Add a bbram section under peripherals in the main doc/ directory

Fixes #55257

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-05 10:57:01 -05:00
Bjarki Arge Andreasen
84569f8f33 doc/hardware/peripherals/rtc.rst: Refine docs
Fixed spelling mistakes, added links in place of
highlighted text where appropriate and switched
unformatted blocks with bash commands to bash
code blocks.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-20 11:43:35 +02:00
Gerard Marull-Paretas
da9059bcf7 doc: regulators: improve introduction
Improve and update driver class introduction. Removed some outdated
information about on/off, mention PMICs, generalize *-supply properties,
etc.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-12 16:43:23 +02:00
Bjarki Arge Andreasen
ae36da516a boards/posix/native_posix: Add emulated RTC device driver
The emulated RTC device driver is used to emulate a real
RTC device. Note that it is not a replacement for the
native_rtc module, which is used to control simulated time,
get time from the host system, etc.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Bjarki Arge Andreasen
ac697d153d tests/drivers/rtc: Add unit tests for RTC devices
This test suite adds tests for the following:

- Setting and getting time
- Validating time is incrementing correctly
- Validating behavior of alarms with callback disabled
- Validating behavior of alarms with callback enabled
- Validating update callback

The test suite uses the devicetree  alias rtc to find
the device to test.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Bjarki Arge Andreasen
b557a1d711 include/drivers: Add RTC API header and handlers
This commit adds the rtc.h header file which contains
API functions for real-time-clocks, which are low power
devices which track and represent broken-down time.

It also changes one line of doxygen documentation in the
maxim_ds3132.h file to place it in its own group.

The handlers for use of the API from userspace is also
added with this commit.

The API is split into one mandatory section, setting and
getting time, and three optional sections, alarms, update
event callback, and clock calibration.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Keith Short
24d5bac58f docs: Add BC1.2 driver documentation
Add BC1.2 driver documentation landing page.

Signed-off-by: Keith Short <keithshort@google.com>
2023-03-30 17:34:36 -04:00
Andrei Emeltchenko
3a6f64b872 doc: edac: Update EDAC / IBECC documentation
Update EDAC documentation and add IBECC documentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-30 17:33:41 -04:00
Henrik Brix Andersen
4d9e131151 doc: peripherals: fuel_gauge: align title with the rest of the docs
Align the title for the fuel gauge peripheral API with the rest of the
documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-30 13:38:41 +00:00
Henrik Brix Andersen
281871ca4d doc: peripherals: sort ToC according to subpage titles
Sort the peripherals table of contents according to the titles of the pages
included.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-29 09:48:13 +00:00
Henrik Brix Andersen
0ae32479b7 doc: peripherals: unify title strings
Unify the peripheral documentation title strings to the format
"<class> [(acronym)] [Bus]".

Including both the full name of the peripheral class and an acronym makes
the documentation more user friendly as some of the acronyms are less
well-known than others.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-29 09:48:13 +00:00
Andrei Emeltchenko
90e6bf8e9f smbus: doc: Add Documentation for SMBus subsystem API
Add some basic documentation and API reference for SMBus.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Jamie McCrae
69cb35e3ac doc: Add retained memory API and mark as experimental
Adds the the retained memory API to the list and marks it as
experimental.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 15:02:09 +01:00
Fabio Baltieri
2815f96440 drivers: move gpio_keys from gpio to input
Port the gpio_keys_zephyr driver from the gpio subsystem with a
dedicated API to the input subsystem reporting input events.

Move the test as well, simplify the cases a bit since the API is simpler
now.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-14 17:15:09 -04:00
Dawid Niedzwiecki
2d0a784c41 subsys/mgmt/ec_host_cmd: rework Host Command support
Rework the Host Command support. It includes:
-change API to backend
-change a way of defining rx and tx buffers
-fix synchronization between the handler and backend layer
-simplify the HC handler

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-02-28 10:42:23 +01:00
Dawid Niedzwiecki
b2674a4b34 subsys/mgmt/ec_host_cmd: rename peripheral to backend
Follow naming pattern in the subsystems(logging or shell) and name
the layer between generic handler and peripheral driver "backend".

The name doesn't suit that well to the SHI backend, because there isn't
SHI API itself and the SHI interface is used only for the host
communication. So the backend code includes the peripheral driver itself.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-02-28 10:42:23 +01:00
Kush Nayak
40b6e65782 fix: doc: canbus: fix tx callback function name typo in code snippet
In the `can_send()` example code snippet, it passed the
`can_tx_callback_t` parameter as `tx_irq_callback` even though the
function name was previously defined in the snippet as `tx_callback`.
The parameter passed has been updated to `tx_callback` to maintain
consistency with existing code.

Signed-off-by: Kush Nayak <kushnayak123@gmail.com>
2023-02-24 09:13:33 +01:00
Gerard Marull-Paretas
a1e983fef0 drivers: pinmux: drop driver class
Pinctrl is the new pinmux.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-23 16:56:04 -05:00
Evgeniy Paltsev
c2f52a7548 ARC: doc overhaul for nSIM board (with few fixes to MWDT docs)
Completely rewrite nSIM board documentation with additional fixes
to ARC MWDT toolchain documentation.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-02-18 06:55:51 +09:00
Daniel Leung
e4903e0664 doc: release-notes/3.3: add bits on I3C
This adds a few bits on I3C subsystem.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-02-16 19:02:06 +09:00
Martin Jäger
fcf1170290 doc: peripherals: can: fix can_filter mask variable name
The member variable was renamed from id_mask to mask in #51361, but
the docs were not adjusted accordingly.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-02-16 19:01:30 +09:00
Jamie McCrae
d1c0f18e50 doc: board porting: Add runner requirements note
Add a note on requirements for runners that they be OS agnostic
and not assume a specific device or udev rule determines one
exact device.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-27 16:12:39 -08:00
Keith Short
f9adaca473 docs: Update emulator documentation
Update emulator documentation with a diagram and description for how to
use the .bus_api and ._backend_api parameters with EMUL_DT_DEFINE().

Signed-off-by: Keith Short <keithshort@google.com>
2023-01-27 01:01:06 +09:00
Keith Short
d2c598e784 docs: Add emulator API reference
Add the API reference section to the peripheral and hardware emulators
documentation.

Signed-off-by: Keith Short <keithshort@google.com>
2023-01-24 18:58:49 -08:00
Al Semjonovs
4858d995c6 gpio: Include GPIO_KEYS in documentation
Add gpio_keys_interface to GPIO documentation

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-01-04 10:36:00 +01:00
Carlo Caione
c464a962e1 cache: Add documentation
To disambiguate the Kconfig options available to the user.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-12-13 16:31:42 +00:00
Declan Snyder
62abf16530 doc: board porting: Add clarifications
Clarify:
- Board directory name does not need to match board name
- Give example of multi board directory

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-12-07 14:23:32 +00:00
Gerard Marull-Paretas
e0c8de1e39 drivers: regulator: fixed: simplify implementation
Remove regulator-fixed-sync specialization, create a single driver that
is always synchronous. The asynchronous part is rarely/never used, so
let's keep things simple for now.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-30 15:49:30 +01:00
Gerard Marull-Paretas
cfbff7896e dts: bindings: pinctrl: place pincfg-node props at root level
Since we can include other binding files at any level (child,
grand-child, etc.) it makes no sense to maintain two copies of pinctrl
props definitions (pincfg-node/pincfg-node-group). Instead,
pincfg-node.yaml defines props at root level, and it is included where
needed, either child-binding or grandchild-binding.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-24 09:36:20 +01:00
Aaron Massey
5fa1abf1cb fuel_gauge: Add basic stub API doc.
Add a short stub doc as a placeholder for future documentation on the fuel
gauge API.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2022-11-19 17:56:05 -05:00
Evgeniy Paltsev
85076baf7b ARC: update port status
Update ARC port status page about XY DSP support for EM (WIP)
and single-thread kernel support added.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-11-05 19:57:17 +01:00
Henrik Brix Andersen
f8a88cdb27 drivers: can: use flags fields for can_frame and can_filter structs
The can_frame and can_filter structs support a number of different flags
(standard/extended CAN ID type, Remote Transmission Request, CAN-FD format,
Bit Rate Switch, ...). Each of these flags is represented as a discrete bit
in the given structure.

This design pattern requires every user of these structs to initialize all
of these flags to either 0 or 1, which does not scale well for future flag
additions.

Some of these flags have associated enumerations to be used for assignment,
some do not. CAN drivers and protocols tend to rely on the logical value of
the flag instead of using the enumeration, leading to a very fragile
API. The enumerations are used inconsistently between the can_frame and
can_filter structures, which further complicates the API.

Instead, convert these flags to bitfields with separate flag definitions
for the can_frame and can_filter structures. This API allows for future
extensions without having to revisit existing users of the two
structures. Furthermore, this allows driver to easily check for unsupported
flags in the respective API calls.

As this change leads to the "id_mask" field of the can_filter to be the
only mask present in that structure, rename it to "mask" for simplicity.

Fixes: #50776

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Sam Hurst
76730da1a2 doc: add API documentation for USB-C VBUS Driver
This commit adds the USB-C driver API documentation in peripherals section
of the reference guide. The USB-C VBUS API is declared experimental.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00
Tomasz Moń
5c42b42116 doc: Add missing kconfig option prefix
Kconfig options have to be prefixed with :kconfig:option: in order to
appear as links in generated html output.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-13 13:16:06 -04:00
Erwan Gouriou
bd6a25a661 doc: porting: shields: Provide guidelines for nodelabel
In order to avoid device definitions conflicts when compiling shields
description with boards embedding similar devices, nodelabels of devices
in shield's devicetree file should differ from the nodelabels used in
board's devicetree file.
The form to be used was discussed in #50040 and agreed to be as
<device>_<shield_name>.

Update shields documentation to make it an explicit rule.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-10-03 10:16:57 +02:00