Skip to content

drivers/sensor/: lis2dux12: fix ODR setting #92641

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

avisconti
Copy link
Contributor

In lis2dux12_freq_to_odr_val, the loop through the array of possible ODR frequencies can break sooner than expected if power-mode is set to High Performance mode and the requested ODR is less than or equal to 25Hz.

Moreover, move the "odr |= 0x10" statement used for HP mode in the chip_api set_odr_raw() API, so that we enter the HP mode even when the ODR is set from DT only.

Fixes: #92393

Tested on x_nucleo_iks4a1 shield

In lis2dux12_freq_to_odr_val, the loop through the array of possible ODR
frequencies can break sooner than expected if power-mode is
set to High Performance mode and the requested ODR is less than or
equal to 25Hz.

Moreover, move the "odr |= 0x10" statement used for HP mode in the
chip_api set_odr_raw() API, so that we enter the HP mode even when the
ODR is set from DT only.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
@avisconti avisconti added bug The issue is a bug, or the PR is fixing a bug area: Drivers area: Sensors Sensors labels Jul 3, 2025
Copy link

sonarqubecloud bot commented Jul 3, 2025

@avisconti
Copy link
Contributor Author

I guess we can postpone this to v4.2.1 or directly v4.3.0

Copy link
Member

@ubieda ubieda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I didn't get to this sooner!

@danieldegrasse danieldegrasse added the backport-v4.2-branch Request backport to the v4.2-branch label Jul 15, 2025
@danieldegrasse danieldegrasse removed this from the v4.2.0 milestone Jul 15, 2025
@nashif nashif removed the bug The issue is a bug, or the PR is fixing a bug label Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Drivers area: Sensors Sensors backport-v4.2-branch Request backport to the v4.2-branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LIS2DUX12 setting incorrect ODR configuration
5 participants