linux-v6.12.y-2026r1 : ad4052 backport for release branch#3187
Draft
gastmaier wants to merge 13 commits intoxlnx/release/linux-v6.12.y-2026r1from
Draft
linux-v6.12.y-2026r1 : ad4052 backport for release branch#3187gastmaier wants to merge 13 commits intoxlnx/release/linux-v6.12.y-2026r1from
gastmaier wants to merge 13 commits intoxlnx/release/linux-v6.12.y-2026r1from
Conversation
This helper converts the given bits per word to bytes. The result
will always be power-of-two, e.g.,
=============== =================
Input (in bits) Output (in bytes)
=============== =================
5 1
9 2
21 4
37 8
=============== =================
It will return 0 for the 0 input.
There are a couple of cases in SPI that are using the same approach
and at least one more (in IIO) would benefit of it. Add a helper
for everyone.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250417152529.490582-2-andriy.shevchenko@linux.intel.com
Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Add dt-bindings for AD4052 family, devices AD4050/AD4052/AD4056/AD4058, low-power with monitor capabilities SAR ADCs. Each variant of the family differs in speed and resolution, reflected in word size and frequency for SPI messages. The device contains one input (cnv) and two outputs (gp0, gp1). The outputs can be configured for range of options, such as threshold and data ready. The spi-max-frequency refers to the configuration mode maximum access speed. The ADC mode speed depends on the vio input voltage. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
This adds a new page to document how to use the ad4052 ADC driver. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
66e3542 to
54bc53d
Compare
The AD4052/AD4058/AD4050/AD4056 are versatile, 16-bit/12-bit, successive approximation register (SAR) analog-to-digital converter (ADC) that enables low-power, high-density data acquisition solutions without sacrificing precision. This ADC offers a unique balance of performance and power efficiency, plus innovative features for seamlessly switching between high-resolution and low-power modes tailored to the immediate needs of the system. The AD4052/AD4058/AD4050/AD4056 are ideal for battery-powered, compact data acquisition and edge sensing applications. Signed-off-by: Jorge Marques <jorge.marques@analog.com> Changes: - PM_RUNTIME_ACQUIRE -> pm_runtime_resume_and_get
Explain the AD4052 support for the SPI Engine Offload. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Support SPI offload with appropriate FPGA firmware. Since the SPI-Engine offload module always sends 32-bit data to the DMA engine, the scantype.storagebytes is set to 32-bit and the SPI transfer length is based on the scantype.realbits. This combination allows to optimize the SPI to transfer only 2 or 3 bytes (depending on the granularity and mode), while the number of samples are computed correctly by tools on top of the iio scantype. Signed-off-by: Jorge Marques <jorge.marques@analog.com> Changes: - MODULE_IMPORT_NS : Remove quotes from "IIO_DMAENGINE_BUFFER"
Explain the AD4052 monitoring support by exposing as an IIO event. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
The AD4052 family supports autonomous monitoring readings for threshold crossings. Add support for catching the GPIO interrupt and expose as an IIO event. The device allows to set either, rising and falling directions. Only either threshold crossing is implemented. Signed-off-by: Jorge Marques <jorge.marques@analog.com> Changes: - PM_RUNTIME_ACQUIRE -> pm_runtime_resume_and_get - ad4052_write_event_config.state : bool -> int
Explains the GPIO controller support with emphasis on the mask depending on which GPs are exposed. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
When gp0 or gp1 is not taken as an interrupt, expose them as GPO if gpio-contoller is set in the devicetree. gpio-regmap is not used because the GPO static low is 'b101 and static high is 0b110; low state requires setting bit 0, not fitting the abstraction of low=0 and high=mask. Signed-off-by: Jorge Marques <jorge.marques@analog.com> Changes: - ad4052_gpio_set : int -> void
dd entry for the AD4052 driver. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Add device tree for using AD4050 on CoraZ7. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Add device tree for using AD4052 on CoraZ7. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
54bc53d to
bb158fc
Compare
8 tasks
This file contains hidden or 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
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
Backports ad4052.c from linux 7.0 (not upstream) to 6.12.
Changes needed are added as fixup commits with clean autosquash.
Pre-autosquash edition: 54bc53d
PR Type
PR Checklist