se_services: zephyr: Add API for LPCMP configuration - #140
Merged
RupeshKumar-AlifSemi merged 1 commit intoAug 14, 2026
Merged
Conversation
Prabhakar-Alifsemi
requested review from
RupeshKumar-AlifSemi,
rajranjan-alifsemi,
silesh-alifsemi and
sudhir-alifsemi
August 12, 2026 10:12
sudhir-alifsemi
requested changes
Aug 14, 2026
sudhir-alifsemi
left a comment
Contributor
There was a problem hiding this comment.
Can you redo the formatting and make sure only the relevant changes are applied.
RupeshKumar-AlifSemi
requested review from
KimmoVaisanen-AlifSemi and
petrih-alifsemi
and
a lite review from Copilot
August 14, 2026 07:17
KimmoVaisanen-AlifSemi
previously approved these changes
Aug 14, 2026
There was a problem hiding this comment.
Pull request overview
This PR introduces a Zephyr-side SE service API to configure the low-power comparator (LPCMP) (and related power settings) through the Secure Enclave, keeping VBAT/LPCMP-related register access out of application code.
Changes:
- Add
se_service_configure_lpcmp()andse_service_power_settings_set()APIs and wire them into the SE service call path. - Extend the services protocol definitions with an LPCMP configuration service packet and a new service ID.
- Add an
lpcmp_configure_tconfiguration struct for callers.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| se_services/zephyr/src/se_service.c | Adds two new SE-backed service wrappers for LPCMP configuration and power-setting configuration. |
| se_services/zephyr/include/se_service.h | Exposes the new public Zephyr APIs and their documentation. |
| se_services/include/services_lib_protocol.h | Defines the LPCMP configuration service packet structure. |
| se_services/include/services_lib_ids.h | Adds a new application service ID for LPCMP configuration. |
| se_services/include/aipm.h | Adds lpcmp_configure_t used by the new API. |
Suppressed comments (1)
se_services/zephyr/src/se_service.c:1830
- The error log message is a copy/paste from the OTP service and will be misleading when the power-setting request fails. Log the current function/service instead.
if (err) {
LOG_ERR("service_read_otp failed with %d\n", err);
return err;
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Prabhakar-Alifsemi
dismissed
KimmoVaisanen-AlifSemi’s stale review
via
August 14, 2026 10:46
ed183f6
Prabhakar-Alifsemi
force-pushed
the
lpcmp-configure-se-service
branch
from
August 14, 2026 10:46
c8aff3e to
ed183f6
Compare
Prabhakar-Alifsemi
requested review from
KimmoVaisanen-AlifSemi and
sudhir-alifsemi
August 14, 2026 10:47
sudhir-alifsemi
requested changes
Aug 14, 2026
API is used to configure LPCMP VBAT related registers which should not be accessed by the application directly. Signed-off-by: Honkala Petri <petri.honkala@alifsemi.com>
Prabhakar-Alifsemi
force-pushed
the
lpcmp-configure-se-service
branch
from
August 14, 2026 11:11
ed183f6 to
5989b3d
Compare
sudhir-alifsemi
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API is used to configure LPCMP VBAT related registers which should not be accessed by the application directly.