-
Notifications
You must be signed in to change notification settings - Fork 922
AD8366 Driver upstream update #3026
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
base: mirror_ci/jic23/iio/testing
Are you sure you want to change the base?
AD8366 Driver upstream update #3026
Conversation
378f2b8 to
df90254
Compare
573459b to
3982c2b
Compare
nunojsa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should still add your sob tag for Michael's patches. If you actually change them in any meaningful way you should add co-authored-by tag. See git log for examples
df90254 to
02e319f
Compare
7770c62 to
7dea437
Compare
c477eb9 to
289f20e
Compare
416107d to
4882618
Compare
nunojsa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second round
Documentation/devicetree/bindings/iio/amplifiers/adi,ad8366.yaml
Outdated
Show resolved
Hide resolved
4882618 to
d6de80f
Compare
This patch series modernizes the AD8366 amplifier/attenuator driver with several improvements and adds support for additional device variants. Device Support Expansion: - Adds support for HMC271 (legacy/obsolete part maintained in ADI tree) - Adds support for multiple digital step attenuators: - ADRF5720: 0.5 dB LSB, 6-Bit, Digital Attenuator, 9 kHz to 40 GHz - ADRF5730: 0.5 dB LSB, 6-Bit, Digital Attenuator, 100 MHz to 40 GHz - ADRF5731: 2 dB LSB, 4-Bit, Digital Attenuator, 100 MHz to 40 GHz - HMC1018A: 1.0 dB LSB GaAs MMIC 5-BIT DIGITAL ATTENUATOR, 0.1 - 30 GHz - HMC1019A: 0.5 dB LSB GaAs MMIC 5-BIT DIGITAL ATTENUATOR, 0.1 - 30 GHz Device Tree Support: - Adds device tree binding documentation - Adds device tree compatible strings for all supported devices # Describe the purpose of this series. The information you put here # will be used by the project maintainer to make a decision whether # your patches should be reviewed, and in what priority order. Please be # very detailed and link to any relevant discussions or sites that the # maintainer can review to better understand your proposed changes. If you # only have a single patch in your series, the contents of the cover # letter will be appended to the "under-the-cut" portion of the patch. # Lines starting with # will be removed from the cover letter. You can # use them to add notes or reminders to yourself. If you want to use # markdown headers in your cover letter, start the line with ">#". # You can add trailers to the cover letter. Any email addresses found in # these trailers will be added to the addresses specified/generated # during the b4 send stage. You can also run "b4 prep --auto-to-cc" to # auto-populate the To: and Cc: trailers based on the code being # modified. Signed-off-by: Rodrigo Alencar <[email protected]> --- b4-submit-tracking --- # This section is used internally by b4 prep for tracking purposes. { "series": { "revision": 1, "change-id": "20251121-iio-ad8366-update-56abac58bbca", "prefixes": [] } }
Add maintainers fragment for drivers/iio/amplifiers/ad8366.c Signed-off-by: Rodrigo Alencar <[email protected]>
Add device tree binding documentation for amplifiers and digital attenuators. This covers different device variants with similar SPI control. Signed-off-by: Rodrigo Alencar <[email protected]>
Some parts may consume enable GPIO to set serial mode (PS pin) or powerup the device (e.g. ADA4961's PWUP pin). Co-developed-by: Michael Hennerich <[email protected]> Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Rodrigo Alencar <[email protected]>
This patch adds support for following digital step attenuators: * HMC271A: 1dB LSB 5-Bit Digital Attenuator SMT, 0.7 - 3.7 GHz * ADRF5720: 0.5 dB LSB, 6-Bit, Digital Attenuator, 9 kHz to 40 GHz * ADRF5730: 0.5 dB LSB, 6-Bit, Digital Attenuator, 100 MHz to 40 GHz * ADRF5731: 2 dB LSB, 4-Bit, Digital Attenuator, 100 MHz to 40 GHz * HMC1018A: 1.0 dB LSB GaAs MMIC 5-BIT DIGITAL ATTENUATOR, 0.1 - 30 GHz * HMC1019A: 0.5 dB LSB GaAs MMIC 5-BIT DIGITAL ATTENUATOR, 0.1 - 30 GHz Co-developed-by: Alexandru Ardelean <[email protected]> Signed-off-by: Alexandru Ardelean <[email protected]> Co-developed-by: Michael Hennerich <[email protected]> Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Rodrigo Alencar <[email protected]>
Changes related to mutex handling: - use guard() from cleanup for mutex locking - replace mutex_init() for devm_mutex_init() Signed-off-by: Rodrigo Alencar <[email protected]>
Device resource managed simplified with: - voltage regulator managed internally by the device. - IIO device registration handled with devm_iio_device_register(). - removal of goto's from the probe function. - ad8366_remove() removed as it is not needed anymore. Also, dev_err_probe() is used to report probe errors with created local device pointer. Signed-off-by: Rodrigo Alencar <[email protected]>
Device-tree support achieved dropping the enum ID in favor of an extended chip info table: - gain step and number of channels moved to chip info - pack_code function added to describe how SPI buffer is populated With this, switch cases on the device type were dropped: - simplified read_raw and write_raw callbacks - number of channels retrieved from chip info in probe function Signed-off-by: Rodrigo Alencar <[email protected]>
1733322 to
439d0e8
Compare
76e2b67 to
12aeb0c
Compare
739b23a to
b7877f6
Compare
nunojsa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor stuff. Feel free to send the patches
| F: Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml | ||
| F: drivers/iio/adc/ad7780.c | ||
|
|
||
| ANALOG DEVICES INC AD8366 DRIVER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really related to the change but on the commit message replace: s/fragment/entry
| * HMC1119 0.25 dB LSB, 7-Bit, Silicon Digital Attenuator | ||
| * | ||
| * Copyright 2012-2019 Analog Devices Inc. | ||
| * Copyright 2012-2026 Analog Devices Inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could mention this change in the commit message
| .gain_max = 20500, | ||
| .gain_step = 253, | ||
| .num_channels = 2, | ||
| .pack_code = ad8366_pack_code, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that given that you're doing the above, you might be asked to ditch the array in favor of dedicated variables (that is the preferred way in IIO).
b7f2c5c to
0fd10c6
Compare
PR Description
This series modernizes the AD8366 amplifier/attenuator driver and adds support for additional device variants.
Device Tree Support:
PR Type
PR Checklist