-
Notifications
You must be signed in to change notification settings - Fork 145
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
adrv9002 ensm improv #504
Open
nunojsa
wants to merge
5
commits into
main
Choose a base branch
from
staging/adrv9002-ensm-improv
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
adrv9002 ensm improv #504
Conversation
This file contains 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
With commit 54efaad ("plugins: adrv9002: constrain RSSI reads") a bug was introduced for TX ports since we stop checking, in the periodic update function, the ensm value in case the port is in pin mode. Therefore the widget was never being updated even if the RF state changed. Signed-off-by: Nuno Sa <[email protected]>
nunojsa
requested review from
cristina-suteu,
dNechita and
mhennerich
as code owners
September 6, 2024 14:34
I opened the PULL just for speeding review but please don't merge this before I do one last sanity test on real HW... |
If some port is in any other state than rf_enabled when the plugin initialized or a new profile is loaded, we still try to read the RSSI level which will fail. Hence, just skip that read if not in the proper state. Signed-off-by: Nuno Sa <[email protected]>
Change the argument 'ensm' to 'attr_name' as 'ensm' is specific to plugins like adrv9002. Hence use a generic name. Signed-off-by: Nuno Sa <[email protected]>
Check, at the plugin initialization, if the port enable mode is set to pin. If it is, change the ensm widget sensitivity in the same way we do it in save_port_en(). Signed-off-by: Nuno Sa <[email protected]>
There's now the possibility of still controlling the port RF enable state mode even if the port mode is set to pin. That's possible in case the driver is in control of the pin controlling the port. Hence, let's check if the driver supports that at the plugin initialization and act accordingly. To check it we do the following: 1) Move the port to pin mode if in spi mod;. 2) Change the RF state mode to rf_enabled; 3) If success, then we allow changing the RF state even in pin mode; Signed-off-by: Nuno Sa <[email protected]>
nunojsa
force-pushed
the
staging/adrv9002-ensm-improv
branch
from
September 11, 2024 15:14
67cdddf
to
5236df1
Compare
v2:
(now tested) |
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.
PR Description
This PT has a fix for updating the ensm when the port mode is set to pin. But the main feature being added is to allow to control the ensm even when in pin mode (given that the drivers allows us to do that)
PR Type
PR Checklist