Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparator driver fromtree #2132

Merged
merged 21 commits into from
Oct 30, 2024

Conversation

bjarki-andreasen
Copy link
Contributor

@bjarki-andreasen bjarki-andreasen commented Oct 17, 2024

Import comparator drivers, API and test suites from upstream, including manifest update of hal_nordic with fix for lpcomp

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Oct 17, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@bjarki-andreasen
Copy link
Contributor Author

@carlescufi

@bjarki-andreasen
Copy link
Contributor Author

@hubertmis

Add comparator API header.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 00cefa1)
Add top level CMakeLists.txt entry and Kconfig options along with
userspace handlers for comparator API.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 211bdd9)
Adjust comparator nodes of nrf SoCs to exclude the unused
io-channel-cells property and simplify the comment describing how
to configure the comparator hardware block as COMP or LPCOMP for
SoCs which support this.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit ffbda1b)
Add nRF COMP device driver and remove deprecated bindings from
dts/bindings/sensor.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 4adc924)
Add comparator build_all test suite designed to test multiple
devicetree overlays and boards for each comparator device driver.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 13af5ca)
Add nRF LPCOMP device driver.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 04e70ab)
Add nrf_lpcomp to build_all comparator test suite.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit a4fce33)
The mcux_acmp will get support by the comparator subsystem. To avoid
namespace clashes, namespace the driver, kconfigs and use the
MCUX_ACMP config solely to select the MCUX SDK driver.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit e0363f2)
…pt driver

Update the devicetree binding for the nxp,kinetis-acmp comparator and
move the binding to dts/bindings/comparator.

The update to the binding includes:
- Remove unused io-channel-cells property
- Remove unused sensor-device include
- Adding missing properties dac config, discrete mode config, and
  input configs.
- Rename properties to exclude redundant vendor prefix since props in
  this binding are not inhereted, and as such, don't need to be
  namespaced.
- Deprecate the old names of the renamed properties

The sensor based device driver has been updated to support both the
deprecated and new property names. This allows it to use both
nxp,enable-sample and filter-enable-sample for example.

Additionally, remove the unused io-channel-cells properties from
in-tree nodes of compatible = "nxp,kinetis-acmp"

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 4e55597)
…-acmp props

Add entyr mentioning the deprecation of the nxp, prefixed properties
in the nxp,kinetis-acmp dts binding.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 3b08a08)
Add mcux SDK based kinetis acmp device driver implementing the
comparator device driver API.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit d37f844)
Add mcux_acmp device driver to build_all test suite.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 6ed855a)
Add shell for comparator device drivers.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit b7648f8)
Add fake comparator driver and bindings for use with testing.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 2fbe105)
Add test suite for comparator device driver shell.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 4ff9886)
Add documentation for the comparator peripheral and shell.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 183e58b)
Added comparator support to release notes for release 4.0

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 43f88ca)
Add entry for comparator drivers

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit e40fa89)
The comparator drivers area contains the following incorrect area:

files:
  - include/zephyr/dt-bindings/clock/

and contains the following duplicate area:

files:
  - include/zephyr/drivers/comparator/

this commit removes them.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 1635d77)
Add test suite which uses GPIO loopback to produce a "very low" and
"very high" voltage at the positive input of the comparator using the
output of a GPIO. The negative input is set to a voltage between the
high and low output voltages of the GPIO using whichever internal
reference is available to the comparator.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 3272db8)
Change integration_platform -> platform_allow to not build the
shell test suite for all supported boards.

Upstream PR: zephyrproject-rtos/zephyr#80049

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 0502189)
@rlubos rlubos merged commit 8a776b3 into nrfconnect:main Oct 30, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants