aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio
AgeCommit message (Collapse)AuthorFilesLines
2023-07-22iio: accel: adxl355: Simplify probe()Biju Das1-12/+3
Simplify the probe() by replacing of_device_get_match_data() and i2c_match_id() by i2c_get_match_data() as we have similar I2C and DT-based matching table. Signed-off-by: Biju Das <[email protected]> Reviewed-by: Puranjay Mohan <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: meson: support reading from channel 7 mux inputsGeorge Stark1-2/+75
Add IIO channel for all muxed inputs of channel 7. Meson saradc channel 7 is connected to a mux that can switch input to well-known sources like Vdd, GND and several Vdd dividers. Signed-off-by: George Stark <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: meson: add channel labelsGeorge Stark1-0/+12
Add channel labels to provide human-readable names for the inputs. Signed-off-by: George Stark <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: meson: add enum for iio channel numbersGeorge Stark1-17/+29
Channels could be referenced in the driver code and using enum allows to make it more robust. Signed-off-by: George Stark <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: meson: move meson_sar_adc_set_chan7_mux routine upperGeorge Stark1-13/+13
meson_sar_adc_set_chan7_mux is a basic func() for writing single register, defined as static. Moved it up so it could be used in more places. Signed-off-by: George Stark <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: meson: move enums declaration before variables declarationGeorge Stark1-22/+22
Allow to use enum items for variables initialization. For this, move enums upper in the code. Signed-off-by: George Stark <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: meson: remove unused timestamp channelGeorge Stark1-2/+0
Remove IIO_CHAN_SOFT_TIMESTAMP channel because it's used only for buffering mode which is not implemented. Signed-off-by: George Stark <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: chemical: scd4x: Add pressure compensationRoan van Dijk1-6/+73
This patch adds pressure compensation to the scd4x driver. The pressure can be written to the sensor in hPa. The pressure will be compensated internally by the sensor. Signed-off-by: Roan van Dijk <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: Make return value check for set_trigger_state() consistentWaqar Hameed1-1/+1
In `iio_trigger_detach_poll_func()` the return value from `trig->ops->set_trigger_state(trig, false)` is checked with `if (ret)`. However, in `iio_trigger_attach_poll_func()` it is checked with `if (ret < 0)`. Resolve this mismatch by only checking for `if (ret)` in both places. Signed-off-by: Waqar Hameed <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: ti-lmp92064: add buffering supportLeonard Göhrs1-0/+53
Enable buffered reading of samples from the LMP92064 ADC. The main benefit of this change is being able to read out current and voltage measurements in a single transfer, allowing instantaneous power measurements. Reads into the buffer can be triggered by any software triggers, e.g. the iio-trig-hrtimer: $ mkdir /sys/kernel/config/iio/triggers/hrtimer/my-trigger $ cat /sys/bus/iio/devices/iio\:device3/name lmp92064 $ iio_readdev -t my-trigger -b 16 iio:device3 | hexdump WARNING: High-speed mode not enabled 0000000 0000 0176 0101 0001 5507 abd5 7645 1768 0000010 0000 016d 0101 0001 ee1e ac6b 7645 1768 ... Signed-off-by: Leonard Göhrs <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: stm32-adc: Use devm_platform_get_and_ioremap_resource()Yangtao Li1-2/+1
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: qcom-spmi-adc5: Add ADC5_GPIO2_100K_PUKonrad Dybcio1-0/+2
Even though it existed in bindings for the longest time, ADC5_GPIO2_100K_PU was never assigned in the driver. Do so. Signed-off-by: Konrad Dybcio <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: imu: inv_mpu6050: read the full fifo when processing dataJean-Baptiste Maneyrol3-8/+18
When processing data read the full fifo data in 1 time. If there are several samples in the FIFO, it means we are experiencing system delay. In this case, it is better to read all data with 1 bus access than to add additional latency by doing several ones. This requires to use a bigger buffer depending on chip FIFO size and do an additional local data copy before sending. But the cost is minimal and behavior is still better like this under system heavy load. Signed-off-by: Jean-Baptiste Maneyrol <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: ad7192: Use sysfs_emit_atAlisa Roman1-3/+2
Replace scnprintf with sysfs_emit_at which is the preferred alternative. Also make sure each fractional digit is in its place by padding with zeros up to 3 digits: "...%03d...". Signed-off-by: Alisa Roman <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADCMaksim Kiselev3-0/+287
The General Purpose ADC (GPADC) can convert the external signal into a certain proportion of digital value, to realize the measurement of analog signal, which can be applied to power detection and key detection. Theoretically, this ADC can support up to 16 channels. All SoCs below contain this GPADC IP. The only difference between them is the number of available channels: T113 - 1 channel D1 - 2 channels R329 - 4 channels T507 - 4 channels Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Maksim Kiselev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: adc: Kconfig change description for Allwinner GPADCMaksim Kiselev1-1/+1
This patch adds SoCs names to Allwinner GPADC description to make it more informative. Signed-off-by: Maksim Kiselev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: light: vcnl4000: Add calibration bias for 4040/4200Astrid Rost1-2/+91
The calibration bias is setting the LED current to change the detection distance. Add read/write attribute for proximity calibration bias and read attribute for available values. This is supported for vcnl4040 and vcnl4200. Signed-off-by: Astrid Rost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: light: vcnl4000: Add oversampling_ratio for 4040/4200Astrid Rost1-2/+81
Add the proximity multi pulse (PS_MPS) as oversampling_ratio. Instead of one single pulse per every defined time frame, one can program2, 4, or even 8 pulses. This leads to a longer IRED on-time for each proximity measurement value, which also results in a higher detection range. Add read/write attribute for proximity oversampling-ratio and read attribute for available oversampling-ratio. This is supported for vcnl4040 and vcnl4200. Signed-off-by: Astrid Rost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: light: vcnl4000: Add period for vcnl4040/4200Astrid Rost1-2/+159
Add read/write attribute for proximity and illuminance period. The period is set in the interrupt persistence flags(PS_PERS and ALS_PERS). An interrupt will not be asserted if the raw value is not over (or lower) than the threshold for the set continued amount of measurements. The time in seconds is calculated by the number of continued refreshes multiplied with the integration time. It will always pick the next lower possible value. The period changes, if the integration time is changed. Signed-off-by: Astrid Rost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: light: vcnl4000: add illuminance irq vcnl4040/4200Astrid Rost1-2/+92
Add support to configure ambient light sensor interrupts and threshold limits for vcnl4040 and vcnl4200. If an interrupt is detected an event will be pushed to the event interface. Signed-off-by: Astrid Rost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: light: vcnl4000: Add als_it for vcnl4040/4200Astrid Rost1-3/+91
Add illuminance integration time for vcnl4040 and vcnl4200. Add read/write attribute for illuminance integration time and read attribute for available integration times. Set scale and sampling rate according to the integration time. Signed-off-by: Astrid Rost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: light: vcnl4000: Check type with switch caseAstrid Rost1-52/+100
Check IIO_PROXIMITY with switch case in order to make it easier to add further types like light. Add check for IIO_EV_INFO_VALUE for writing rising or falling events. Signed-off-by: Astrid Rost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: light: vcnl4000: Add proximity ps_it for vcnl4200Astrid Rost1-7/+26
Add ps_it attributes for vcnl4200 (similar to vcnl4040). Add read/write attribute for proximity integration time. Read attribute for available proximity integration times. Change sampling rate depending on integration time. Signed-off-by: Astrid Rost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: light: vcnl4000: Add proximity irq for vcnl4200Astrid Rost1-3/+9
Add proximity interrupt support for vcnl4200 (similar to vcnl4040). Add support to configure proximity sensor interrupts and threshold limits. If an interrupt is detected an event will be pushed to the event interface. Signed-off-by: Astrid Rost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: accel: da280: Add support for the DA217 accelerometerHans de Goede1-3/+8
The DA217 accelerometer is another DA280 compatible accelerometer, add its device-ids to the da280 driver. Reported-by: Juno Computers USA <[email protected]> Tested-by: Juno Computers USA <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: imu: inv_mpu6050: use the common inv_sensors timestamp moduleJean-Baptiste Maneyrol5-93/+45
Replace timestamping by the new common inv_sensors timestamp module. The principle behind is the same but the implementation in the new module is far better providing less jitter and a better estimation. Signed-off-by: Jean-Baptiste Maneyrol <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: make invensense timestamp module genericJean-Baptiste Maneyrol6-85/+99
Rename common module to inv_sensors_timestamp, add configuration at init (chip internal clock, acceptable jitter, ...) and update inv_icm42600 driver integration. Signed-off-by: Jean-Baptiste Maneyrol <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: move inv_icm42600 timestamp module in commonJean-Baptiste Maneyrol12-88/+38
Create new inv_sensors common modules and move inv_icm42600 timestamp module inside. This module will be used by IMUs and also in the future by other chips. Modify inv_icm42600 driver to use timestamp module and do some headers cleanup. Signed-off-by: Jean-Baptiste Maneyrol <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-20iio: imu: inv_icm42600: make timestamp module chip independentJean-Baptiste Maneyrol3-19/+12
Move icm42600 dependent function inside the core module. Do some headers cleanup at the same time. Signed-off-by: Jean-Baptiste Maneyrol <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-15iio: adc: ina2xx: avoid NULL pointer dereference on OF device matchAlvin Šipraga1-3/+6
The affected lines were resulting in a NULL pointer dereference on our platform because the device tree contained the following list of compatible strings: power-sensor@40 { compatible = "ti,ina232", "ti,ina231"; ... }; Since the driver doesn't declare a compatible string "ti,ina232", the OF matching succeeds on "ti,ina231". But the I2C device ID info is populated via the first compatible string, cf. modalias population in of_i2c_get_board_info(). Since there is no "ina232" entry in the legacy I2C device ID table either, the struct i2c_device_id *id pointer in the probe function is NULL. Fix this by using the already populated type variable instead, which points to the proper driver data. Since the name is also wanted, add a generic one to the ina2xx_config table. Signed-off-by: Alvin Šipraga <[email protected]> Fixes: c43a102e67db ("iio: ina2xx: add support for TI INA2xx Power Monitors") Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-15iio: light: bu27008: Fix intensity data typeMatti Vaittinen1-1/+1
The intensity data from bu27008 is unsigned. The type of the scan data was incorrectly marked as signed resulting large intensity values to be interpreted as negative ones. Fix the scan data type. Fixes: 41ff93d14f78 ("iio: light: ROHM BU27008 color sensor") Signed-off-by: Matti Vaittinen <[email protected]> Link: https://lore.kernel.org/r/240a7ca5fc1b76da20d81f930d00f31a54b1fdf8.1686648422.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-15iio: light: bu27008: Fix scale formatMatti Vaittinen1-2/+18
The driver is expecting accuracy of NANOs for intensity scale in raw_write. The IIO core is however defaulting to MICROs. This leads the raw-write of smallest scales to never succeed as correct selector(s) are not found. Fix this by implementing the .write_raw_get_fmt callback to use NANO accuracy for writes of IIO_CHAN_INFO_SCALE. Fixes: 41ff93d14f78 ("iio: light: ROHM BU27008 color sensor") Signed-off-by: Matti Vaittinen <[email protected]> Link: https://lore.kernel.org/r/e4778b74cde41431f77bc8dd88ec18605da0b400.1686648422.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-15iio: light: bu27034: Fix scale formatMatti Vaittinen1-3/+19
The driver is expecting accuracy of NANOs for intensity scale in raw_write. The IIO core is however defaulting to MICROs. This leads the raw-write of smallest scales to never succeed as correct selector(s) are not found. Fix this by implementing the .write_raw_get_fmt callback to use NANO accuracy for writes of IIO_CHAN_INFO_SCALE. Signed-off-by: Matti Vaittinen <[email protected]> Fixes: e52afbd61039 ("iio: light: ROHM BU27034 Ambient Light Sensor") Link: https://lore.kernel.org/r/5369117315cf05b88cf0ccb87373fd77190f6ca2.1686648422.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-15iio: adc: ad7192: Fix ac excitation featureAlisa Roman1-8/+8
AC excitation enable feature exposed to user on AD7192, allowing a bit which should be 0 to be set. This feature is specific only to AD7195. AC excitation attribute moved accordingly. In the AD7195 documentation, the AC excitation enable bit is on position 22 in the Configuration register. ACX macro changed to match correct register and bit. Note that the fix tag is for the commit that moved the driver out of staging. Fixes: b581f748cce0 ("staging: iio: adc: ad7192: move out of staging") Signed-off-by: Alisa Roman <[email protected]> Cc: [email protected] Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-15iio: adi: ad7192: Add error check and more debug logMarkus Burri1-3/+5
Print read and expected device ID as debug warning. Add error check for ad_sd_init() result. Reviewed-by: Nuno Sa <[email protected]> Signed-off-by: Markus Burri <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-15iio: adc: ad7192: Simplify using devm_clk_get_optional_enabled()Christophe JAILLET1-15/+1
If st->mclk is not NULL, then st->clock_sel is either AD7192_CLK_EXT_MCLK2 or AD7192_CLK_EXT_MCLK1_2. So devm_clk_get_optional_enabled() can be used instead of hand writing it. This saves some line of code. Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/7dbe973905f1fdae5d2f5ae5a3b01dd1d6a9925b.1686774340.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jonathan Cameron <[email protected]>
2023-07-09iio: inkern: Add a helper to query an available minimum raw valueHerve Codina1-0/+63
A helper, iio_read_max_channel_raw() exists to read the available maximum raw value of a channel but nothing similar exists to read the available minimum raw value. This new helper, iio_read_min_channel_raw(), fills the hole and can be used for reading the available minimum raw value of a channel. It is fully based on the existing iio_read_max_channel_raw(). Signed-off-by: Herve Codina <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-07-09iio: inkern: Replace a FIXME comment by a TODO oneHerve Codina1-1/+1
This FIXME comment is more a TODO one. It is a note when someone will need for this currently unsupported case. Change from FIXME to TODO. Signed-off-by: Herve Codina <[email protected]> Suggested-by: Jonathan Cameron <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-07-09iio: inkern: Use max_array() to get the maximum value from an arrayHerve Codina1-5/+2
Use max_array() to get the maximum value from an array instead of a custom local loop. Signed-off-by: Herve Codina <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-07-09iio: inkern: Fix headers inclusion orderHerve Codina1-1/+1
Fix the mutex.h inclusion order as it seems to be the only one misplaces. Signed-off-by: Herve Codina <[email protected]> Suggested-by: Andy Shevchenko <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-07-09iio: inkern: Remove the 'unused' variable usage in iio_channel_read_max()Herve Codina1-5/+2
The code uses a local variable to initialize a null pointer in order to avoid accessing this null pointer later on. Simply removed the 'unused' variable and check for the null pointer just before accessing it. Signed-off-by: Herve Codina <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-07-09iio: inkern: Check error explicitly in iio_channel_read_max()Herve Codina1-1/+4
The current implementation returns the error code as part of the default switch case. This can lead to returning an incorrect positive value in case of iio_avail_type enum entries evolution. In order to avoid this case, be more strict in error checking. Signed-off-by: Herve Codina <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-07-03Merge tag 'driver-core-6.5-rc1' of ↵Linus Torvalds2-16/+10
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here are a small set of changes for 6.5-rc1 for some driver core changes. Included in here are: - device property cleanups to make it easier to write "agnostic" drivers when regards to the firmware layer underneath them (DT vs. ACPI) - debugfs documentation updates - devres additions - sysfs documentation and changes to handle empty directory creation logic better - tiny kernfs optimizations - other tiny changes All of these have been in linux-next for a while with no reported problems" * tag 'driver-core-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: sysfs: Skip empty folders creation sysfs: Improve readability by following the kernel coding style drivers: fwnode: fix fwnode_irq_get[_byname]() ata: ahci_platform: Make code agnostic to OF/ACPI device property: Implement device_is_compatible() ACPI: Move ACPI_DEVICE_CLASS() to mod_devicetable.h base/node: Use 'property' to identify an access parameter driver core: device.h: add some missing kerneldocs kernfs: fix missing kernfs_idr_lock to remove an ID from the IDR isa: Remove unnecessary checks MAINTAINERS: add entry for auxiliary bus debugfs: Correct the 'debugfs_create_str' docs serial: qcom_geni: Comment use of devm_krealloc rather than devm_krealloc_array iio: adc: Use devm_krealloc_array hwmon: pmbus: Use devm_krealloc_array
2023-07-03Merge tag 'char-misc-6.5-rc1' of ↵Linus Torvalds226-467/+2936
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull Char/Misc updates from Greg KH: "Here is the big set of char/misc and other driver subsystem updates for 6.5-rc1. Lots of different, tiny, stuff in here, from a range of smaller driver subsystems, including pulls from some substems directly: - IIO driver updates and additions - W1 driver updates and fixes (and a new maintainer!) - FPGA driver updates and fixes - Counter driver updates - Extcon driver updates - Interconnect driver updates - Coresight driver updates - mfd tree tag merge needed for other updates on top of that, lots of small driver updates as patches, including: - static const updates for class structures - nvmem driver updates - pcmcia driver fix - lots of other small driver updates and fixes All of these have been in linux-next for a while with no reported problems" * tag 'char-misc-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (243 commits) bsr: fix build problem with bsr_class static cleanup comedi: make all 'class' structures const char: xillybus: make xillybus_class a static const structure xilinx_hwicap: make icap_class a static const structure virtio_console: make port class a static const structure ppdev: make ppdev_class a static const structure char: misc: make misc_class a static const structure /dev/mem: make mem_class a static const structure char: lp: make lp_class a static const structure dsp56k: make dsp56k_class a static const structure bsr: make bsr_class a static const structure oradax: make 'cl' a static const structure hwtracing: hisi_ptt: Fix potential sleep in atomic context hwtracing: hisi_ptt: Advertise PERF_PMU_CAP_NO_EXCLUDE for PTT PMU hwtracing: hisi_ptt: Export available filters through sysfs hwtracing: hisi_ptt: Add support for dynamically updating the filter list hwtracing: hisi_ptt: Factor out filter allocation and release operation samples: pfsm: add CC_CAN_LINK dependency misc: fastrpc: check return value of devm_kasprintf() coresight: dummy: Update type of mode parameter in dummy_{sink,source}_enable() ...
2023-07-03Merge tag 'mfd-next-6.5' of ↵Linus Torvalds3-0/+206
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Add support for TI TPS6594/TPS6593/LP8764 PMICs - Add support for Samsung RT5033 Battery Charger - Add support for Analog Devices MAX77540 and MAX77541 PMICs New Device Support: - Add support for SPI to Rockchip RK808 (and friends) - Add support for AXP192 PMIC to X-Powers AXP20X - Add support for AXP313a PMIC to X-Powers AXP20X - Add support for RK806 to Rockchip RK8XX Removed Device Support: - Removed MFD support for Richtek RT5033 Battery Fix-ups: - Remove superfluous code - Switch I2C drivers from .probe_new() to .probe() - Convert over to managed resources (devm_*(), etc) - Use dev_err_probe() for returning errors from .probe() - Add lots of Device Tree bindings / support - Improve cache efficiency by switching to Maple - Use own exported namespaces (NS) - Include missing and remove superfluous headers - Start using / convert to the new shutdown sys-off API - Trivial: variable / define renaming - Make use of of_property_read_reg() when requesting DT 'reg's Bug Fixes: - Fix chip revision readout due to incorrect data masking - Amend incorrect register and mask values used for charger state - Hide unused functionality at compile time - Fix resource leaks following error handling routines - Return correct error values and fix error handling in general - Repair incorrect device names - used for device matching - Remedy broken module auto-loading" * tag 'mfd-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (51 commits) dt-bindings: mfd: max77541: Add ADI MAX77541/MAX77540 iio: adc: max77541: Add ADI MAX77541 ADC Support regulator: max77541: Add ADI MAX77541/MAX77540 Regulator Support dt-bindings: regulator: max77541: Add ADI MAX77541/MAX77540 Regulator mfd: Switch two more drivers back to use struct i2c_driver::probe dt-bindings: mfd: samsung,s5m8767: Simplify excluding properties mfd: stmpe: Only disable the regulators if they are enabled mfd: max77541: Add ADI MAX77541/MAX77540 PMIC Support dt-bindings: mfd: gateworks-gsc: Remove unnecessary fan-controller nodes mfd: core: Use of_property_read_reg() to parse "reg" mfd: stmfx: Nullify stmfx->vdd in case of error mfd: stmfx: Fix error path in stmfx_chip_init mfd: intel-lpss: Add missing check for platform_get_resource mfd: stpmic1: Add PMIC poweroff via sys-off handler mfd: stpmic1: Fixup main control register and bits naming dt-bindings: mfd: qcom,tcsr: Add the compatible for IPQ8074 mfd: tps65219: Add support for soft shutdown via sys-off API mfd: pm8008: Drop bogus i2c module alias mfd: pm8008: Fix module autoloading mfd: tps65219: Add GPIO cell instance ...
2023-06-28iio: adc: max77541: Add ADI MAX77541 ADC SupportOkan Sahin3-0/+206
The MAX77541 has an 8-bit Successive Approximation Register (SAR) ADC with four multiplexers for supporting the telemetry feature. Signed-off-by: Okan Sahin <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
2023-06-15Merge tag 'iio-for-6.5a' of ↵Greg Kroah-Hartman222-453/+2921
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: 1st set of IIO new device support, features and cleanup for the 6.5 cycle. New device support - honeywell,mprls0025pa * New driver and dt-bindings for this series of pressure sensors. - invensense,mpu6050 * Add support for ICM 20600 IMU (ID, bindings and device data). - melexis,mlx90614 * Add support for mlx90615 Infra Red Thermometer after driver cleanup and refactoring to support the differences in this device. - renesas,x9250 * New driver and bindings for this quad potentiometer. - rockchip,saradc * Add support for RK3588. Also included is a bunch of refactoring and cleanup for that driver. - rohm,bu27008 * New driver bindings etc for this 5 photodiode color sensor. - st,lsm9ds0/st,st-sensors * ID added for LSM303D accelerometer and magnetometer including ACPI binding. - ti,opt4001 * New driver and bindings for this ambient light sensor. Features - core * Introduce iio_validate_own_trigger() for cases where a driver can only consumer a trigger it registered (detected via same parent device). Use it in the kionix,kx022a driver and new rohm,by27008 driver. - dynaimage,al3320a * ACPI binding CALS0001 seen on Lenovo Yoga Table 2 devices. - kionix,kx002a * Enable asynchronous probe. - rohm,bu27034 * Enable asynchronous probe. - ti,tmp006 * Explicit support for DT including binding documentation. Cleanups, minor fixes and misc improvements. - treewide * Switch I2C drivers from probe_new() back to probe() - part of the long process of getting rid of a parameter from probe() * Various whitespace and typo fixes not otherwise called out. - core * industrialio-buffer,Style cleanup. * Add documentation to extend_name field of struct iio_chan_spec to direct people using it towards the label infrastructure instead. extend_name was a design mistake a long time back so directly people away from it may be useful. - adi,ad7606 * Add HAS_IOPORT dependency to prepare for some Kconfig changes. - bosch,bma400 * Drop pointless print of ret in a dev_err_probe() message. - invensense,icm42600 * Rework timestamp handling to reduce jitter. - mediatek,mt7986-auxdac * Add DT binding for this part. - qcom,spmi-vadc * Allow for 1/16th prescaling used on a few devices. * Various changes to channel labeling and naming, including dropping use of fwnode_name which generates odd channel names. Small ABI change as a result, but not thought to be a problem for users of this platform. - st,lsm6dsx * dt-binding: Use common schema for mount-matrix via a reference. - st,stm32 * Add a debug print for when legacy channel config is used. - ti,palmas-adc * Drop unused i2c.h include. * tag 'iio-for-6.5a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (59 commits) dt-bindings: iio: rockchip: Fix 'oneOf' condition failed warning dt-bindings: iio: afe: voltage-divider: Spelling s/curcuit/circuit/ dt-bindings: iio: adc: Add rockchip,rk3588-saradc string iio: adc: rockchip_saradc: Use dev_err_probe iio: adc: rockchip_saradc: Match alignment with open parenthesis iio: adc: rockchip_saradc: Use of_device_get_match_data iio: adc: rockchip_saradc: Make use of devm_clk_get_enabled iio: adc: rockchip_saradc: Add support for RK3588 iio: adc: rockchip_saradc: Add callback functions iio: temperature: tmp006: Add OF device matching support dt-bindings: iio: temperature: Add support for tmp006 staging: iio: Switch i2c drivers back to use .probe() iio: amplifiers: ad8366 Fix whitespace issue iio: imu: inv_icm42600: avoid frequent timestamp jitter MAINTAINERS: Add ROHM BU27008 iio: light: ROHM BU27008 color sensor iio: kx022a: Use new iio_validate_own_trigger() iio: trigger: Add simple trigger_validation helper dt-bindings: iio: light: ROHM BU27008 iio: mlx90614: Add MLX90615 support ...
2023-06-10meson saradc: fix clock divider mask lengthGeorge Stark1-1/+1
According to the datasheets of supported meson SoCs length of ADC_CLK_DIV field is 6-bit. Although all supported SoCs have the register with that field documented later SoCs use external clock rather than ADC internal clock so this patch affects only meson8 family (S8* SoCs). Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") Signed-off-by: George Stark <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Martin Blumenstingl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2023-06-05iio: accel: fxls8962af: errata bug only applicable for FXLS8962AFSean Nyekjaer1-2/+3
Remove special errata handling if FXLS8964AF is used. Fixes: af959b7b96b8 ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads") Signed-off-by: Sean Nyekjaer <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2023-06-05iio: accel: fxls8962af: fixup buffer scan element typeSean Nyekjaer1-2/+1
Scan elements for x,y,z channels is little endian and requires no bit shifts. LE vs. BE is controlled in register SENS_CONFIG2 and bit LE_BE, default value is LE. Fixes: a3e0b51884ee ("iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers") Signed-off-by: Sean Nyekjaer <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>