Skip to content

Conversation

@nunojsa
Copy link
Collaborator

@nunojsa nunojsa commented Aug 4, 2025

PR Description

This collects some upstream fixes that I noticed were missing when doing the 6.12 merge.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly (if there is the case)

spectrum70 and others added 4 commits August 4, 2025 15:18
Clear reset status flag, to keep error status register clean after reset
(ad3552r manual, rev B table 38).

Reset error flag was left to 1, so debugging registers, the "Error
Status Register" was dirty (0x01). It is important to clear this bit, so
if there is any reset event over normal working mode, it is possible to
detect it.

Fixes: 8f2b548 ("drivers:iio:dac: Add AD3552R driver support")
Signed-off-by: Angelo Dureghello <[email protected]>
Link: https://patch.msgid.link/20250125-wip-bl-ad3552r-clear-reset-v2-1-aa3a27f3ff8c@baylibre.com
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
(cherry picked from commit e17b9f2)
Apply a mask to the raw value received over the SPI bus for unsigned
direct reads. As we found recently, SPI controllers may not set unused
bits to 0 when reading with bits_per_word != {8,16,32}. The ad7944 uses
bits_per_word of 14 and 18, so we need to mask the value to be sure we
returning the correct value to userspace during a direct read.

Fixes: d1efcf8 ("iio: adc: ad7944: add driver for AD7944/AD7985/AD7986")
Signed-off-by: David Lechner <[email protected]>
Reviewed-by: Nuno Sá <[email protected]>
Link: https://patch.msgid.link/20250505-iio-adc-ad7944-max-high-bits-on-direct-read-v1-1-b173facceefe@baylibre.com
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
(cherry picked from commit 7cdfbc0)
The sinc4 filter has a factor 0.23 between Output Data Rate and f_{3dB}
and for sinc3 the factor is 0.272 according to the data sheets for
ad7124-4 (Rev. E.) and ad7124-8 (Rev. F).

Fixes: cef2760 ("iio: adc: ad7124: add 3db filter")
Signed-off-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Marcelo Schmitt <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
(cherry picked from commit 8712e49)
There are several issues with the function that implements writing to
the filter_low_pass_3db_frequency property:

 - The sinc3 factor should be 0.272 not 0.262 (this is fixed for the
   reading side in the previous patch).
 - For freq > 1 the if condition is always true so the sinc4 filter is
   hardly ever chosen.
 - In the nearly always taken if branch the filter is set to sinc3, but
   the frequency is set for sinc4. (And vice versa in the else branch.)

This is broken enough to justify the claim that there isn't any serious
user. Also it it counter-intuitive that setting the 3db frequency
modifies the sample frequency and the filter type.

So drop the ability to write that property.

Signed-off-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Marcelo Schmitt <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
(cherry picked from commit 7dd17a4)
Copy link
Contributor

@gastmaier gastmaier left a comment

Choose a reason for hiding this comment

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

warnings unrelated to changed lines

@nunojsa nunojsa merged commit d85c45f into main Aug 6, 2025
18 of 19 checks passed
@nunojsa nunojsa deleted the staging/backports branch August 6, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants