aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/adc
AgeCommit message (Collapse)AuthorFilesLines
2024-08-03iio: adc: xilinx-xadc-core: use new '.masklength' accessorsNuno Sa1-3/+2
Make use of iio_get_masklength) and iio_for_each_active_channel() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-20-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: vf610_adc: make use of iio_get_masklength()Nuno Sa1-1/+1
Use iio_get_masklength() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-19-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ti-ads8688: make use of iio_for_each_active_channel()Nuno Sa1-3/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-18-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ti-ads131e08: make use of iio_for_each_active_channel()Nuno Sa1-1/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-17-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ti-ads124s08: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-16-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ti-adc12138: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-15-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ti-ads1298: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-14-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ti-ads1119: make use of iio_get_masklength()Nuno Sa1-2/+2
Use iio_get_masklength() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Reviewed-by: João Paulo Gonçalves <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-13-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ti-ads1015: make use of iio_get_masklength()Nuno Sa1-1/+1
Use iio_get_masklength() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-12-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ti-adc084s021: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-11-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ti-adc0832: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-10-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: stm32-dfsdm-adc: make use of iio_get_masklength()Nuno Sa1-1/+1
Use iio_get_masklength() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-9-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: stm32-adc: make use of iio_get_masklength()Nuno Sa1-2/+2
Use iio_get_masklength() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-8-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: rtq6056: make use of iio_for_each_active_channel()Nuno Sa1-1/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-7-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: rockchip_saradc: make use of iio_for_each_active_channel()Nuno Sa1-1/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-6-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: mt6360-adc: make use of iio_for_each_active_channel()Nuno Sa1-1/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-5-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: mcp3911: make use of iio_for_each_active_channel()Nuno Sa1-1/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-4-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: max1118: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-3-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: max1118: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-2-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: hx711: make use of iio_for_each_active_channel()Nuno Sa1-4/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-3-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: dln2-adc: use new '.masklength' accessorsNuno Sa1-5/+3
Make use of iio_get_masklength) and iio_for_each_active_channel() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-2-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: cc10001_adc: make use of iio_for_each_active_channel()Nuno Sa1-3/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-1-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ad7192: Add clock providerAlisa-Dariana Roman1-0/+92
Internal clock of AD719X devices can be made available on MCLK2 pin. Add clock provider to support this functionality when clock cells property is present. Signed-off-by: Alisa-Dariana Roman <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ad7192: Update clock configAlisa-Dariana Roman1-28/+63
There are actually 4 configuration modes of clock source for AD719X devices. Either a crystal can be attached externally between MCLK1 and MCLK2 pins, or an external CMOS-compatible clock can drive the MCLK2 pin. The other 2 modes make use of the 4.92MHz internal clock. Undocumented properties adi,int-clock-output-enable and adi,clock-xtal still supported for backward compatibility, but their use is highly discouraged. Use cleaner alternative of configuring external clock by using clock names mclk and xtal. Functionality of AD7192_CLK_INT_CO will be implemented in complementary patch by adding clock provider. Signed-off-by: Alisa-Dariana Roman <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: mcp3911: use devm_regulator_get_enable_read_voltage()David Lechner1-43/+16
This makes use of the new devm_regulator_get_enable_read_voltage() helper function to reduce boilerplate code in the MCP3911 ADC driver. The error message is slightly changed since there are fewer error return paths. An extra parameter is added to the config callback to avoid adding state that is not used outside of the probe() function. Signed-off-by: David Lechner <[email protected]> Reviewed-by: Marcus Folkesson <[email protected]> Link: https://patch.msgid.link/20240712-iio-regulator-refactor-round-3-v1-6-835017bae43d@baylibre.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-08-03iio: adc: ad4695: Add driver for AD4695 and similar ADCsDavid Lechner3-0/+746
This is a new driver for Analog Devices Inc. AD4695 and similar ADCs. The initial driver supports initializing the chip including configuring all possible LDO and reference voltage sources as well as any possible voltage input channel wiring configuration. Only the 4-wire SPI wiring mode where the CNV pin is tied to the CS pin is supported at this time. And reading sample data from the ADC can only be done in direct mode for now. Co-developed-by: Ramona Gradinariu <[email protected]> Signed-off-by: Ramona Gradinariu <[email protected]> Signed-off-by: David Lechner <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad7173: Fix incorrect compatible stringDumitru Ceclan1-5/+5
Wrong compatible strings are used for AD411x devices. Fix by adding the missing "adi," prefix. Fixes: 13d12e3ad12d ("iio: adc: ad7173: Add support for AD411x devices") Signed-off-by: Dumitru Ceclan <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad7606: remove frstdata check for serial modeGuillaume Stols3-29/+49
The current implementation attempts to recover from an eventual glitch in the clock by checking frstdata state after reading the first channel's sample: If frstdata is low, it will reset the chip and return -EIO. This will only work in parallel mode, where frstdata pin is set low after the 2nd sample read starts. For the serial mode, according to the datasheet, "The FRSTDATA output returns to a logic low following the 16th SCLK falling edge.", thus after the Xth pulse, X being the number of bits in a sample, the check will always be true, and the driver will not work at all in serial mode if frstdata(optional) is defined in the devicetree as it will reset the chip, and return -EIO every time read_sample is called. Hence, this check must be removed for serial mode. Fixes: b9618c0cacd7 ("staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4") Signed-off-by: Guillaume Stols <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad7606: switch mutexes to guardGuillaume Stols1-24/+15
Switching to guard simplifies the code and avoids to take care to unlock the mutex in case of premature return. Signed-off-by: Guillaume Stols <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad7606: fix standby gpio state to match the documentationGuillaume Stols1-2/+2
The binding's documentation specifies that "As the line is active low, it should be marked GPIO_ACTIVE_LOW". However, in the driver, it was handled the opposite way. This commit sets the driver's behaviour in sync with the documentation Fixes: 722407a4e8c0 ("staging:iio:ad7606: Use GPIO descriptor API") Signed-off-by: Guillaume Stols <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad7606: fix oversampling gpio arrayGuillaume Stols2-4/+5
gpiod_set_array_value was misused here: the implementation relied on the assumption that an unsigned long was required for each gpio, while the function expects a bit array stored in "as much unsigned long as needed for storing one bit per GPIO", i.e it is using a bit field. This leaded to incorrect parameter passed to gpiod_set_array_value, that would set 1 value instead of 3. It also prevents to select the software mode correctly for the AD7606B. Fixes: d2a415c86c6b ("iio: adc: ad7606: Add support for AD7606B ADC") Fixes: 41f71e5e7daf ("staging: iio: adc: ad7606: Use find_closest() macro") Signed-off-by: Guillaume Stols <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad9467: support new partsNuno Sa1-0/+101
Add support for new devices: * Analog Devices AD9652 16-bit 310 MSPS ADC; * Analog Devices AD9643 14-Bit, 170/210/250 MSPS ADC; * Analog Devices AD9649 14-bit 20/40/65/80 MSPS ADC. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad9467: don't allow reading vref if not availableNuno Sa1-6/+16
If there's only one possible scale, there's no way to change the Vref select in the device so avoid reading the register in ad9467_get_scale(). In this case, it makes no sense to provide the .read_available() callback nor allowing for writing the scale attribute. Note this is in preparation for supporting a new device that only has one possible scale. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad9467: add new chip_info variablesNuno Sa1-9/+29
Add new variables to the per chip info structure: * test_points: Number of valid test points for calibration; * has_dco_invert: Supports inverting DCO (Data clock output) polarity; * dco_en: Specicic mask to enable DCO delays. This is in preparation for supporting new parts with subtle differences in how to configure the hardware. Note that with the new test_points variable, we also add a new calib_map_size to 'struct ad9467_state' so we know our map size depending on how many test points we have and if we can run the calibration in the inverted state or not. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad9467: support multiple channels calibrationNuno Sa1-40/+75
The calibration process mixes the support for calibrating multiple channels with only having one channel. Some paths do have 'num_channels' into account while others don't. As of now, the driver only supports devices with one channel so the above is not really a problem. That said, we'll add support for devices with more than one channel, hence let's properly make the calibration process to work with it. Signed-off-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ti-tsc2046: simplify with cleanup.hKrzysztof Kozlowski1-17/+12
Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Oleksij Rempel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: max1363: simplify with cleanup.hKrzysztof Kozlowski1-21/+13
Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: at91: simplify with cleanup.hKrzysztof Kozlowski1-8/+5
Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad7280a: simplify with cleanup.hKrzysztof Kozlowski1-6/+4
Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad7091r8: Constify struct regmap_busJavier Carrasco1-1/+1
`ad7091r8_regmap_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <[email protected]> Reviewed-by: Marcelo Schmitt <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: at91_adc: make use of iio_for_each_active_channel()Nuno Sa1-3/+1
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]> Link: https://patch.msgid.link/20240702-dev-iio-masklength-private-v1-18-98193bf536a6@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad_sigma_delta: use new '.masklength' accessorsNuno Sa1-3/+3
Make use of iio_get_masklength) and iio_for_each_active_channel() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]> Link: https://patch.msgid.link/20240702-dev-iio-masklength-private-v1-17-98193bf536a6@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad799x: make use of iio_get_masklength()Nuno Sa1-1/+2
Use iio_get_masklength() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]> Link: https://patch.msgid.link/20240702-dev-iio-masklength-private-v1-16-98193bf536a6@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad7298: make use of iio_get_masklength()Nuno Sa1-1/+2
Use iio_get_masklength() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]> Link: https://patch.msgid.link/20240702-dev-iio-masklength-private-v1-15-98193bf536a6@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-29iio: adc: ad7266: make use of iio_get_masklength()Nuno Sa1-1/+2
Use iio_get_masklength() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]> Link: https://patch.msgid.link/20240702-dev-iio-masklength-private-v1-14-98193bf536a6@analog.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-25of: remove internal arguments from of_property_for_each_u32()Luca Ceresoli1-3/+1
The of_property_for_each_u32() macro needs five parameters, two of which are primarily meant as internal variables for the macro itself (in the for() clause). Yet these two parameters are used by a few drivers, and this can be considered misuse or at least bad practice. Now that the kernel uses C11 to build, these two parameters can be avoided by declaring them internally, thus changing this pattern: struct property *prop; const __be32 *p; u32 val; of_property_for_each_u32(np, "xyz", prop, p, val) { ... } to this: u32 val; of_property_for_each_u32(np, "xyz", val) { ... } However two variables cannot be declared in the for clause even with C11, so declare one struct that contain the two variables we actually need. As the variables inside this struct are not meant to be used by users of this macro, give the struct instance the noticeable name "_it" so it is visible during code reviews, helping to avoid new code to use it directly. Most usages are trivially converted as they do not use those two parameters, as expected. The non-trivial cases are: - drivers/clk/clk.c, of_clk_get_parent_name(): easily doable anyway - drivers/clk/clk-si5351.c, si5351_dt_parse(): this is more complex as the checks had to be replicated in a different way, making code more verbose and somewhat uglier, but I refrained from a full rework to keep as much of the original code untouched having no hardware to test my changes All the changes have been build tested. The few for which I have the hardware have been runtime-tested too. Reviewed-by: Andre Przywara <[email protected]> # drivers/clk/sunxi/clk-simple-gates.c, drivers/clk/sunxi/clk-sun8i-bus-gates.c Acked-by: Bartosz Golaszewski <[email protected]> # drivers/gpio/gpio-brcmstb.c Acked-by: Nicolas Ferre <[email protected]> # drivers/irqchip/irq-atmel-aic-common.c Acked-by: Jonathan Cameron <[email protected]> # drivers/iio/adc/ti_am335x_adc.c Acked-by: Uwe Kleine-König <[email protected]> # drivers/pwm/pwm-samsung.c Acked-by: Richard Leitner <[email protected]> # drivers/usb/misc/usb251xb.c Acked-by: Mark Brown <[email protected]> # sound/soc/codecs/arizona.c Reviewed-by: Richard Fitzgerald <[email protected]> # sound/soc/codecs/arizona.c Acked-by: Michael Ellerman <[email protected]> # arch/powerpc/sysdev/xive/spapr.c Acked-by: Stephen Boyd <[email protected]> # clk Signed-off-by: Luca Ceresoli <[email protected]> Acked-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
2024-07-04Merge tag 'iio-for-6.11b' of ↵Greg Kroah-Hartman35-888/+2310
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: IIO: 2nd set of new device support, features and cleanup for 6.11 The big one here is we finally have Paul Cercueil's (and others) DMA buffer support for IIO devices enabling high speed zero copy transfer of data to and from sensors supported by IIO (and for example USB). This should aid with upstream support of a range of higher performance ADCs and DACs. Two merges from other trees - spi/spi_devm_optimize used for simplification in ad7944. - dmaengine/topic_dma_vec to enable the DMABUF series. One feature with impact outside IIO. - Richer set of dev_err_probe() like helpers to cover ERR_PTR() cases. New device support ================== adi,ad7173 - Add support for AD4111, AD4112, AD4114, AD4115 and ADC4116 pseudo differential ADCs. Major driver rework was needed to enabled these. adi,ad7944 - Use devm_spi_optimize_message() to avoid a local devm cleanup callback. This is the example case from the patch set, others will follow. mediatek,mt6359-auxadc - New driver for this ADC IP found in MT6357, MT6358 and MT6359 PMICs. st,accel - Add support for the LIS2DS12 accelerometer ti,ads1119 - New driver for this 16 bit 2-differential or 4-single ended channel ADC. Features ======== dt-bindings - Introduce new common-mode-channel property to help handle pseudo differential ADCs where we have something that looks like one side of differential input, but which is only suited for use with a slow moving reference. adi,adf4350 - Support use as a clock provider. iio-hmwon - Support reading of labels from IIO devices by their consumers and use this in the hwmon bridge. Cleanup and minor fixes ======================= Treewide - Use regmap_clear_bits() / regmap_set_bits() to simplify open coded equivalents. - Use devm_regulator_get_enable_read_voltage() to replace equivalent opencoded boilerplate. In some cases enabled complete conversion to devm handling and removal of explicit remove() callbacks. - Introduce dev_err_ptr_probe() and other variants and make use of of them in a couple of examples driver cleanups. Will find use in many more drivers soon. adi,ad7192 - Introduce local struct device *dev and use dev_err_probe() to give more readable code. adi,adi-axi-adc/dac - Improved consistency of messages using dev_err_probe() adi,adis - Split the trigger handling into cases that needed paging and those that don't resulting in more readable code. - Use cleanup.h to simplify error paths via scoped cleanup. - Add adis specific lock helpers and make use of them in a number of drivers. adi,ad7192 - Update maintainer (Alisa-Dariana Roman) adi,ad7606 - dt-binding cleanup. avago,apds9306 - Add a maintainer entry (Subhajit Ghosh) linear,ltc2309 - Fix a wrong endian type. st,stm32-dfsdm - Fix a missing port property in the dt-binding. st,sensors - Relax whoami match failure to a warning print rather than probe failure. This enables fallback compatibles to existing parts from those that don't necessarily even exit yet. * tag 'iio-for-6.11b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (112 commits) iio: adc: ad7173: Fix uninitialized symbol is_current_chan iio: adc: Add support for MediaTek MT6357/8/9 Auxiliary ADC math.h: Add unsigned 8 bits fractional numbers type dt-bindings: iio: adc: Add MediaTek MT6359 PMIC AUXADC iio: common: scmi_iio: convert to dev_err_probe() iio: backend: make use of dev_err_cast_probe() iio: temperature: ltc2983: convert to dev_err_probe() dev_printk: add new dev_err_probe() helpers iio: xilinx-ams: Add labels iio: adc: ad7944: use devm_spi_optimize_message() Documentation: iio: Document high-speed DMABUF based API iio: buffer-dmaengine: Support new DMABUF based userspace API iio: buffer-dma: Enable support for DMABUFs iio: core: Add new DMABUF interface infrastructure MAINTAINERS: Update AD7192 driver maintainer iio: adc: ad7192: use devm_regulator_get_enable_read_voltage iio: st_sensors: relax WhoAmI check in st_sensors_verify_id() MAINTAINERS: Add AVAGO APDS9306 dt-bindings: iio: adc: adi,ad7606: comment and sort the compatible names dt-bindings: iio: adc: adi,ad7606: add missing datasheet link ...
2024-07-02iio: adc: ad7173: Fix uninitialized symbol is_current_chanJonathan Cameron1-1/+3
Move the definition down and make it a boolean that is initialized to false. Fixes: 13d12e3ad12d ("iio: adc: ad7173: Add support for AD411x devices") Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-01iio: adc: Add support for MediaTek MT6357/8/9 Auxiliary ADCAngeloGioacchino Del Regno3-0/+619
Add a driver to support reading the Auxiliary ADC IP found in the MediaTek MT6357, MT6358 and MT6359 Power Management ICs, featuring a different register layout, configuration reset and ADC reading sequence from the other already supported MediaTek SoC or PMIC (aux)ADC HW. This driver provides multiple ADC channels for system monitoring, such as battery voltage, PMIC temperature, PMIC-internal voltage regulators temperature, and others. Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-07-01Merge 6.10-rc6 into char-misc-nextGreg Kroah-Hartman2-2/+8
We need the char/misc/iio fixes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman <[email protected]>