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

[Backport v4.0-branch] drivers: sensor: lis2de12: fix read accel via spi #84515

Open
wants to merge 2 commits into
base: v4.0-branch
Choose a base branch
from

Conversation

zephyrbot
Copy link
Collaborator

@zephyrbot zephyrbot commented Jan 24, 2025

Backport cb60881~2..cb60881 from #84239.

Fixes #83794

The lis2de12 sensor driver spi interface was calling spi read api.
This leads to a single byte operation on reading acceleration data
which is a multi byte operation. Fix it by adding a call to spi read
incr api instead. Added a length check to handle both single and multi
byte read properly.

Signed-off-by: Mayank Narang <[email protected]>
(cherry picked from commit 7b062f5)
Added a length check in the spi write incr routine to handle both
single and multi byte write operations properly.

Signed-off-by: Mayank Narang <[email protected]>
(cherry picked from commit cb60881)
@zephyrbot zephyrbot added the Backport Backport PR and backport failure issues label Jan 24, 2025
@zephyrbot zephyrbot requested a review from avisconti as a code owner January 24, 2025 14:43
@zephyrbot zephyrbot added the area: Sensors Sensors label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Sensors Sensors Backport Backport PR and backport failure issues
Projects
Status: To do
Development

Successfully merging this pull request may close these issues.

5 participants