mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
579f9786b7
1447119 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
579f9786b7 |
SoCFPGA firmware updates for v7.2
- Simplify service driver memory management by using a flexible array - Change FCS call to get provision data to asynchronous - Avoid blocking the call the reboot_image sysfs when busy - Add support to query the ATF version -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoHhMeiyk5VmwVMwNGZQEC4GjKPQFAmomx+YACgkQGZQEC4Gj KPQrAQ//dl9f4r2E2t7rA3pUF1NkRRZD0Y8UFji36ilu8dyuCG8/XFFcrIArugP+ CO7QH55mrZmDEhRoXAUTqste7uWVLY7EcBQTsp5GR5vVaUm4hHsq6cJ8Im/0ytJs 1xv+lWNArya1T1NZyTT1Ue60BJgVuy6tOvFg4Dz1OAS4HkHUCG7UJFomzOFSwYiy izAaFeoFprFsxvpTyb/eM5sX/PR+gvcmdH+YMD4VoeyAP0v0HYBNND2C8dvP/51s oLk62M/QfTnmD71qUlXc20LXEpKjL5ycdrUSjW6F8FPOGDySdY5u1y6pVAIxav4K mbFugTC38RwepL9FJ/ZoMQwS8H4XtTrTRw4Unkr79+qsCX/J1vLt8Bghzh2tU3/Z G0L5gd2iyOAt5kbWEKpe0RA9NzoqobNz9cVo+obO0RXAcOH1h3+XA9zbPE0L1/0+ 6xSUjb7m94rgUkHT0xFpnWpH8RuVHpXskry8Z0+BS/z3OLVn9bk0c1jAAiVuf+Z/ hr3GoAWDVfiNqMQbX/ZE/Wnq8Agbq1hQZ4f7E2o727x7sZWVufulI8EeJFMAuVU7 9INVyiQTZE1lz1eEMOMIWcnr6j1SYLnmhRu3/h46bzLyqZwsIwnWpCCPPs/rDsrt DIAN1l7zU28z7kAy8n4j2Cia8bjsLv47yOlDgd3pxJEzRA7QoKM= =gfrr -----END PGP SIGNATURE----- Merge tag 'svc_updates_for_v7.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into char-misc-next Dinh writes: SoCFPGA firmware updates for v7.2 - Simplify service driver memory management by using a flexible array - Change FCS call to get provision data to asynchronous - Avoid blocking the call the reboot_image sysfs when busy - Add support to query the ATF version * tag 'svc_updates_for_v7.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: firmware: stratix10-svc: Add support to query Arm Trusted Firmware (ATF) version firmware: stratix10-rsu: avoid blocking reboot_image sysfs when busy firmware: stratix10-svc: change get provision data to async SMC call firmware: stratix10-svc: kmalloc_array + kzalloc to flex |
||
|
|
8b98f9f42e |
coresight: Self-hosted tracing updates for Linux v7.2
Updates for the CoreSight self hosted tracing subsystem includes:
- Better power management for components based on the CPU PM, including
support for components on the trace path for CPUs. Add support for
save/restore for TRBE
- Miscellaneous fixes to the drivers
* Fix overflow when the buffer size is > 2GB for tmc-etr
* Ultrasoc SMB Perf buffer OOB access
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEuFy0byloRoXZHaWBxcXRZPKyBqEFAmohhJYACgkQxcXRZPKy
BqHOUxAAmy9T6+KKFFDKCHRbzPzl7iRxRHedknrqaaVOJ9KFD8mRASnX/CtXvjmN
e/6KS5rrUwoG7NUSkkP8R5/DQcOiUThhRJfZT0cE0505Z7m12+A6c1fBSJcE706Q
kL6oDYbmkrh1Hs2xvhvrVCLzu2xMOCdKBzsxAopjKsMzu+VWx32Ee771l74fKKKw
ClI8Gl7K+nr2P5SmVb4WSJTtSUIXL/Ed5X6sMkzYFjD5N5KLMu2pECCvzi/0wUAv
wfeS8Ubdth5EVOdm+UnxoZUaXCsWO+qkamUUmh6mRq4/wg4dbPvRi2APzQySyVBW
uleDiFMI4v9kXe25uzog6dnIr108lc7udBGpVMnr1TfxeOYLV97qrQw7nTgxA++x
yoWFUIlNGM+XGXtZx1QJ4+fjV2xayxhO0AdNqcpIfhYRgrPX2FLmryUCeSnjpYaC
Dd9/emq4PRS7zL5+QNqRTyatKxSGUWf8bXKlyptUQCWZaWhZfkbFCkctAyfV/Ajw
UErUPyJe4DMr2SiOJDltAOxeqkPlxSMFO2ppe7ppngoubRYoo05Mtz/MY3rFqhFO
VQ63cNG1Cu3JYEglre4e8jsxlyPf10+XAzKJ6FfeQMbsGw3s72B70wTNzUJlnJpl
vhKicLjcbyOie5wrUdaE2qZzMp8lsYUzWByaHDVHE8AjOwfvQ1A=
=PhTE
-----END PGP SIGNATURE-----
Merge tag 'coresight-next-v7.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next
Suzuki writes:
coresight: Self-hosted tracing updates for Linux v7.2
Updates for the CoreSight self hosted tracing subsystem includes:
- Better power management for components based on the CPU PM, including
support for components on the trace path for CPUs. Add support for
save/restore for TRBE
- Miscellaneous fixes to the drivers
* Fix overflow when the buffer size is > 2GB for tmc-etr
* Ultrasoc SMB Perf buffer OOB access
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
* tag 'coresight-next-v7.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux: (36 commits)
coresight: ultrasoc-smb: Fix OOB write in smb_sync_perf_buffer()
coresight: etb10: restore atomic_t for shared reading state
coresight: platform: defer connection counter increment until alloc succeeds
coresight: sysfs: Validate CPU online status for per-CPU sources
coresight: Move CPU hotplug callbacks to core layer
coresight: sysfs: Increment refcount only for software source
coresight: trbe: Save and restore state across CPU low power state
coresight: Add PM callbacks for sink device
coresight: Control path during CPU idle
coresight: sysfs: Use source's path pointer for path control
coresight: etm3x: Set active path on target CPU
coresight: etm4x: Set active path on target CPU
coresight: Save active path for system tracers
coresight: Introduce coresight_enable_source() helper
coresight: Use helpers to fetch first and last nodes
coresight: Control path with range
coresight: Disable source helpers in coresight_disable_path()
coresight: syscfg: Use IRQ-safe spinlock to protect active variables
coresight: etm4x: Remove redundant checks in PM save and restore
coresight: etm4x: Hook CPU PM callbacks
...
|
||
|
|
745ffd4e7b |
This pull request contains the following interconnect updates for
the 7.2-rc1 merge window: - New driver for Shikra SoC - New driver for Nord SoC - New driver for Hawi SoC including CPU/LLCC bwmon support - Add missing SDCC nodes for Eliza SoC - Misc cleanups and fixes. Signed-off-by: Georgi Djakov <djakov@kernel.org> -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEExQ4tCsdmOu34XfMFgNDMCsbYFmMFAmommV8ACgkQgNDMCsbY FmM7OA/+OMWL+yuI02Q2xEhMYkDF8mFzxw6m7MtmJJI+FwvMXB13gGYJBNKn6G4E 7Vziwj/rgYoXX6FoMocyJEJKCLOOKcWZw4MNy6p64xdJW+2eTpUz1NtEdGpRdWqf SF1mN8nOCesfLeqzYoaUGx9CDU8iq/B9y6/BlTBTd+1reFuR4WAn0mGRflv25vL3 x6DyzAxJwnbD9vJ1Nrv4s4MV6JlVF0taBdt7O/l//H7pmGa0PgXgikHfqPKrDehw LdSc5C3VatnANFs/fXynfGvEMiw6dVE4l6viZScNglKBWMlGENe3v+w+EGv4CULj bSBMwR4y8paeXsZ8As2PSnyWhCEixD/0xnIW+iv/7ez1LDtda8E9nNaChcfYxqLv CyD4y6/5IGiIts/y0kwKFWd7dRxiGfIalzJCcYErj4idHjdrFAdVy4AkxNNZcuun wphosVkwIX5Onrq07nTUqzpMv5A6SqdvUCby9Yi3vlhk+Gy4gb2E9ZRMbRGaZf1t +GOIngotttaUtDQUb+ttcCbLJka6sArWaiJ+Ggc2fIj+enfrvzWzM+dVmte9EQt9 6zPGz96YHtuNQMAXUeTEoZ/tryhD/bvjtajYpYzyHDcA1EabCqo5ItDDuPsHjQj5 xA0F/CMrTxlMtORGoTnookKWgUEbltyIatsY7g7ate3mI5ehVyg= =M0Qt -----END PGP SIGNATURE----- Merge tag 'icc-7.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: This pull request contains the following interconnect updates for the 7.2-rc1 merge window: - New driver for Shikra SoC - New driver for Nord SoC - New driver for Hawi SoC including CPU/LLCC bwmon support - Add missing SDCC nodes for Eliza SoC - Misc cleanups and fixes. Signed-off-by: Georgi Djakov <djakov@kernel.org> * tag 'icc-7.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: add Hawi interconnect provider driver dt-bindings: interconnect: qcom: document the RPMh NoC for Hawi SoC dt-bindings: interconnect: qcom-bwmon: Add Hawi llcc-bwmon compatible interconnect: qcom: eliza: Add SDCC1 slave node dt-bindings: interconnect: qcom,eliza-rpmh: Add SDCC1 slave interconnect: qcom: Restrict drivers per ARM/ARM64 interconnect: qcom: Fix indentation dt-bindings: interconnect: qcom,sm6115: Restrict children and clocks dt-bindings: interconnect: qcom,sm6115: Drop incorrect children if:then: block dt-bindings: interconnect: qcom,sdm660: Disallow clocks when appropriate interconnect: Move MODULE_DEVICE_TABLE next to the table itself interconnect: Do not create empty devres on missing interconnects dt-bindings: interconnect: qcom-bwmon: Add Hawi cpu-bwmon compatible interconnect: qcom: Add interconnect provider driver for Nord SoC dt-bindings: interconnect: Document RPMh Network-On-Chip for Qualcomm Nord SoC interconnect: qcom: add Shikra interconnect provider driver dt-bindings: interconnect: document the RPM Network-On-Chip interconnect in Shikra SoC |
||
|
|
47b56cc367 |
IIO: New device support, features and cleanup for the 7.2 cycle.
Like many areas of the kernel IIO has seen a lot of new contributors though in this case that is not all AI driven, but also reflects and annual surge of student contributions from usp.br. We also have several new regular reviewers who are helping with the surge (thanks to all our active reviewers!) Given there was a lot of cases of similar improvements applied to different drivers, I have grouped those into a special section (various drivers) to avoid mass duplication. New device support ------------------ adi,ad4130 - Add support for AD4129-4, AD4129-8, AD4130-4, AD4131-4 and AD4131-8 after reworking the driver to be suitable for multiple device support. adi,ad4080 - Support the AD4880 and AD4884 dual-channel parts. Interesting parts as have two separate data pipelines (including SPI buses interfaces), but the only current backend IP combines the two so they cannot be treated as independent devices. adi,ad5706r - New driver for this 4 channel current output DAC. adi,ad4691 - New driver supporting this family of ADCs. Support for AD4691, AD4692, AD4693 and AD4694 which support either 8 or 16 channels with different max sampling rates. Feature rich driver including SPI offload support. adi,ltc2983 - Add support for the ADT7604 in which the same sensor die as the LTC2984 is used for leak detection (liquid coverage of a sense area). allwinner,adc - Support for A523 SoCs. Similar to existing parts but with an additional clock. Includes adding support for non contiguous channel lookup for in kernel use (fwnode_xlate callback). broadcomm,apds9999 - New driver for the APDS9999 Ambient Light, RGB and proximity sensor. memsic,mmc5983 - New driver for this 3-axis magnetometer. taos,tsl2772 - Add support for the AVAGO APDS9900 and APDS9901 Ambient Light and Proximity sensors. which are very similar to existing part with slightly different integration time choices. Includes removal of driver for these parts from drivers/misc. vishay,veml3328 - New driver for this RGB+IR light sensor. Features -------- IIO Core - Support for IEEE 754 floating point values in buffer scan elements. - Support quaternion axis representation (missing the scaler part) microchip,mcp4821 - Add configurable gain control qcom,pm8xxx-xoadc - Add per channel labels. st,lsm6dsx - Support for rotation sensing on the LSM6DSV and LSM6DSV16X using both floating point and new quaterionaxis rotation modifier. MAINTAINERS update ------------------ IIO top level entry - Include Documentation/driver-api/iio/ adi,* - Top level ADI entry maintainer switch from Lars-Peter Clausen to Nuno Sá reflecting what has been the reality for some time. Thanks to Lars-Peter who was very active for many years, but has moved on to other things. Also add the linux@analog.com email list to ensure we don't get a gap in future. - Maintainer updates to reflect Cosmin Tanislav having moved on - thanks to Marcelo Schmitt for taking these over. sensiron,scd30 - Replace maintainer (Tomasz Duszynski) with Maxwell Doose. Cleanups, minor fixes and hardening. ------------------------------------ Documentation - Add missing powerdown modes to ABI docs. - Use modern helpers for buffer definition in the examples. core - Rework of the handling of timestamps so that the offset is cached at buffer resize time (during enabling) rather than based on assumption that relied in the timestamp being last and the largest element and so always 8 bytes before end of the scan. Underlying problem was triggered by scans with repeated type elements such as quaternions with each element more than 2 bytes - Giving a 16 byte+ aligned channel with result that a following timestamp may be 16 bytes from end of scan, rather than 8. Note that for the bosch,bno55 a compatibility hack means that it will duplicate the timestamp putting a second copy at previously incorrect location. - Tidy up use of kernel types in buffer code to not use int64_t given all calls use s64. various drivers - Drop unused driver_data in device id tables - includes cleanup of various drivers that had only one choice where it can be hard coded elsewhere. - Move to named initializers for many i2c_device_id and platform_device_id tables (I have no idea how we go into habit of using named initializers for only a subset of the table types - e.g. of_device_id). - Make IIO_CHAN_SOFT_TIMESTAMP() macro a compound literal allowing simple use in various drivers that do dynamic channel definitions. Use it in all such cases. - Use dev_err_probe() and local dev variables to tidy up older drivers. - Switch more drivers to devm_mutex_init() to provide minor debug benefits. - Reorder code to put MODULE_DEVICE_TABLE() next to the tables. - Lots of use of cleanup.h magic to improve code flow, often including related refactors such as introducing helpers. - Replacement of usleep_range() with fsleep() - Reduce logging noise where functions either provide their own extensive reports on error, or where a clear error code is returned to userspace. - Minor spelling and style fixes (improving bracket usage, not using __packed etc) hid-sensors-* - Drop helpers for setting channel bit masks in favor of a compound literal at the call site. Also general cleanup of surrounding code. hid-sensors-magn - Use u32 rather than bare unsigned for types. hid-sensors-rotation - Make sue of ext_scan_type handling for static case rather than duplicate chan_info structures. adi,ad3552r - Use field_get() to replace open coded equivalent. adi,ad4170 - Switch from switch to table lookup for GPIO modes. adi,ad5686 - Apply IWYU principal to included a consistent set of headers. - Deduplicate regmaps for AD5684 and AD5693 as identical. - Switch from an enum value in driver data and array look up to pointers to separate structures, improving readabilty and avoiding issues with 0 value when using helpers to deal with different firmware types. - Add of_match_id table to SPI driver rather than relying on fallback to spi_device_id table. - Introduce some helpers for powerdown mask control. - Add helpers for control sync simplifying a couple of corner cases. - Docs fixes. - Add an ops structure to simplify future addition of operations beyond read and write. adi,ad7191 - Switch to best practice of using device_property_present() to detect if an optional property is there rather than error values on querying the property. adi,ad7280a - Use local variables to improve readability of breaking up chan-address. adi,ad7825 - Cleanup a type mismatch in clamp() call. adi,ad799x - Include improvements - Local dev variable to shorten code lines. - Cache regulator voltage at probe (these never change in practice) - Convert to devm for all unwind handling. adi,ad9832 - Improve include relevance including replacing kernel.h with more specific headers. - Simplify some maths. adi,ad9834 - Improve include relevance including replacing kernel.h with more specific headers. adi,adt7316 - Add a comment to avoid future 'fixes' for error handling during the odd sequence used to flip from I2C mode to SPI mode. adi,adxl* - Documentation consistency improvements. asahi-kasei,ak8975 - Fix missing runtime pm calls for buffered capture. - Fix missing pm_runtime_put_autosuspend() in an error path that would leave the device stuck on. - Close a potential uninitialized kernel stack leak. - Extensive driver modernization including: header relevance, fsleep() various minor bugs, dropping duplicate error messages and avoiding magic lengths for buffers. - Replace opencoded polling with iopoll(). - Add error checking to gpio reads. avia,hx711 - Move scale computation from global data to per device avoiding problems if multiple devices present. - General binding text cleanup. bosch,bmg160 - Add missing mount-matrix entry to binding. bosch,bno55 - Terminate error strings with newlines. devantech,srf08 - Replace sprintf() with sysfs_emit() and sysfs_emit_at() to make intent clearer. freescale,mma8452 - Add missing return value check. - Fix potential probe ordering issue by switching to non devm irq request. linear,ltc2309 - Add chip specific read delays. - Improve chip_info structure, adding __counted_by_ptr marking and reorganizing to improve packing. linear,ltc2983 - Fix a firmware combination where default n_wires of 2 bypasses exclusion of adi,current-rotate whereas explicitly setting it to 2 does not. - Fix potential race with completion reinit. - Improve error message wording consistency. - Use fwnode_property_present() to detect optional properties rather than fragile return value checking. microchip,mcp3422 - Use of GENMASK(), FIELD_GET(), FIELD_PREP() to improve readability and generally modernize driver. microchip,mcp47feb02 - Fix binding example to use a possible I2C address. - Fix binding bounds on channel number. - Standardize binding example indentation nxp,saradc - Increase chances of recovering from a failure in the interrupt handler by notifying the trigger that it can reenable even when the read failed. - Use field_get() to replace opencoded equivalent. qualcomm,* - Standardize on Qualcomm company naming in Kconfig. richtek,rtq6056 - Add i2c_device_id table for legacy instantiation. samsung,ssp - Replace custom timestamp channel macro with main one. sciosense,ens210 - Now scoped_guard() has been reworked, no need for a return that can never be reached. sensiron,scd30 - Constify command lookup table. - Sanity check for NULL buffer of non zero size being provided to sc30_i2c_command() sensortek,stk3310 - Include more appropriate headers. - Ensure interrupt in appropriate mode after resume. - Structure definition improvements. - Use size_of() to replace opencoded sizes. siliconimage,si1133 - Resolve counter related issues on timeout error paths. - Unused macro removal, improved macro definitions,. - Include relevance improvements. st,lsm6dsx - Fix an issue with applying invalid data check to wrong type of sample. taos,tcs3472 - Try to powerdown chip on probe failure. - Devm usage and dropping of remove() callback. - Various other minor cleanup. taos,tsl2591 - Dead code removal. - Simplify tsl2591_persist functions using a look up table. ti,ads1298 - Fix wrong comment on timeout (and minor code improvement) - Drop unnecessary CONFIG2 write during init. ti,ads7950 - Check ret rather that ret < 0 for spi_setup() call. - Use fully devm managed resources including moving to devm_regulator_get_enable_read_voltage() at probe time rather than querying evey time. - Using spi_optimize_message() to reduce CPU usage. ti,ads8688 - User read_avail() callback rather than open coding handling of available attributes. ti,opt3001 - Header relevance improvements - Use GENMASK for field definitions to improve readability. vishay,vcnl4000 - Switch from enum in device_data to individual names structures impmroving code readabililty. - Move to devm handling for remainder of probe. vishay,veml6030 - Drop pointless read of current Iteration Time index as it is not used. xilinx,ams - Fix potential out of bound channel lookup. - Replace some large switch statements with table lookups. yamaha,yas530 - Put label in chip info structure to avoid look up in i2c_device_id table. Drop ---- iio-trig-interrupt. - Not used for some time and no support for modern firmware bindings or in kernel users. So drop it. -----BEGIN PGP SIGNATURE----- iQJFBAABCgAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmolp9kRHGppYzIzQGtl cm5lbC5vcmcACgkQVIU0mcT0FoieAxAArpdsc3rjgjeFxymnbXPWqjohz/XCg3Ps XXxbyaLCvphsJ7P7vsp7acX0vIdi+mqPLU+6Vl67OolFVKM3+84PMoHY3s0wbbMj xDgcI6zR4kwGUpGry9FKr3/UQaSNLo7ahYq7UZKJA8vCoHd11AUzh8TCz/myrdnK Ju6I+FScj6L8lkftaGgYqzHEOoKXQtXaUrYbUFQR/vm9/FlgEkF5qP4pcVxBfAox OtO9jjQOpOAZnTEEbjy6mmEVyuIzOAjLQFxPBzaUuWtZv51P5OZGOS0WNYvt4zvK ziaRPgTIShjUVGkQmhmZ3AjmrYmRjWMhyR58BAyYgqbN/OAwtaJEou8UCDeVQxst B3Tj10VrxuHCEmXvy7ex5SqsKBQ1BHuz3bS8u2znEFp7RcxIorXllRLckpdIFyIa LDyO6krus1mBhLVQ1LVhQNlpi6KKvVD3fcV/14fUoG/ZAP6ta3cdA7jybp1k4aNs PYdlTuJn9jLhRrjHEFaM9hT3St/MRSJ3/rFj4rEHufs3w7iATKWwR9YqcNG8VNFN rGz0aB72J1FxevP3/n5MfXkYUZTmw776Oy/IfB2swXMpH23L2+3b8+ZJUy2HJbBJ 69sjgvEiFkhsJBI8eLe6pEWoD6wkq6KDamcYcgnUNPu8AaC45DLPuGHEPyjzk/AX vuc+ysTUb70= =AW+z -----END PGP SIGNATURE----- Merge tag 'iio-for-7.2a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into work-testing IIO: New device support, features and cleanup for the 7.2 cycle. Like many areas of the kernel IIO has seen a lot of new contributors though in this case that is not all AI driven, but also reflects and annual surge of student contributions from usp.br. We also have several new regular reviewers who are helping with the surge (thanks to all our active reviewers!) Given there was a lot of cases of similar improvements applied to different drivers, I have grouped those into a special section (various drivers) to avoid mass duplication. New device support ------------------ adi,ad4130 - Add support for AD4129-4, AD4129-8, AD4130-4, AD4131-4 and AD4131-8 after reworking the driver to be suitable for multiple device support. adi,ad4080 - Support the AD4880 and AD4884 dual-channel parts. Interesting parts as have two separate data pipelines (including SPI buses interfaces), but the only current backend IP combines the two so they cannot be treated as independent devices. adi,ad5706r - New driver for this 4 channel current output DAC. adi,ad4691 - New driver supporting this family of ADCs. Support for AD4691, AD4692, AD4693 and AD4694 which support either 8 or 16 channels with different max sampling rates. Feature rich driver including SPI offload support. adi,ltc2983 - Add support for the ADT7604 in which the same sensor die as the LTC2984 is used for leak detection (liquid coverage of a sense area). allwinner,adc - Support for A523 SoCs. Similar to existing parts but with an additional clock. Includes adding support for non contiguous channel lookup for in kernel use (fwnode_xlate callback). broadcomm,apds9999 - New driver for the APDS9999 Ambient Light, RGB and proximity sensor. memsic,mmc5983 - New driver for this 3-axis magnetometer. taos,tsl2772 - Add support for the AVAGO APDS9900 and APDS9901 Ambient Light and Proximity sensors. which are very similar to existing part with slightly different integration time choices. Includes removal of driver for these parts from drivers/misc. vishay,veml3328 - New driver for this RGB+IR light sensor. Features -------- IIO Core - Support for IEEE 754 floating point values in buffer scan elements. - Support quaternion axis representation (missing the scaler part) microchip,mcp4821 - Add configurable gain control qcom,pm8xxx-xoadc - Add per channel labels. st,lsm6dsx - Support for rotation sensing on the LSM6DSV and LSM6DSV16X using both floating point and new quaterionaxis rotation modifier. MAINTAINERS update ------------------ IIO top level entry - Include Documentation/driver-api/iio/ adi,* - Top level ADI entry maintainer switch from Lars-Peter Clausen to Nuno Sá reflecting what has been the reality for some time. Thanks to Lars-Peter who was very active for many years, but has moved on to other things. Also add the linux@analog.com email list to ensure we don't get a gap in future. - Maintainer updates to reflect Cosmin Tanislav having moved on - thanks to Marcelo Schmitt for taking these over. sensiron,scd30 - Replace maintainer (Tomasz Duszynski) with Maxwell Doose. Cleanups, minor fixes and hardening. ------------------------------------ Documentation - Add missing powerdown modes to ABI docs. - Use modern helpers for buffer definition in the examples. core - Rework of the handling of timestamps so that the offset is cached at buffer resize time (during enabling) rather than based on assumption that relied in the timestamp being last and the largest element and so always 8 bytes before end of the scan. Underlying problem was triggered by scans with repeated type elements such as quaternions with each element more than 2 bytes - Giving a 16 byte+ aligned channel with result that a following timestamp may be 16 bytes from end of scan, rather than 8. Note that for the bosch,bno55 a compatibility hack means that it will duplicate the timestamp putting a second copy at previously incorrect location. - Tidy up use of kernel types in buffer code to not use int64_t given all calls use s64. various drivers - Drop unused driver_data in device id tables - includes cleanup of various drivers that had only one choice where it can be hard coded elsewhere. - Move to named initializers for many i2c_device_id and platform_device_id tables (I have no idea how we go into habit of using named initializers for only a subset of the table types - e.g. of_device_id). - Make IIO_CHAN_SOFT_TIMESTAMP() macro a compound literal allowing simple use in various drivers that do dynamic channel definitions. Use it in all such cases. - Use dev_err_probe() and local dev variables to tidy up older drivers. - Switch more drivers to devm_mutex_init() to provide minor debug benefits. - Reorder code to put MODULE_DEVICE_TABLE() next to the tables. - Lots of use of cleanup.h magic to improve code flow, often including related refactors such as introducing helpers. - Replacement of usleep_range() with fsleep() - Reduce logging noise where functions either provide their own extensive reports on error, or where a clear error code is returned to userspace. - Minor spelling and style fixes (improving bracket usage, not using __packed etc) hid-sensors-* - Drop helpers for setting channel bit masks in favor of a compound literal at the call site. Also general cleanup of surrounding code. hid-sensors-magn - Use u32 rather than bare unsigned for types. hid-sensors-rotation - Make sue of ext_scan_type handling for static case rather than duplicate chan_info structures. adi,ad3552r - Use field_get() to replace open coded equivalent. adi,ad4170 - Switch from switch to table lookup for GPIO modes. adi,ad5686 - Apply IWYU principal to included a consistent set of headers. - Deduplicate regmaps for AD5684 and AD5693 as identical. - Switch from an enum value in driver data and array look up to pointers to separate structures, improving readabilty and avoiding issues with 0 value when using helpers to deal with different firmware types. - Add of_match_id table to SPI driver rather than relying on fallback to spi_device_id table. - Introduce some helpers for powerdown mask control. - Add helpers for control sync simplifying a couple of corner cases. - Docs fixes. - Add an ops structure to simplify future addition of operations beyond read and write. adi,ad7191 - Switch to best practice of using device_property_present() to detect if an optional property is there rather than error values on querying the property. adi,ad7280a - Use local variables to improve readability of breaking up chan-address. adi,ad7825 - Cleanup a type mismatch in clamp() call. adi,ad799x - Include improvements - Local dev variable to shorten code lines. - Cache regulator voltage at probe (these never change in practice) - Convert to devm for all unwind handling. adi,ad9832 - Improve include relevance including replacing kernel.h with more specific headers. - Simplify some maths. adi,ad9834 - Improve include relevance including replacing kernel.h with more specific headers. adi,adt7316 - Add a comment to avoid future 'fixes' for error handling during the odd sequence used to flip from I2C mode to SPI mode. adi,adxl* - Documentation consistency improvements. asahi-kasei,ak8975 - Fix missing runtime pm calls for buffered capture. - Fix missing pm_runtime_put_autosuspend() in an error path that would leave the device stuck on. - Close a potential uninitialized kernel stack leak. - Extensive driver modernization including: header relevance, fsleep() various minor bugs, dropping duplicate error messages and avoiding magic lengths for buffers. - Replace opencoded polling with iopoll(). - Add error checking to gpio reads. avia,hx711 - Move scale computation from global data to per device avoiding problems if multiple devices present. - General binding text cleanup. bosch,bmg160 - Add missing mount-matrix entry to binding. bosch,bno55 - Terminate error strings with newlines. devantech,srf08 - Replace sprintf() with sysfs_emit() and sysfs_emit_at() to make intent clearer. freescale,mma8452 - Add missing return value check. - Fix potential probe ordering issue by switching to non devm irq request. linear,ltc2309 - Add chip specific read delays. - Improve chip_info structure, adding __counted_by_ptr marking and reorganizing to improve packing. linear,ltc2983 - Fix a firmware combination where default n_wires of 2 bypasses exclusion of adi,current-rotate whereas explicitly setting it to 2 does not. - Fix potential race with completion reinit. - Improve error message wording consistency. - Use fwnode_property_present() to detect optional properties rather than fragile return value checking. microchip,mcp3422 - Use of GENMASK(), FIELD_GET(), FIELD_PREP() to improve readability and generally modernize driver. microchip,mcp47feb02 - Fix binding example to use a possible I2C address. - Fix binding bounds on channel number. - Standardize binding example indentation nxp,saradc - Increase chances of recovering from a failure in the interrupt handler by notifying the trigger that it can reenable even when the read failed. - Use field_get() to replace opencoded equivalent. qualcomm,* - Standardize on Qualcomm company naming in Kconfig. richtek,rtq6056 - Add i2c_device_id table for legacy instantiation. samsung,ssp - Replace custom timestamp channel macro with main one. sciosense,ens210 - Now scoped_guard() has been reworked, no need for a return that can never be reached. sensiron,scd30 - Constify command lookup table. - Sanity check for NULL buffer of non zero size being provided to sc30_i2c_command() sensortek,stk3310 - Include more appropriate headers. - Ensure interrupt in appropriate mode after resume. - Structure definition improvements. - Use size_of() to replace opencoded sizes. siliconimage,si1133 - Resolve counter related issues on timeout error paths. - Unused macro removal, improved macro definitions,. - Include relevance improvements. st,lsm6dsx - Fix an issue with applying invalid data check to wrong type of sample. taos,tcs3472 - Try to powerdown chip on probe failure. - Devm usage and dropping of remove() callback. - Various other minor cleanup. taos,tsl2591 - Dead code removal. - Simplify tsl2591_persist functions using a look up table. ti,ads1298 - Fix wrong comment on timeout (and minor code improvement) - Drop unnecessary CONFIG2 write during init. ti,ads7950 - Check ret rather that ret < 0 for spi_setup() call. - Use fully devm managed resources including moving to devm_regulator_get_enable_read_voltage() at probe time rather than querying evey time. - Using spi_optimize_message() to reduce CPU usage. ti,ads8688 - User read_avail() callback rather than open coding handling of available attributes. ti,opt3001 - Header relevance improvements - Use GENMASK for field definitions to improve readability. vishay,vcnl4000 - Switch from enum in device_data to individual names structures impmroving code readabililty. - Move to devm handling for remainder of probe. vishay,veml6030 - Drop pointless read of current Iteration Time index as it is not used. xilinx,ams - Fix potential out of bound channel lookup. - Replace some large switch statements with table lookups. yamaha,yas530 - Put label in chip info structure to avoid look up in i2c_device_id table. Drop ---- iio-trig-interrupt. - Not used for some time and no support for modern firmware bindings or in kernel users. So drop it. * tag 'iio-for-7.2a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (266 commits) iio: adc: nxp-sar-adc: harden buffer ISR against per-channel read failure iio: chemical: scd30: Replace manual locking with RAII locking iio: light: tsl2591: remove unneeded tsl2591_compatible_als_persist_cycle() iio: dac: ad5686: create bus ops struct iio: dac: ad5686: cleanup doc header of local structs iio: dac: ad5686: add control_sync() for single-channel devices iio: dac: ad5686: add helpers to handle powerdown masks iio: dac: ad5686: add of_match table to the spi driver iio: dac: ad5686: drop enum id iio: dac: ad5686: remove redundant register definition iio: dac: ad5686: refactor include headers iio: adc: ad4080: fix AD4880 chip ID iio: light: veml3328: add support for new device dt-bindings: iio: light: veml6030: add veml3328 docs: iio: adc: ad4691: add driver documentation iio: adc: ad4691: add oversampling support iio: adc: ad4691: add SPI offload support iio: adc: ad4691: add triggered buffer support iio: adc: ad4691: add initial driver for AD4691 family dt-bindings: iio: adc: add AD4691 family ... |
||
|
|
39f9c91bce |
MHI Host
-------- - Request power-of-2 MSI vectors from pci_generic driver for sanity. - Add support for Telit FE910C04 modem based on Qcom SDX35 chipset - Fix the check used to identify the physical functions to work with both SR-IOV and non-SR-IOV devices MHI Endpoint ------------ - Fix a potential deadlock in the mhi_ep_reset_worker() helper - Add lock around mhi_ep_handle_syserr() in the error path to avoid race in setting MHI state in the error path - Add missing state_lock protection for mhi_state access -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEZ6VDKoFIy9ikWCeXVZ8R5v6RzvUFAmoifS4ACgkQVZ8R5v6R zvVpBQf+LlDiVt1mJwA0hiwUwcsitoz83D1jSMbmOwmdH68NuivfnAMbyYDhah8b 43t9XmCVXq9Cznx5JlB8jss+9DfECbcY+eQwsQp9N9yLb3FyB6D+v+MaaZeiYyDq yRPg7Q7gz767iHqf7D6uMS1tsIc6tS7ZU2hOdnTpOjC5tr5no0qr6Dr9SyQDVV40 7CTlSQJsjHj6VoamDrCB+eEOsvraGOxVpKijHX34Xzu+Tm0qfrDsuP/lKRehFDhw vinsY2ihhCuyY8VEIT5rC6vh55ZmNYHInvQ/UfR+UVDxbpXd+PpK57j7kX55eXlv Vr0AxwcNc/rVgPUGISfUaQyQYkt2Zg== =yy/J -----END PGP SIGNATURE----- Merge tag 'mhi-for-v7.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Host -------- - Request power-of-2 MSI vectors from pci_generic driver for sanity. - Add support for Telit FE910C04 modem based on Qcom SDX35 chipset - Fix the check used to identify the physical functions to work with both SR-IOV and non-SR-IOV devices MHI Endpoint ------------ - Fix a potential deadlock in the mhi_ep_reset_worker() helper - Add lock around mhi_ep_handle_syserr() in the error path to avoid race in setting MHI state in the error path - Add missing state_lock protection for mhi_state access * tag 'mhi-for-v7.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: pci_generic: Fix the physical function check bus: mhi: ep: Protect mhi_ep_handle_syserr() in the error path bus: mhi: host: pci_generic: Add Telit FE910C04 modem support bus: mhi: ep: Add missing state_lock protection for mhi_state access bus: mhi: ep: Fix potential deadlock in mhi_ep_reset_worker() bus: mhi: host: pci_generic: Round up nr_irqs to power of two |
||
|
|
b23338788b |
FPGA Manager changes for 7.2-rc1
- Wentao fixes use-after-free issue in of-fpga-region - Phil adds the of matching for Altera ts73xx fpga driver - Ian adds Efinix FPGA SPI programming driver - Andy fixes several minor issues for Lattice FPGA driver - Manish converts dt-bindings to YAML schema for several Altera devices - Sebastian fixes several minor issues for Intel DFL & Microchip FPGAs All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun <yilun.xu@intel.com> -----BEGIN PGP SIGNATURE----- iIkEABYIADEWIQSgSJpClIeaArXyudb8twOBpKCM2gUCaiD6nRMceWlsdW4ueHVA aW50ZWwuY29tAAoJEPy3A4GkoIzaRK0BAL/tryz4yA9F/7hO5gmTT2ke+LfWn/pH 7NmskFCd76svAQDSGvndrW6rquHdoD7A5ZTwY7MRY1NlFdoZCfUfxtt/Ag== =/REE -----END PGP SIGNATURE----- Merge tag 'fpga-for-7.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: FPGA Manager changes for 7.2-rc1 - Wentao fixes use-after-free issue in of-fpga-region - Phil adds the of matching for Altera ts73xx fpga driver - Ian adds Efinix FPGA SPI programming driver - Andy fixes several minor issues for Lattice FPGA driver - Manish converts dt-bindings to YAML schema for several Altera devices - Sebastian fixes several minor issues for Intel DFL & Microchip FPGAs All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun <yilun.xu@intel.com> * tag 'fpga-for-7.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: microchip-spi: fix zero header_size OOB read in mpf_ops_parse_header() fpga: dfl-afu: validate DMA mapping length in afu_dma_map_region() fpga: dfl: add bounds check in dfh_get_param_size() dt-bindings: fpga: altr,socfpga-fpga-mgr: convert to DT schema dt-bindings: fpga: altr,a10-pr-ip: convert to DT schema fpga: lattice-sysconfig-spi: simplify with spi_get_device_match_data() fpga: lattice-sysconfig-spi: Don't use "proxy" headers fpga: lattice-sysconfig-spi: Drop of_match_ptr() protection fpga: lattice-sysconfig-spi: Fix the terminator entries in ID tables fpga-mgr: Add Efinix SPI programming driver dt-bindings: fpga: Add Efinix SPI programming bindings dt-bindings: vendor-prefix: Add prefix for Efinix, Inc. fpga: ts73xx-fpga: add OF match table for device tree probing dt-bindings: fpga: Add Technologic Systems TS-7300 FPGA Manager fpga: region: fix use-after-free in child_regions_with_firmware() |
||
|
|
099b02d3dd |
Counter updates for 7.2
Manual mutex lock logic is replaced by lock guards in intel-qep. Additionally, devm_mutex_init() is now used in ftm-quaddec, interrupt-cnt, and intel-qep to handle mutex cleanup automatically. -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCah5CrwAKCRC1SFbKvhIj K0X3AQCy8OkON3wzX/rd+5P1er9zxXcxEs0cTN7NUwkiqPEosgEAtIKiEKehqczG CeyORY94TwVnADpCYMXGLpELnb43eQ8= =b4nq -----END PGP SIGNATURE----- Merge tag 'counter-updates-for-7.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: Counter updates for 7.2 Manual mutex lock logic is replaced by lock guards in intel-qep. Additionally, devm_mutex_init() is now used in ftm-quaddec, interrupt-cnt, and intel-qep to handle mutex cleanup automatically. * tag 'counter-updates-for-7.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: intel-qep: Use devm_mutex_init() counter: interrupt-cnt: use devm_mutex_init() counter: ftm-quaddec: use devm_mutex_init() counter: intel-qep: Replace manual mutex logic with lock guards |
||
|
|
71e6a19fe2 |
firmware: stratix10-svc: Add support to query Arm Trusted Firmware (ATF) version
Add entry in Stratix10 service layer that allow client to retrieve the ATF version at runtime, which is useful for system diagnostics, compatibility checks, and ensuring the correct secure firmware is in use. The change introduces: - A new service command definition in the Stratix10 service layer to initiate the ATF version query. - A corresponding macro definition in the header file to expose the command ID for use by other components. The service layer uses a Secure Monitor Call (SMC) to communicate with the ATF and retrieve the version string, which can then be logged or validated by client application. Signed-off-by: Tze Yee Ng <tze.yee.ng@altera.com> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> |
||
|
|
30b1f763bf |
firmware: stratix10-rsu: avoid blocking reboot_image sysfs when busy
Writes to the reboot_image sysfs attribute went through rsu_send_msg(),
which unconditionally takes priv->lock with mutex_lock(). If another RSU
operation is in flight (e.g. a DCMF status query from probe or a
concurrent sysfs read path), userspace writers get stuck in the kernel
waiting on the mutex instead of being told the device is busy.
Split rsu_send_msg() into an inner __rsu_send_msg_locked() helper that
performs the SMC transaction with the caller holding priv->lock, plus
two thin wrappers: rsu_send_msg() preserves the original blocking
behaviour for existing callers, and rsu_try_send_msg() uses
mutex_trylock() and returns -EBUSY immediately when the lock is held.
Use rsu_try_send_msg() from reboot_image_store() so the write returns
-EBUSY without blocking when an RSU operation is already running.
Userspace can retry on -EBUSY. No functional change for other sysfs
attributes.
This keeps blocking rsu_send_msg() for existing callers, add
rsu_try_send_msg() with -EBUSY only for reboot_image_store(). That
matches the original goal (avoid a second reboot_image write blocking
behind priv->lock) without changing sysfs behaviour for the other
attributes. The earlier idea of using mutex_trylock() in all of
rsu_send_msg() and returning -EAGAIN would have been harder to justify
for userspace (echo does not retry on that).
Tze Yee tested the patch on an Agilex SoC devkit.
[Test 1] Idle reboot_image write (success path)
Result:
# insmod stratix10-rsu.ko
# echo 0x01000000 > .../reboot_image
# echo "exit=$?"
exit=0
# ./rsu_client --log
VERSION: 0x00000202
STATE: 0x00000000
CURRENT IMAGE: 0x0000000001000000
FAIL IMAGE: 0x0000000000000000
ERROR LOC: 0x00000000
ERROR DETAILS: 0x00000000
RETRY COUNTER: 0x00000000
Operation completed
[Test 2] reboot_image while priv->lock is held (-EBUSY path)
To get a deterministic busy window without flooding the service layer,
add a local debug helper (module parameter debug_hold_lock_sec +
kthread that holds priv->lock for N seconds after probe).
Result:
# insmod stratix10-rsu.ko debug_hold_lock_sec=60
[ 121.220904] stratix10-rsu stratix10-rsu.0: TEST: RSU lock held for
60 s - try reboot_image now
# echo 0x01000000 > .../reboot_image
-sh: echo: write error: Device or resource busy
# echo "during hold: exit=$?"
during hold: exit=1
[ 183.268706] stratix10-rsu stratix10-rsu.0: TEST: RSU lock released
# echo 0x01000000 > .../reboot_image
# echo "after release: exit=$?"
after release: exit=0
Together, these results match the intended behaviour: reboot_image
fails fast with -EBUSY when the RSU mutex is already held, and
succeeds once the lock is available.
Assisted-by: Claude:claude-opus-4-7
Tested-by: Tze Yee Ng <tze.yee.ng@altera.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
|
||
|
|
98495b5a4d |
coresight: ultrasoc-smb: Fix OOB write in smb_sync_perf_buffer()
When the SMB sink is used as a perf AUX sink, smb_update_buffer() calls
smb_sync_perf_buffer() to copy hardware trace data into the perf AUX ring
buffer pages. It derives pg_idx = head >> PAGE_SHIFT from @head, which is
handle->head, and indexes dst_pages[pg_idx]. The pg_idx %= nr_pages
normalization is only applied after the first loop iteration.
This leaves the initial page index underived from the buffer size, which
can result in an out-of-bounds write past dst_pages[] when head exceeds
the AUX buffer size.
Normalize head modulo the AUX buffer size before deriving the page index
and offset, mirroring tmc_etr_sync_perf_buffer().
Fixes:
|
||
|
|
ae696dfa47 |
iio: adc: nxp-sar-adc: harden buffer ISR against per-channel read failure
nxp_sar_adc_isr_buffer() bails on the first channel-read failure without calling iio_trigger_notify_done(), so the trigger use_count is left incremented and iio_trigger_poll_chained() drops subsequent dispatches until the device is rebound. Reaching this path means a state machine has gone wrong (driver bug or the SAR ADC in an unexpected state) rather than a transient bus issue, so this is hardening rather than a bug fix. If the underlying condition persists the device is wedged and needs an unbind anyway. Call iio_trigger_notify_done() on the error exit too, matching the success path. The nxp_sar_adc_read_notify() duplication is intentional and avoids a goto label for a two-line bail-out, as suggested by David. Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
eb60a24b35 |
iio: chemical: scd30: Replace manual locking with RAII locking
scd30_core.c currently uses manual mutex_lock() and mutex_unlock() calls. Replace them with the newer guard(mutex)() for cleaner RAII patterns and to improve maintainability. Add new helper function scd30_trigger_handler_helper() containing the critical section for scd30_trigger_handler(). In addition, small refactor to replace "?:" operator with regular if/else returns. Signed-off-by: Maxwell Doose <m32285159@gmail.com> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
b1d1bfa26c |
iio: light: tsl2591: remove unneeded tsl2591_compatible_als_persist_cycle()
The function was only used to verify if als_persist is a TSL2591_PRST_ALS_INT_CYCLE_* value. However, before its call in tsl2591_write_event_value(), the line als_persist = tsl2591_persist_lit_to_cycle(period) is executed, meaning that by the time tsl2591_compatible_als_persist_cycle() is reached, als_persist is a TSL2591_PRST_ALS_INT_CYCLE_* value, making the verification pointless. Suggested-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/patchset/20260528185912.24774-1-matheus.feitosa%40usp.br Signed-off-by: Lucas Rabaquim <lucas.rabaquim@usp.br> Co-developed-by: Matheus Silveira <matheus.feitosa@usp.br> Signed-off-by: Matheus Silveira <matheus.feitosa@usp.br> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
ae8360f371 |
iio: dac: ad5686: create bus ops struct
Create struct with bus operations, which will be used to extend bus implementation features. Auxiliary functions ad5686_write() and ad5686_read() are created and ad5686_probe() now receives an ops struct pointer rather than individual read and write functions. Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
883a752cc4 |
iio: dac: ad5686: cleanup doc header of local structs
Review documentation comment header for ad5686_chip_info and ad5686_state. Update variable names and description and remove unnecessary blank line between comment and struct declaration. Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
592b378791 |
iio: dac: ad5686: add control_sync() for single-channel devices
Create ad5310_control_sync() and ad5683_control_sync() functions that properly consume the mask definitions with FIELD_PREP(). This allows to reuse a function that updates the control register with cached values, without relying on confusing logic that depends on st->use_internal_vref, which is initialized earlier in ad5686_probe() because it is also applicable to the AD5686_REGMAP case, removing the need for the has_external_vref. Powerdown masks initialization is simplified as *_control_sync() masks outs any unused bits for the single-channel case. The change cleans up ad5686_write_dac_powerdown() and ad5686_probe(), organizing the code for feature extension, e.g. gain control support for single-channel devices. Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
16fc40c250 |
iio: dac: ad5686: add helpers to handle powerdown masks
Add ad5686_pd_field_set() and ad5686_pd_field_get() helpers to cleanup powerdown mask control. Define AD5686_PD_* constants, e.g. AD5686_PD_MSK to hold powerdown mask value for a single channel. AD5686_LDAC_PWRDN_* macros are replaced by AD5686_PD_MODE_*, because they are unused and the LDAC feature for async load of DAC channel values is not related to power down control. Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
34222a4549 |
iio: dac: ad5686: add of_match table to the spi driver
Add of_match table for the SPI device variants to be consistent with the AD5696 I2C driver. Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
0eb1728461 |
iio: dac: ad5686: drop enum id
Split chip info table into separate structs and expose them to the spi i2c drivers. That is the preferrable approach and allows for the drivers to have knowledge of the device info before the common probe function gets called. Those chip info structs may be shared by SPI and I2C driver variants. Channel declaration definitions are grouped according to channel count and DECLARE_AD5693_CHANNELS() macro is renamed to DECLARE_AD5683_CHANNELS() to match the regmap_type enum. Use spi_get_device_match_data() and i2c_get_match_data() to get chip info struct reference, passing it as parameter to the core probe function. Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
126c786840 |
iio: dac: ad5686: remove redundant register definition
AD5683_REGMAP and AD5693_REGMAP behave the same way in the common code, and that is because they target single channel devices from the same sub-family. There is no reason to separate them and it will make things simpler when refactoring the chip info table. Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
628105e8f7 |
iio: dac: ad5686: refactor include headers
Apply IWYU principle, replacing unused/generic headers for specific/missing headers. The resulting include directive lists are sorted accordingly. Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
c82228f76a |
Linux 7.1-rc6
-----BEGIN PGP SIGNATURE----- iQFSBAABCgA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmocssAeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGsvMIAIYkDW1HujnkP3/G SzQuQozH30O8Fpxdo+axRG6DweP2DTW1lD35YPJJsVto0G2BJZVjzsrx8RSgV6uz DDY+Y0x0/VknMZ4JDrDoWRIyHaVV6p3+NcSHhwrxctQsa8UdEf4aXGaTf91nIBSB GCX5R2YxxuQSTMZ19F/e+UShnRC5OO0FbCB5xhSnUJX3+eoRe0mcGAQB4DBUKxsx BZ5DMOmoiEyPFJbdmy11X0epgJ32qgL7HPYLEo44Vcfy/Ot9lrL9b4vKbG+b3N1P YAZccYH/dlpUuk7piR37H87Ntgz/SZcYbJlx2iAWoNk4tMmfRUO16igar8yFHjSt FLN2Zx4= =ufVr -----END PGP SIGNATURE----- Merge tag 'v7.1-rc6' into work Linux 7.1-rc6 |
||
|
|
3f2d03ecf2 |
iio: adc: ad4080: fix AD4880 chip ID
The AD4880 chip ID was incorrectly set to 0x0750. According to the datasheet, the product ID registers read 0x00 (PRODUCT_ID_H) and 0x59 (PRODUCT_ID_L), giving a combined chip ID of 0x0059. Fix the value to match the actual hardware. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
e45a44f219 |
iio: light: veml3328: add support for new device
Add support for the Vishay VEML3328 RGB/IR light sensor communicating via I2C (SMBus compatible). Also add a new entry for said driver into Kconfig and Makefile. Assisted-by: Gemini:3.1-Pro Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
da61573f78 |
Linux 7.1-rc6
-----BEGIN PGP SIGNATURE----- iQFSBAABCgA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmocssAeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGsvMIAIYkDW1HujnkP3/G SzQuQozH30O8Fpxdo+axRG6DweP2DTW1lD35YPJJsVto0G2BJZVjzsrx8RSgV6uz DDY+Y0x0/VknMZ4JDrDoWRIyHaVV6p3+NcSHhwrxctQsa8UdEf4aXGaTf91nIBSB GCX5R2YxxuQSTMZ19F/e+UShnRC5OO0FbCB5xhSnUJX3+eoRe0mcGAQB4DBUKxsx BZ5DMOmoiEyPFJbdmy11X0epgJ32qgL7HPYLEo44Vcfy/Ot9lrL9b4vKbG+b3N1P YAZccYH/dlpUuk7piR37H87Ntgz/SZcYbJlx2iAWoNk4tMmfRUO16igar8yFHjSt FLN2Zx4= =ufVr -----END PGP SIGNATURE----- Merge tag 'v7.1-rc6' into char-misc-next We need the char/misc/iio fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
|
|
278b9d0fce |
dt-bindings: iio: light: veml6030: add veml3328
The Vishay VEML3328 is an RGBCIR light sensor that shares similar devicetree properties as other existing VEMLxxxx sensors in the kernel. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
43a1974da6 |
fpga: microchip-spi: fix zero header_size OOB read in mpf_ops_parse_header()
mpf_ops_parse_header() reads header_size from the bitstream at
MPF_HEADER_SIZE_OFFSET (24). When header_size is zero, the expression
*(buf + header_size - 1) reads one byte before the buffer start.
Since initial_header_size is set to 71 in mpf_ops, the fpga-mgr core
guarantees the buffer is large enough to reach MPF_HEADER_SIZE_OFFSET.
The only real gap is the zero header_size case, which cannot be
resolved by providing a larger buffer, so return -EINVAL.
Fixes:
|
||
|
|
fc3b071a7c |
fpga: dfl-afu: validate DMA mapping length in afu_dma_map_region()
afu_ioctl_dma_map() accepts a 64-bit length from userspace via
DFL_FPGA_PORT_DMA_MAP ioctl without an upper bound check. The value
is passed to afu_dma_pin_pages() where npages is derived as
length >> PAGE_SHIFT and passed to pin_user_pages_fast() which takes
int nr_pages, causing implicit truncation if length is very large.
Validate map.length at the ioctl entry point before calling
afu_dma_map_region(), rejecting values whose page count exceeds
INT_MAX.
Fixes:
|
||
|
|
9e8bc49f91 |
fpga: dfl: add bounds check in dfh_get_param_size()
dfh_get_param_size() can return a parameter size larger than the feature
region because the loop bounds check is evaluated before incrementing
size. If the EOP (End of Parameters) bit is set in the same iteration,
the inflated size is returned without re-validation against max.
This can cause create_feature_instance() to call memcpy_fromio() with a
size exceeding the ioremap'd region when a malicious FPGA device provides
crafted DFHv1 parameter headers.
Add a bounds check after the size increment to ensure the accumulated
size never exceeds the feature boundary.
Fixes:
|
||
|
|
e43ffb69e0 | Linux 7.1-rc6 | ||
|
|
8d9c51eac6 |
[GIT PULL for v7.1-rc6] media fixes
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmocey8ACgkQCF8+vY7k 4RVECg//S/RyTkfjj+T98e7/mfmTDvCGt0Yf3ZqrZFpKG86Abea7itEzUkOWHLBy eiJPvQIN2DX1ShIUl2FCA7WLb0tcrWDthQnXEjiY6FIsxJ9vFOO1xt3ITTIEBoV4 yWepMVxbWYcG/Keo8CHb3JqopOpiuJD5GARSEXBLAq/1qib8RYFBR1mrkIlSRJm6 22vso92qMFutAgVGbIlCbrh+xQ4UphpvVj1PEGe/eFA5P0zF1y0tpwc+ZIXUV855 w8ZfVHBJH6CWpwNyBqSVc012rzKFmZafoZi4iENIbOMSeeq/aNNk31zW5DurQ4I+ qcb9usbhHdfDTDCelfdaIXyUX7EaFkXJUu/n9hIYjSxVR9hRTwwVWsoGCyWBIMdl Q+nW1JnRlKo3Qc8Yh7h3Pvb0v38kqzzoOQKXdsMdmkzgkMlnEn/dy5mkVyKAmRN6 E7RECkfOehRnWLFGHaLIbcqLCurIOVcpfqZKaTDC1wTE8UeMb9XBNDDKRyqpMABQ rFowKDtkwFXsJtAqfpgF1nwanJD9alMkgBAAKti/QkbLuJKLN7yxyhx0i/pUEy7i 0Oe/JQ+xHnnozeVpLQtQS2fLu7Dbni2B4M06J1MO5N4AZIlHpMOVjGpOhzDyIiZb BMu1w28zPzsfGhInm8dE0uVg5COG8Tp9BhMgXJyIJdiG23hPoIc= =52nn -----END PGP SIGNATURE----- Merge tag 'media/v7.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - rc: igorplugusb: fix control request setup packet - vsp1: revert a couple patches to fix regressions when setting DRM pipelines * tag 'media/v7.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: rc: igorplugusb: fix control request setup packet Revert "media: renesas: vsp1: brx: Fix format propagation" Revert "media: renesas: vsp1: Initialize format on all pads" |
||
|
|
968966c282 |
Miscellaneous x86 fixes:
- Make the clearcpuid= boot parameter less prominent
and warn about its dangers & caveats (Borislav Petkov)
- Do not access the (new) PLATFORM_ID MSR when running as a guest
(Borislav Petkov)
- x86 ftrace: Relocate %rip-relative percpu refs in dynamic
trampolines, to fix crash when using such trampolines
(Alexis Lothoré)
- Fix x86-64 CFI build error (Peter Zijlstra)
- Revert FPU signal return magic number check optimization, because
it broke CRIU and gVisor in certain FPU configurations
(Andrei Vagin)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-----BEGIN PGP SIGNATURE-----
iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmob2swRHG1pbmdvQGtl
cm5lbC5vcmcACgkQEnMQ0APhK1jCdA//aKJpLZRwT3cHs/Wmu8oh+MbWVcOJqavz
Vkdbh5EEDQJ0/HAbrt/ms3gismg08GBTSpycJIKCF+p98n0s3hjBSzVJjF1kLbT+
vCZH4M3qXiYylghu+gHCYwCPr8cWEWjf+x8nIBlBdHgDPJ88g09VHmtHRdnwFMOt
lA6lew7UfNlUqxMA6p58elIZtbJvRG7QpUHHjOidut5uBSvrij08vPo1IYFAqUw8
DvQnvXEv1jit8zAOp7gQDheqdzP058zk6kR177taIxLDJsJlqL8ozJRDW4NB72v2
HBaj8DiXzsXyovck/H/t36nv5ikotNjDvlP31RZfTZ5VIlfvyNPF1vb38kC8lVlC
gfq2H8Bw3pktldDKTFh0f1XnkmmiDTEf/zsDqeMSDXfF4t5LPw15nfRLzU9rO4nd
po6s9GhLdo5lOv6BG2dsFhYxLSZTEHFTe03Q8EzGNgYUJupJVAtRwmnGQP0zv9QJ
/nMUhZQPGN5PCeXo2YMdyB+wWaKVRjfAE2lz/V97Vb3WfjSAQ1eF+kb0keDFFwQD
3HQq8k2nxLFIXEX7LJa+qTH2Hnu0PZgoy9yRreo2sOaUHcTfzAIxyT5RzeKl+eDw
0wUjDGkXS7vCzIOMp4+H2HC3r5aeCTX9YY0XWhxs8M0UcGzO8XEKdgjJTD6KiKCY
RX9Uj2FmmIA=
=4sLh
-----END PGP SIGNATURE-----
Merge tag 'x86-urgent-2026-05-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
- Make the clearcpuid= boot parameter less prominent
and warn about its dangers & caveats (Borislav Petkov)
- Do not access the (new) PLATFORM_ID MSR when running
as a guest (Borislav Petkov)
- x86 ftrace: Relocate %rip-relative percpu refs in dynamic
trampolines, to fix crash when using such trampolines
(Alexis Lothoré)
- Fix x86-64 CFI build error (Peter Zijlstra)
- Revert FPU signal return magic number check optimization,
because it broke CRIU and gVisor in certain FPU configurations
(Andrei Vagin)
* tag 'x86-urgent-2026-05-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
Revert "x86/fpu: Refine and simplify the magic number check during signal return"
x86/kvm/vmx: Fix x86_64 CFI build
x86/ftrace: Relocate %rip-relative percpu refs in dynamic trampolines
x86/microcode: Do not access MSR_IA32_PLATFORM_ID when running as a guest
Documentation/arch/x86: Hide clearcpuid=
|
||
|
|
13bd441bb9 |
SCSI fixes on 20260531
Two core changes, the only one of significance being the change to kick queues in SDEV_CANCEL which had a small window for stuck requests. The major driver fixes are the one to the FC transport class to widen the FPIN counter to counter a theoretical (and privileged) fabric traffic injection attack and the other is an iscsi fix where a malicious target could trick the kernel into an output buffer overrun. Both the driver fixes were AI assisted. Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> -----BEGIN PGP SIGNATURE----- iLgEABMIAGAWIQTnYEDbdso9F2cI+arnQslM7pishQUCahxQ/RsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDImHGphbWVzLmJvdHRvbWxleUBoYW5zZW5wYXJ0bmVy c2hpcC5jb20ACgkQ50LJTO6YrIX+HgD+Mqf+AKbV/EhPhKAfONeBaE0Q5e78KTyK 3e47Qxjs+mQBAKhWUwodLDS/WSm7Fbdj7tn/kuPSaH+R+JQltnPR4QPG =BRJ7 -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two core changes, the only one of significance being the change to kick queues in SDEV_CANCEL which had a small window for stuck requests. The major driver fixes are the one to the FC transport class to widen the FPIN counter to counter a theoretical (and privileged) fabric traffic injection attack and the other is an iscsi fix where a malicious target could trick the kernel into an output buffer overrun. Both the driver fixes were AI assisted" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target: iscsi: Validate CHAP_R length before base64 decode scsi: target: iscsi: Bound iscsi_encode_text_output() appends to rsp_buf scsi: target: iscsi: Fix CRC overread and double-free in iscsit_handle_text_cmd() scsi: fcoe: Reject FIP descriptors with zero fip_dlen in CVL walker scsi: scsi_transport_fc: Widen FPIN pname walker counter to u32 scsi: scsi_debug: Add missing newline in scsi_debug_device_reset() scsi: megaraid_sas: Fix NULL pointer dereference on firmware duplicate completion scsi: devinfo: Add BLIST_NO_RSOC for Promise VTrak E310f scsi: core: Run queues for all non-SDEV_DEL devices from scsi_run_host_queues |
||
|
|
9cf1afe6de |
i2c-for-7.1-rc6
davinci: fix fallback bus frequency on missing clock-frequency virtio: mark device ready initially -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmocCPMACgkQFA3kzBSg KbaSxw/+Kp+Rcj0G2RTRqpf5d7V9KIY35l+7gerd8/F7+zfIVNDJrz0FQfiTn6hr nB0EPmKtq1VnJDMxCFeCT0P4AoNBFbGCXxmCXkVnypUiLeHooBFZH5d8f+HCII4c t72HKZ0OgitAu12ApgnNFuMoInUnVrQy64DfIjkDxQLWva08WfW2mT74Ok61OJHd TjgononOu/Tsrk/F0fekRdxfAXx8myULOG/kLIxRNlv4ysv962ros2t0i05PtYyg z+wz0uZ1KP06nmOwZz0Pm1dlVHNuAlWqfzczF4Drts4Qj3vIHhuhIVQM4zGdylSR 39KGiDmpOomPg9OIg70iMGw/FBDPd6UcOj20AWrTKsRENTU2xnIslQ/9Nk00RF7Q mP1kBolEkaXF7pugdeBDDWi7iwbawT6dpKlv/hSr6hAnBJXnLO+QxXaMproEl/1f igRoYx/Q/BCozYp3aR7ZahUKUF+xfpIkSfFZ02DUcbf2mBsSmQNXwN1VjrUkBqnQ VSYLZsBz+kqgkF+yAr2sL7BfTYzFCKeJMPOfBK4OF3wXZ43omCCWzr2hxMTGehTS 17K5lHtzxneaAdTDLrFDUe8YBMSvKRolGcnIcnrNM/4fc7QEYBDaYns6j05vpnrP +4rDv4Db/hRxL6FsUuVaMc5aW9tdT+oxkVv9jea+2EbI7rxdqIM= =AcAd -----END PGP SIGNATURE----- Merge tag 'i2c-for-7.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - davinci: fix fallback bus frequency on missing clock-frequency - virtio: mark device ready initially * tag 'i2c-for-7.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: virtio: mark device ready before registering the adapter i2c: davinci: fix division by zero on missing clock-frequency |
||
|
|
227abb780c |
Input updates for v7.1-rc5
- updates to Elan I2C touchpad driver to handle a new IC type and to validate size of supplied firmware to prevent OOB access - updates to Xpad controller driver to recognize ASUS ROG RAIKIRI II and "Nova 2 Lite" from GameSir controllers as well as a fix to prevent a potential OOB access when handling "Share" button - an update to Synaptics touchpad driver to use RMI mode for touchpad in Thinkpad E490 - updates to Atmel MXT driver adding checks to prevent potential OOB accesses - a fix to IMS PCU driver to free correct amount of memory when tearing it down - a fixup to the recent change to Atlas buttons driver - a small cleanup in fm801-fp for PCI IDs table initialisation -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCahvBFwAKCRBAj56VGEWX nP7XAQDH9WIYBX7XEHSPInN6GH8GngWA/94v3b6UpBSL2UFdQQEAo1+WoyOGL/Dh 0U0g5CcvDwx9irF8qJBWX2a3DRNPngo= =hDBA -----END PGP SIGNATURE----- Merge tag 'input-for-v7.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - updates to Elan I2C touchpad driver to handle a new IC type and to validate size of supplied firmware to prevent OOB access - updates to Xpad controller driver to recognize ASUS ROG RAIKIRI II and "Nova 2 Lite" from GameSir controllers as well as a fix to prevent a potential OOB access when handling "Share" button - an update to Synaptics touchpad driver to use RMI mode for touchpad in Thinkpad E490 - updates to Atmel MXT driver adding checks to prevent potential OOB accesses - a fix to IMS PCU driver to free correct amount of memory when tearing it down - a fixup to the recent change to Atlas buttons driver - a small cleanup in fm801-fp for PCI IDs table initialisation * tag 'input-for-v7.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ims-pcu - fix usb_free_coherent() size in ims_pcu_buffers_free() Input: synaptics - add LEN2058 to SMBus passlist for ThinkPad E490 Input: atlas - check ACPI_COMPANION() against NULL Input: atmel_mxt_ts - check mem_size before calculating config memory size Input: atmel_mxt_ts - fix boundary check in mxt_prepare_cfg_mem Input: fm801-gp - simplify initialisation of pci_device_id array Input: xpad - add "Nova 2 Lite" from GameSir Input: xpad - add support for ASUS ROG RAIKIRI II Input: elan_i2c - validate firmware size before use Input: xpad - fix out-of-bounds access for Share button Input: usbtouchscreen - clamp NEXIO data_len/x_len to URB buffer size Input: elan_i2c - increase device reset wait timeout after update FW Input: elan_i2c - add ic type 0x19 |
||
|
|
4e8327ccb9 |
docs: iio: adc: ad4691: add driver documentation
Add RST documentation for the AD4691 family ADC driver covering supported devices, IIO channels, operating modes, oversampling, reference voltage, LDO supply, reset, GP pins, SPI offload support, and buffer data format. Signed-off-by: Radu Sabau <radu.sabau@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
6d9e7161bf |
iio: adc: ad4691: add oversampling support
Add oversampling ratio (OSR) support for CNV burst mode. The accumulator depth register (ACC_DEPTH_IN(0)) is programmed with the selected OSR at buffer enable time and before each single-shot read. Supported OSR values: 1, 2, 4, 8, 16, 32. Introduce AD4691_MANUAL_CHANNEL() for manual mode channels, which do not expose the oversampling_ratio attribute since OSR is not applicable in that mode. A separate manual_channels array is added to struct ad4691_channel_info and selected at probe time. The OSR is shared across all channels (in_voltage_sampling_frequency and in_voltage_oversampling_ratio are info_mask_shared_by_all) because the chip has one internal oscillator and a single accumulator depth register (ACC_DEPTH_IN(0)) for all channels. in_voltage_sampling_frequency represents the effective output rate, defined as osc_freq / osr. Writing it computes needed_osc = freq * osr and snaps down to the largest oscillator table entry that satisfies both osc <= needed_osc and osc % osr == 0, guaranteeing an exact integer read-back. The result is stored in target_osc_freq_Hz and written to OSC_FREQ_REG at buffer enable and single-shot time, so sampling_frequency and oversampling_ratio can be set in any order. in_voltage_sampling_frequency_available is precomputed at probe for each OSR value, listing only oscillator table entries that divide evenly by that OSR, expressed as effective rates (osc_freq / osr). The list becomes sparser as OSR increases, capping at max_rate / osr. read_avail picks the precomputed list for the current OSR, making the returned pointer stable and race-free. Writing oversampling_ratio stores the new shared OSR and snaps target_osc_freq_Hz to the largest oscillator table entry that is both <= old_effective_rate * new_osr and evenly divisible by new_osr. This preserves an integer read-back of in_voltage_sampling_frequency after the OSR change while keeping the oscillator as close as possible to the previous effective rate. OSR defaults to 1 (no accumulation). Signed-off-by: Radu Sabau <radu.sabau@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
ad4f8513aa |
iio: adc: ad4691: add SPI offload support
Add SPI offload support to enable DMA-based, CPU-independent data acquisition using the SPI Engine offload framework. When an SPI offload is available (devm_spi_offload_get() succeeds), the driver registers a DMA engine IIO buffer and uses dedicated buffer setup operations. If no offload is available the existing software triggered buffer path is used unchanged. Both CNV Burst Mode and Manual Mode support offload, but use different trigger mechanisms: CNV Burst Mode: the SPI Engine is triggered by the ADC's DATA_READY signal on the GP pin specified by the trigger-source consumer reference in the device tree (one cell = GP pin number 0-3). For this mode the driver acts as both an SPI offload consumer (DMA RX stream, message optimization) and a trigger source provider: it registers the GP/DATA_READY output via devm_spi_offload_trigger_register() so the offload framework can match the '#trigger-source-cells' phandle and automatically fire the SPI Engine DMA transfer at end-of-conversion. Manual Mode: the SPI Engine is triggered by a periodic trigger at the configured sampling frequency. The pre-built SPI message uses the pipelined CNV-on-CS protocol: N+1 16-bit transfers are issued for N active channels (the first result is discarded as garbage from the pipeline flush) and the remaining N results are captured by DMA. All offload transfers use 16-bit frames (bits_per_word=16, len=2). The SPI Engine assembles received bits into native 16-bit words before DMA, so offload samples land in CPU-native byte order (IIO_CPU). Dedicated channel arrays (AD4691_OFFLOAD_CHANNEL) reflect this: they omit IIO_BE and carry no soft timestamp (DMA delivers data directly to userspace). The software triggered-buffer path retains its IIO_BE channels because bits_per_word=8 causes SPI to deliver bytes MSB-first into memory, making the on-disk layout big-endian. Both paths use storagebits=16 as transfers are 16 bits wide in both cases. IIO_BUFFER_DMAENGINE is selected because the offload path uses devm_iio_dmaengine_buffer_setup_with_handle() to allocate and attach the DMA RX buffer to the IIO device. Signed-off-by: Radu Sabau <radu.sabau@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
41297c6bd8 |
iio: adc: ad4691: add triggered buffer support
Add buffered capture support using the IIO triggered buffer framework. CNV Burst Mode: the GP pin identified by interrupt-names in the device tree is configured as DATA_READY output. The IRQ handler stops conversions and fires the IIO trigger; the trigger handler executes a pre-built SPI message that reads all active channels from the AVG_IN accumulator registers and then resets accumulator state and restarts conversions for the next cycle. Manual Mode: CNV is tied to SPI CS so each transfer simultaneously reads the previous result and starts the next conversion (pipelined N+1 scheme). At preenable time a pre-built, optimised SPI message of N+1 transfers is constructed (N channel reads plus one NOOP to drain the pipeline). The trigger handler executes the message in a single spi_sync() call and collects the results. An external trigger (e.g. iio-trig-hrtimer) is required to drive the trigger at the desired sample rate. Both modes share the same trigger handler and push a complete scan — one big-endian 16-bit (__be16) slot per active channel, densely packed in scan_index order, followed by a timestamp. The CNV Burst Mode sampling frequency (PWM period) is exposed as a buffer-level attribute via IIO_DEVICE_ATTR. Signed-off-by: Radu Sabau <radu.sabau@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
40850443aa |
iio: adc: ad4691: add initial driver for AD4691 family
Add support for the Analog Devices AD4691 family of high-speed, low-power multichannel SAR ADCs: AD4691 (16-ch, 500 kSPS), AD4692 (16-ch, 1 MSPS), AD4693 (8-ch, 500 kSPS) and AD4694 (8-ch, 1 MSPS). The driver implements a custom regmap layer over raw SPI to handle the device's mixed 1/2/3/4-byte register widths and uses the standard IIO read_raw/write_raw interface for single-channel reads. The chip idles in Autonomous Mode so that single-shot read_raw can use the internal oscillator without disturbing the hardware configuration. Three voltage supply domains are managed: avdd (required), vio, and a reference supply on either the REF pin (ref-supply, external buffer) or the REFIN pin (refin-supply, uses the on-chip reference buffer; REFBUF_EN is set accordingly). Hardware reset is performed by asserting then deasserting the reset-gpios GPIO line (tRESETL minimum pulse width is 10 ns, satisfied by function-call overhead); the driver then waits 300 µs for the chip to complete its internal reset sequence. A software reset via SPI_CONFIG_A is used as fallback when no reset GPIO is provided. Accumulator channel masking for single-shot reads uses ACC_MASK_REG via an ADDR_DESCENDING SPI write, which covers both mask bytes in a single 16-bit transfer. Reviewed-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Radu Sabau <radu.sabau@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
1ea5792ad7 |
dt-bindings: iio: adc: add AD4691 family
Add DT bindings for the Analog Devices AD4691 family of multichannel SAR ADCs (AD4691, AD4692, AD4693, AD4694). The four variants are not compatible with each other: AD4691/AD4692 have 16 analog input channels while AD4693/AD4694 have 8, and AD4691/AD4693 top out at 500 kSPS while AD4692/AD4694 reach 1 MSPS. These differences in channel count and maximum sample rate require distinct compatible strings so the driver can select the correct channel configuration and rate limits. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Radu Sabau <radu.sabau@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
7853cf5b65 |
iio: adc: ad4080: add support for AD4884
Add support for the AD4884, a dual-channel, 16-bit, 40 MSPS SAR ADC. The AD4884 is the dual-channel variant of the AD4084, sharing the same register map and SPI interface as the rest of the AD4080 family. Like the AD4880, it uses two independent ADC channels, each with its own SPI configuration interface. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
4bff2ca299 |
dt-bindings: iio: adc: ad4080: add AD4884 support
Add AD4884 compatible string to the AD4080 devicetree binding. The AD4884 is a dual-channel, 16-bit, 40 MSPS SAR ADC, sharing the same register map and interface as the AD4080 family. Like the AD4880, it requires two SPI chip selects and two io-backends for its independent ADC channels. The AD4884 differs from the AD4880 in resolution (16-bit vs 20-bit), which requires distinct channel configuration in the driver, precluding a fallback compatible. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
40d7dc96cf |
light: tsl2591: simplify tsl2591_persist functions via lookup table
Replace switch statements with an indexed lookup table for persist cycle conversions. Both functions contain redundant switch statements. This reduces code duplication and makes future updates to TSL2591_PRST_ALS_INT_CYCLE_* definitions easier to maintain by keeping the mapping in a single place. Signed-off-by: Matheus Silveira <matheus.feitosa@usp.br> Co-developed-by: Lucas Rabaquim <lucas.rabaquim@usp.br> Signed-off-by: Lucas Rabaquim <lucas.rabaquim@usp.br> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
36862727e0 |
iio: Use named initializers for platform_device_id arrays
Named initializers are better readable and more robust to changes of the struct definition. This robustness is relevant for a planned change to struct platform_device_id replacing .driver_data by an anonymous union. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
3dd0c04840 |
iio: temperature: ltc2983: Add support for ADT7604
The ADT7604 shares the same die as the LTC2984. It repurposes the custom RTD sensor type (18) as a copper trace resistance sensor and the custom thermistor type (27) as a leak detector, and removes thermocouple, diode and direct ADC sensor types. Two new software sensor type values are introduced (LTC2983_SENSOR_COPPER_TRACE = 32, LTC2983_SENSOR_LEAK_DETECTOR = 33) that map to the hardware register values 18 and 27 respectively. Dedicated structs (ltc2983_copper_trace, ltc2983_leak_detector) and parser functions are added rather than extending the existing RTD and thermistor paths, as the hardware configuration bits are fully hardcoded and several RTD/thermistor properties would need to be explicitly forbidden or ignored. Custom RTD (type 18) becomes the copper trace sensor. Sensor configuration bits are hardcoded to 0b1001 per the datasheet. Two variants are supported via the adi,copper-trace-sub-ohm DT property: sub-ohm traces (< 1 ohm) have bits 17:0 cleared with no excitation current or custom table; standard traces (> 1 ohm) have a required resistance-to-temperature table. Custom thermistor (type 27) becomes the leak detector. Sensor configuration bits are hardcoded to 0b001. The custom table uses a resolution of 16 instead of 64, and is specified via the required adi,custom-leak-detector DT property. Both sensor types expose an IIO_RESISTANCE channel reading from the resistance result register bank (0x0060-0x00AF). Added a "base" parameter to the LTC2983_RESULT_ADDR macro and a "base_reg" parameter to the ltc2983_chan_read function so we can read from both result register banks. The resistance register encodes the measured resistance with 10 fractional bits, so dividing by 1024 gives ohms. Since the sense resistor is specified in ohms, the output is in ohms for both sensor types and a single 1/1024 scale applies to both. For > 1 ohm copper traces and for leak detectors, a secondary channel also appears: IIO_TEMP (millidegrees Celsius) for copper trace and IIO_COVERAGE (percent) for leak detector. The ltc2983_chip_info struct is extended with a u64 supported_sensors bitmask using BIT_ULL() to safely represent the new sensor type bits 32 and 33 on 32-bit builds. A LTC2983_SENSOR_NUM sentinel is added to the enum so that the bounds check uses >= LTC2983_SENSOR_NUM rather than hardcoding the last sensor type. Tested on EVAL-ADT7604-AZ connected to Raspberry Pi 5 via SPI. Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
a496ba27dd |
dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983
The ADT7604 shares the same die as the LTC2984. It repurposes the custom RTD sensor type (18) as a copper trace resistance sensor and the custom thermistor type (27) as a leak detector, and removes thermocouple, diode and direct ADC sensor types. Add adi,adt7604 to the compatible list and introduce two new sensor node types specific to this device: - copper-trace@: maps to the custom RTD sensor type (18). Two variants: sub-ohm (< 1 ohm, adi,copper-trace-sub-ohm boolean, no custom table and excitation current) and standard (> 1 ohm, required adi,custom-copper-trace table, optional excitation current defaulting to the datasheet recommended value). Primary output is resistance in ohms. For > 1 ohm copper traces with a custom table, the chip also outputs temperature in millidegrees Celsius. - leak-detector@: maps to the custom thermistor sensor type (27). Takes a required adi,custom-leak-detector lookup table encoding resistance (uOhm) against coverage data (%). Two outputs: resistance in ohms and coverage in percent. Separate node types are used rather than extending the existing rtd@ and thermistor@ nodes because adi,custom-rtd is required for sensor type 18, and several properties (adi,number-of-wires, adi,rtd-curve, adi,rsense-share, adi,single-ended, adi,current-rotate) have no meaning for the new sensor types, since the configuration is hardcoded, and would need to be explicitly forbidden or ignored in the driver. allOf conditions are added to restrict thermocouple, diode, direct ADC and active temperature nodes to non-ADT7604 devices, and to restrict copper-trace and leak-detector nodes to the ADT7604 (some parts only). Signed-off-by: Liviu Stan <liviu.stan@analog.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
622775dbc5 |
iio: core: Add IIO_COVERAGE channel type
Add a new channel type for sensors that report fractional coverage as a percentage. The sysfs attribute is in_coverageY_raw; after applying in_coverageY_scale the value is in percent. The first user is the ADT7604 leak detector, where the value represents the portion of the sensing element that is wetted. Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
b46696afbc |
iio: temperature: ltc2983: Use fwnode_property_present() for optional properties
Checking fwnode_property_read_u32() return value with if (!ret) silently swallows meaningful error codes when a property is present but malformed. Use fwnode_property_present() first so that absence uses the default while a present but unreadable property returns a proper error. Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
|
|
ae81c43f6c |
iio: temperature: ltc2983: Fix inconsistent channel wording in messages
Replace occurrences of the abbreviated 'chann' and 'chan' with 'channel' in error and debug messages throughout the driver. Also changed the diode invalid channel error message from "thermistor" to "diode". Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |