aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio
AgeCommit message (Collapse)AuthorFilesLines
2024-03-30iio: adc: ad7944: use spi_optimize_message()David Lechner1-74/+103
This modifies the ad7944 driver to use spi_optimize_message() to reduce CPU usage and increase the max sample rate by avoiding repeating validation of the spi message on each transfer. Signed-off-by: David Lechner <[email protected]> Link: https://lore.kernel.org/r/20240328-ad7944-spi-optimize-message-v2-1-a142b2576379@baylibre.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-28iio: adc: ad7944: simplify adi,spi-mode property parsingDavid Lechner1-11/+10
This simplifies the adi,spi-mode property parsing by using device_property_match_property_string() instead of two separate functions. Also, the error return value is now more informative in cases where there was a problem parsing the property. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: David Lechner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-28iio: dac: ti-dac5571: Add DAC081C081 supportLaurent Pinchart1-0/+3
The DAC081C081 is a TI DAC whose software interface is compatible with the DAC5571. It is the 8-bit version of the DAC121C081, already supported by the DAC5571 driver. Extends the driver to support this chip. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sean Nyekjaer <[email protected] <mailto:[email protected]>> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-28iio: health: max30102: add support for max30101Javier Carrasco1-0/+2
The Maxim max30101 is the replacement for the max30105, which is no longer recommended for future designs. Their internal structure is identical, as well as the register map, configuration options and sensitivity, which allows for code recycling. Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-28iio: pressure: hsc030pa: Use spi_read()Christophe JAILLET1-6/+1
Use spi_read() instead of hand-writing it. It is less verbose. Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/8327ac591d244ac85aa83c01e559076159c7ba12.1711283728.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-28iio: pressure: BMP280 core driver headers sortingVasileios Amoiridis1-8/+8
Sort headers in alphabetical order. Signed-off-by: Vasileios Amoiridis <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-28iio: accel: mxc4005: Reset chip on probe() and resume()Hans de Goede1-0/+68
On some designs the chip is not properly reset when powered up at boot or after a suspend/resume cycle. Use the sw-reset feature to ensure that the chip is in a clean state after probe() / resume() and in the case of resume() restore the settings (scale, trigger-enabled). Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218578 Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-28iio: accel: mxc4005: Interrupt handling fixesHans de Goede1-7/+17
There are 2 issues with interrupt handling in the mxc4005 driver: 1. mxc4005_set_trigger_state() writes MXC4005_REG_INT_MASK1_BIT_DRDYE (0x01) to INT_MASK1 to enable the interrupt, but to disable the interrupt it writes ~MXC4005_REG_INT_MASK1_BIT_DRDYE which is 0xfe, so it enables all other interrupt sources in the INT_SRC1 register. On the MXC4005 this is not an issue because only bit 0 of the register is used. On the MXC6655 OTOH this is a problem since bit7 is used as TC (Temperature Compensation) disable bit and writing 1 to this disables Temperature Compensation which should only be done when running self-tests on the chip. Write 0 instead of ~MXC4005_REG_INT_MASK1_BIT_DRDYE to disable the interrupts to fix this. 2. The datasheets for the MXC4005 / MXC6655 do not state what the reset value for the INT_MASK0 and INT_MASK1 registers is and since these are write only we also cannot learn this from the hw. Presumably the reset value for both is all 0, which means all interrupts disabled. Explicitly set both registers to 0 from mxc4005_chip_init() to ensure both masks are actually set to 0. Fixes: 79846e33aac1 ("iio: accel: mxc4005: add support for mxc6655") Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: ad7944: Add support for "3-wire mode"David Lechner1-18/+139
This adds support for AD7944 ADCs wired in "3-wire mode". (NOTE: 3-wire is the datasheet name for this wiring configuration and has nothing to do with SPI_3WIRE.) In the 3-wire mode, the SPI controller CS line can be wired to the CNV line on the ADC and used to trigger conversions rather that using a separate GPIO line. The turbo/chain mode compatibility check at the end of the probe function is technically can't be triggered right now but adding it now anyway so that we don't forget to add it later when support for daisy-chaining is added. Reviewed-by: Nuno Sa <[email protected]> Signed-off-by: David Lechner <[email protected]> Link: https://lore.kernel.org/r/20240314-mainline-ad7944-3-wire-mode-v2-1-d469da0705d2@baylibre.com Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: accel: adxl367: Remove second semicolonColin Ian King1-1/+1
There is a statement with two semicolons. Remove the second one, it is redundant. Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: inkern: move to the cleanup.h magicNuno Sa1-174/+89
Use the new cleanup magic for handling mutexes in IIO. This allows us to greatly simplify some code paths. While at it, also use __free(kfree) where allocations are done and drop obvious comment in iio_channel_read_min(). Signed-off-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: buffer: iio: core: move to the cleanup.h magicNuno Sa1-73/+47
Use the new cleanup magic for handling mutexes in IIO. This allows us to greatly simplify some code paths. Signed-off-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: trigger: move to the cleanup.h magicNuno Sa1-41/+30
Use the new cleanup magic for handling mutexes in IIO. This allows us to greatly simplify some code paths. Signed-off-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: core: move to cleanup.h magicNuno Sa1-21/+13
Use the new cleanup magic for handling mutexes in IIO. This allows us to greatly simplify some code paths. Note that we keep the plain mutex calls in the iio_device_release|acquire() APIs since in there the macros would likely not help much (as we want to keep the lock acquired when he leave the APIs). Signed-off-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: imu: inv_mpu6050: add WoM suspend wakeup with low-power modeJean-Baptiste Maneyrol2-51/+166
Add wakeup from suspend for WoM when enabled and put accel in low-power mode when suspended. Requires rewriting pwr_mgmt_1 register handling and factorize out accel LPF settings. Use a low-power rate similar to the chip sampling rate but always lower for a best match of the sampling rate while saving power and adjust threshold to follow the required roc value. Signed-off-by: Jean-Baptiste Maneyrol <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: imu: inv_mpu6050: add new interrupt handler for WoM eventsJean-Baptiste Maneyrol3-16/+66
Add new interrupt handler for generating WoM event from int status register bits. Launch from interrupt the trigger poll function for data buffer. Signed-off-by: Jean-Baptiste Maneyrol <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: imu: inv_mpu6050: add WoM event as accel eventJean-Baptiste Maneyrol1-8/+59
Add WoM (roc rising) event as accel x_or_y_or_z event for all chips >= MPU-6500. This requires to create new MPU-6500 channels as default and MPU-6050 channels for older chips. Signed-off-by: Jean-Baptiste Maneyrol <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: imu: inv_mpu6050: add WoM (Wake-on-Motion) sensorJean-Baptiste Maneyrol4-13/+309
WoM is a threshold test on accel value comparing actual sample with previous one. It maps best to roc rising event. Add support of a new WOM sensor and functions for handling the associated roc_rising event. The event value is in SI units. Ensure WOM is stopped and restarted at suspend-resume, handle usage with buffer data ready interrupt, and handle change in sampling rate impacting already set roc value. Signed-off-by: Jean-Baptiste Maneyrol <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: humidity: hdc3020: add reset managementJavier Carrasco1-0/+16
The HDC3020 provides an active low reset signal that must be handled if connected. Asserting this signal turns the device into Trigger-on Demand measurement mode, reducing its power consumption when no measurements are required like in low-power modes. According to the datasheet, the longest "Reset Ready" is 3 ms, which is only taken into account if the reset signal is defined. Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: humidity: hdc3020: add power managementJavier Carrasco1-19/+76
The HDC3020 sensor carries out periodic measurements during normal operation, but as long as the power supply is enabled, it will carry on in low-power modes. In order to avoid that and reduce power consumption, the device can be switched to Trigger-on Demand mode, and if possible, turn off its regulator. According to the datasheet, the maximum "Power Up Ready" is 5 ms. Add resume/suspend pm operations to manage measurement mode and regulator state. Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: ad7944: add driver for AD7944/AD7985/AD7986David Lechner3-0/+427
This adds a driver for the Analog Devices Inc. AD7944, AD7985, and AD7986 ADCs. These are a family of pin-compatible ADCs that can sample at rates up to 2.5 MSPS. The initial driver adds support for sampling at lower rates using the usual IIO triggered buffer and can handle all 3 possible reference voltage configurations. Signed-off-by: David Lechner <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: twl4030-madc: Make use of device propertiesAndy Shevchenko1-10/+9
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Include mod_devicetable.h explicitly to replace the dropped of.h which included mod_devicetable.h indirectly. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: ad7173: add support for additional modelsDumitru Ceclan1-6/+80
Add support for Analog Devices AD7172-2, AD7175-8, AD7177-2. Signed-off-by: Dumitru Ceclan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: ad7173: improve chip id's definesDumitru Ceclan1-3/+3
Rename to AD7172_2_ID to avoid confusion with _4 model. Reorder id's by reg value. Signed-off-by: Dumitru Ceclan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: light: Add support for APDS9306 Light SensorSubhajit Ghosh3-0/+1368
Driver support for Avago (Broadcom) APDS9306 Ambient Light Sensor. It has two channels - ALS and CLEAR. The ALS (Ambient Light Sensor) channel approximates the response of the human-eye providing direct read out where the output count is proportional to ambient light levels. It is internally temperature compensated and rejects 50Hz and 60Hz flicker caused by artificial light sources. Hardware interrupt configuration is optional. It is a low power device with 20 bit resolution and has configurable adaptive interrupt mode and interrupt persistence mode. The device also features inbuilt hardware gain, multiple integration time selection options and sampling frequency selection options. This driver also uses the IIO GTS (Gain Time Scale) Helpers Namespace for Scales, Gains and Integration time implementation. Signed-off-by: Subhajit Ghosh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: core: Calculate alloc_size only once in iio_device_alloc()Andy Shevchenko1-5/+4
No need to rewrite the value, instead use 'else' branch. This will also help further refactoring the code later on. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: David Lechner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: core: Leave private pointer NULL when no private data suppliedAndy Shevchenko1-2/+4
In iio_device_alloc() when size of the private data is 0, the private pointer is calculated to point behind the valid data. Leave it NULL when no private data supplied. Fixes: 6d4ebd565d15 ("iio: core: wrap IIO device into an iio_dev_opaque object") Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: David Lechner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: imu: st_lsm6dsx: drop casting to void in dev_set_drvdataJavier Carrasco1-1/+1
The C standard specifies that there is no need to cast from a pointer to void [1]. Therefore, it can be safely dropped. [1] C Standard Committee: https://c0x.shape-of-code.com/6.3.2.3.html Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: humidity: hts211: drop casting to void in dev_set_drvdataJavier Carrasco1-1/+1
The C standard specifies that there is no need to cast from a pointer to void [1]. Therefore, it can be safely dropped. [1] C Standard Committee: https://c0x.shape-of-code.com/6.3.2.3.html Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25io: light: st_uvis25: drop casting to void in dev_set_drvdataJavier Carrasco1-1/+1
The C standard specifies that there is no need to cast from a pointer to void [1]. Therefore, it can be safely dropped. [1] C Standard Committee: https://c0x.shape-of-code.com/6.3.2.3.html Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: ad7173: add AD7173 driverDumitru Ceclan3-0/+1134
The AD7173 family offer a complete integrated Sigma-Delta ADC solution which can be used in high precision, low noise single channel applications or higher speed multiplexed applications. The Sigma-Delta ADC is intended primarily for measurement of signals close to DC but also delivers outstanding performance with input bandwidths out to ~10kHz. Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Michael Walle <[email protected]> # for gpio-regmap Signed-off-by: Dumitru Ceclan <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: ad_sigma_delta: Add optional irq selectionDumitru Ceclan1-9/+14
Add optional irq_num attribute to ad_sigma_delta_info structure for selecting the used interrupt line for ADC's conversion completion. Signed-off-by: Dumitru Ceclan <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: spear_adc: Make use of device propertiesAndy Shevchenko1-15/+10
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Include mod_devicetable.h explicitly to replace the dropped of.h which included mod_devicetable.h indirectly. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: rcar-gyroadc: use for_each_available_child_node_scoped()Jonathan Cameron1-15/+6
Using automated cleanup to replace of_node_put() handling allows for a simplfied flow by enabling direct returns on errors. Non available child nodes should never have been considered; that is ones where status != okay and was defined. Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: rzg2l_adc: Use device_for_each_child_node_scoped()Jonathan Cameron1-8/+3
Switching to the _scoped() version removes the need for manual calling of fwnode_handle_put() in the paths where the code exits the loop early. In this case that's all in error paths. Cc: Lad Prabhakar <[email protected]> Reviewed-by: Lad Prabhakar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: temp: ltc2983: Use __free(fwnode_handle) and device_for_each_node_scoped()Jonathan Cameron1-87/+50
This use of the new cleanup.h scope based freeing infrastructure allows us to exit directly from error conditions and in the good path with the reference obtained from fwnode_find_reference() (which may be an error pointer) automatically released. Similarly the _scoped() version of device_for_each_child_node() removes the need for the manual calling of fwnode_handl_put() in paths where the code exits the loop early. Tidy up some unusual indentation in a dev_dbg() whilst here. Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: hx711: Switch from of specific to fwnode property handling.Jonathan Cameron1-3/+2
Allows driver to be used with other firmware types and removes an example that might be copied into new IIO drivers. Cc: Andreas Klinger <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: accel: fxls8962af: Switch from of specific to fwnode based properties.Jonathan Cameron1-4/+6
Only the irq was retrieved using an of specific accessor. Switch to the fwnode equivalent and adjust headers. Also include missing mod_devicetable.h and irq.h. Cc: Sean Nyekjaer <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: accel: mma8452: Switch from of specific to fwnode property handling.Jonathan Cameron1-3/+3
In this case only use was to get an irq so easily converted. Also include linux/mod_devicetable.h for struct of_device_id definition. Using the generic firmware handling, this driver may be used with other firmware types. This also removes an example that might get copied into other drivers leaving them unable to be used with alternative firmware types. Cc: Haibo Chen <[email protected]> Reviewed-and-tested-by: Haibo Chen <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: ad7192: Convert from of specific to fwnode property handlingJonathan Cameron1-19/+19
Enables use of with other firmwware types. Removes a case of device tree specific handlers that might get copied into new drivers. Cc: Alisa-Dariana Roman <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: ad7292: Switch from of specific to fwnode property handlingJonathan Cameron1-7/+6
This reduces the wrong of device tree only IIO drivers that might be copied by converting over this simple case. Makes use of the new _scoped() handling to automatically release the fwnode_handle on early exit from the loop. Cc: Nuno Sá <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: ad7124: Switch from of specific to fwnode based property handlingJonathan Cameron1-32/+23
Using the generic firmware data access functions from property.h provides a number of advantages: 1) Works with different firmware types. 2) Doesn't provide a 'bad' example for new IIO drivers. 3) Lets us use the new _scoped() loops with automatic reference count cleanup for fwnode_handle Cc: Lars-Peter Clausen <[email protected]> Cc: Michael Hennerich <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: fsl-imx25-gcq: Use devm_* and dev_err_probe() to simplify probeJonathan Cameron1-51/+35
Custom callbacks are need for regulators (so there is a handle to read the voltage from) and the clk because it is retrieved from the parent rather than directly from firmware description. Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: fsl-imx25-gcq: Switch from of specific handing to fwnode based.Jonathan Cameron1-33/+21
Using the generic firmware data access functions from property.h provides a number of advantages: 1) Works with different firmware types. 2) Doesn't provide a 'bad' example for new IIO drivers. 3) Lets us use the new _scoped() loops with automatic reference count cleanup for fwnode_handle Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: dac: ltc2688: Use device_for_each_child_node_scoped()Jonathan Cameron1-20/+8
Switching to the _scoped() version removes the need for manual calling of fwnode_handle_put() in the paths where the code exits the loop early. In this case that's all in error paths. Reviewed-by: Andy Shevchenko <[email protected]> Tested-by: Nuno Sa <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: addac: ad74413r: Use device_for_each_child_node_scoped()Jonathan Cameron1-8/+2
Switching to the _scoped() version removes the need for manual calling of fwnode_handle_put() in the paths where the code exits the loop early. In this case that's all in error paths. The use of fwnode_for_each_available_child_node() here is assumed to have been down to a false assumption that device_for_each_child_node() doesn't check avaialble - so this transition to the scoped device_for_each_child_node_scoped() is equivalent. Cc: Rasmus Villemoes <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-25iio: adc: max11410: Use device_for_each_child_node_scoped()Jonathan Cameron1-20/+7
Switching to the _scoped() version removes the need for manual calling of fwnode_handle_put() in the paths where the code exits the loop early. In this case that's all in error paths. Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-24iio: pressure: Fixes SPI support for BMP3xx devicesVasileios Amoiridis3-7/+4
Bosch does not use unique BMPxxx_CHIP_ID for the different versions of the device which leads to misidentification of devices if their ID is used. Use a new value in the chip_info structure instead of the BMPxxx_CHIP_ID, in order to choose the correct regmap_bus to be used. Fixes: a9dd9ba32311 ("iio: pressure: Fixes BMP38x and BMP390 SPI support") Signed-off-by: Vasileios Amoiridis <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-24iio: pressure: Fixes BME280 SPI driver dataVasileios Amoiridis1-2/+2
Use bme280_chip_info structure instead of bmp280_chip_info in SPI support for the BME280 sensor. Fixes: 0b0b772637cd ("iio: pressure: bmp280: Use chip_info pointers for each chip as driver data") Signed-off-by: Vasileios Amoiridis <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2024-03-21Merge tag 'char-misc-6.9-rc1' of ↵Linus Torvalds112-1888/+7121
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc and other driver subsystem updates from Greg KH: "Here is the big set of char/misc and a number of other driver subsystem updates for 6.9-rc1. Included in here are: - IIO driver updates, loads of new ones and evolution of existing ones - coresight driver updates - const cleanups for many driver subsystems - speakup driver additions - platform remove callback void cleanups - mei driver updates - mhi driver updates - cdx driver updates for MSI interrupt handling - nvmem driver updates - other smaller driver updates and cleanups, full details in the shortlog All of these have been in linux-next for a long time with no reported issue, other than a build warning for the speakup driver" The build warning hits clang and is a gcc (and C23) extension, and is fixed up in the merge. Link: https://lore.kernel.org/all/[email protected]/ * tag 'char-misc-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (279 commits) binder: remove redundant variable page_addr uio_dmem_genirq: UIO_MEM_DMA_COHERENT conversion uio_pruss: UIO_MEM_DMA_COHERENT conversion cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT uio: introduce UIO_MEM_DMA_COHERENT type cdx: add MSI support for CDX bus pps: use cflags-y instead of EXTRA_CFLAGS speakup: Add /dev/synthu device speakup: Fix 8bit characters from direct synth parport: sunbpp: Convert to platform remove callback returning void parport: amiga: Convert to platform remove callback returning void char: xillybus: Convert to platform remove callback returning void vmw_balloon: change maintainership MAINTAINERS: change the maintainer for hpilo driver char: xilinx_hwicap: Fix NULL vs IS_ERR() bug hpet: remove hpets::hp_clocksource platform: goldfish: move the separate 'default' propery for CONFIG_GOLDFISH char: xilinx_hwicap: drop casting to void in dev_set_drvdata greybus: move is_gb_* functions out of greybus.h greybus: Remove usage of the deprecated ida_simple_xx() API ...