| 036d96ce | 13-Jul-2026 |
Babanpreet Singh <bbnpreetsingh@gmail.com> |
staging: iio: frequency: remove incorrect kernel-doc markings in dds.h
The 13 comment blocks in dds.h noting which sysfs attribute each convenience macro creates are opened with the kernel-doc /** m
staging: iio: frequency: remove incorrect kernel-doc markings in dds.h
The 13 comment blocks in dds.h noting which sysfs attribute each convenience macro creates are opened with the kernel-doc /** marker, but they are not kernel-doc: there is no identifier to document. Running kernel-doc on the file emits 103 warnings:
$ scripts/kernel-doc -none drivers/staging/iio/frequency/dds.h Warning: drivers/staging/iio/frequency/dds.h:10 Cannot find identifier on line: * /sys/bus/iio/devices/.../out_altvoltageX_frequencyY
The header is not scanned during normal builds (build-time kernel-doc checks cover .c files), so the warnings only show up when kernel-doc is invoked on the file directly.
The comments have carried the /** marker since the file was introduced in commit 4851d97d87c8 ("Staging: IIO: dds.h convenience macros"). The attributes themselves are already documented in drivers/staging/iio/Documentation/sysfs-bus-iio-dds, so demote the comments to plain /* style rather than converting them into kernel-doc for the macros. No functional change.
Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com> Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
show more ...
|
| 0846f13e | 30-Jun-2026 |
Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> |
staging: iio: Initialize spi_device_id arrays using member names
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value wi
staging: iio: Initialize spi_device_id arrays using member names
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition.
The mentioned robustness is relevant for a planned change to struct spi_device_id that replaces .driver_data by an anonymous union.
This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://patch.msgid.link/cac7a68e6a6adb1b58207640ab045e59eec86f53.1781883685.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <jic23@kernel.org>
show more ...
|
| 11aa529f | 04-May-2026 |
Angus Gardner <angusg778@gmail.com> |
staging: iio: ad9834: fix chip name typo in comments
Two comments incorrectly refer to 'AD9843' instead of 'AD9834'. Fix the copy-paste typo.
Signed-off-by: Angus Gardner <angusg778@gmail.com> Revi
staging: iio: ad9834: fix chip name typo in comments
Two comments incorrectly refer to 'AD9843' instead of 'AD9834'. Fix the copy-paste typo.
Signed-off-by: Angus Gardner <angusg778@gmail.com> Reviewed-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
show more ...
|
| 8b8e850e | 04-May-2026 |
Angus Gardner <angusg778@gmail.com> |
staging: iio: ad9834: use dev_err_probe() in probe function
Replace open-coded dev_err() + return sequences with dev_err_probe(), which is the preferred pattern for probe error paths as it handles d
staging: iio: ad9834: use dev_err_probe() in probe function
Replace open-coded dev_err() + return sequences with dev_err_probe(), which is the preferred pattern for probe error paths as it handles deferred probing correctly and reduces boilerplate.
Convert all three remaining instances in ad9834_probe(): - master clock enable failure - device init SPI sync failure
The avdd regulator path already used dev_err_probe().
Signed-off-by: Angus Gardner <angusg778@gmail.com> Reviewed-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
show more ...
|
| 19f2c272 | 04-May-2026 |
Angus Gardner <angusg778@gmail.com> |
staging: iio: ad9834: simplify -ENOMEM return in probe
devm_iio_device_alloc() failure returns -ENOMEM via a local variable unnecessarily. Return -ENOMEM directly instead.
Signed-off-by: Angus Gard
staging: iio: ad9834: simplify -ENOMEM return in probe
devm_iio_device_alloc() failure returns -ENOMEM via a local variable unnecessarily. Return -ENOMEM directly instead.
Signed-off-by: Angus Gardner <angusg778@gmail.com> Reviewed-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
show more ...
|
| 13af23fb | 16-Apr-2026 |
Joshua Crofts <joshua.crofts1@gmail.com> |
iio: frequency: ad9834: clean up includes
Cleanup include headers by removing proxy kernel.h header and unnecessary list.h, interrupt.h, workqueue.h and slab.h headers. Added additional headers that
iio: frequency: ad9834: clean up includes
Cleanup include headers by removing proxy kernel.h header and unnecessary list.h, interrupt.h, workqueue.h and slab.h headers. Added additional headers that were previously included from kernel.h.
Verified using the include-what-you-use tool.
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
show more ...
|
| 3012a122 | 17-Apr-2025 |
Gabriel Shahrouzi <gshahrouzi@gmail.com> |
iio: frequency: ad9832: Remove unused parameter from data documentation
This is a leftover from the patch: commit 566564e80b0e ("staging: iio: ad9832: use clock framework for clock reference").
The
iio: frequency: ad9832: Remove unused parameter from data documentation
This is a leftover from the patch: commit 566564e80b0e ("staging: iio: ad9832: use clock framework for clock reference").
The AD9832 driver uses the Common Clock Framework (CCF) to obtain the master clock (MCLK) frequency rather than relying on a frequency value passed from platform data.
Signed-off-by: Gabriel Shahrouzi <gshahrouzi@gmail.com> Link: https://patch.msgid.link/20250417173333.607844-1-gshahrouzi@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
show more ...
|
| cc26591e | 06-Mar-2025 |
Saalim Quadri <danascape@gmail.com> |
staging: iio: ad9834: Use devm_regulator_get_enable()
The regulators are only enabled at probe(), hence replace the boilerplate code by making use of devm_regulator_get_enable() helper.
Signed-off-
staging: iio: ad9834: Use devm_regulator_get_enable()
The regulators are only enabled at probe(), hence replace the boilerplate code by making use of devm_regulator_get_enable() helper.
Signed-off-by: Saalim Quadri <danascape@gmail.com> Link: https://patch.msgid.link/20250306000459.1554007-1-danascape@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
show more ...
|
| 4636e859 | 07-Nov-2024 |
Zicheng Qu <quzicheng@huawei.com> |
staging: iio: ad9832: Correct phase range check
User Perspective: When a user sets the phase value, the ad9832_write_phase() is called. The phase register has a 12-bit resolution, so the valid range
staging: iio: ad9832: Correct phase range check
User Perspective: When a user sets the phase value, the ad9832_write_phase() is called. The phase register has a 12-bit resolution, so the valid range is 0 to 4095. If the phase offset value of 4096 is input, it effectively exactly equals 0 in the lower 12 bits, meaning no offset.
Reasons for the Change: 1) Original Condition (phase > BIT(AD9832_PHASE_BITS)): This condition allows a phase value equal to 2^12, which is 4096. However, this value exceeds the valid 12-bit range, as the maximum valid phase value should be 4095. 2) Modified Condition (phase >= BIT(AD9832_PHASE_BITS)): Ensures that the phase value is within the valid range, preventing invalid datafrom being written.
Impact on Subsequent Logic: st->data = cpu_to_be16(addr | phase): If the phase value is 2^12, i.e., 4096 (0001 0000 0000 0000), and addr is AD9832_REG_PHASE0 (1100 0000 0000 0000), then addr | phase results in 1101 0000 0000 0000, occupying DB12. According to the section of WRITING TO A PHASE REGISTER in the datasheet, the MSB 12 PHASE0 bits should be DB11. The original condition leads to incorrect DB12 usage, which contradicts the datasheet and could pose potential issues for future updates if DB12 is used in such related cases.
Fixes: ea707584bac1 ("Staging: IIO: DDS: AD9832 / AD9835 driver") Cc: stable@vger.kernel.org Signed-off-by: Zicheng Qu <quzicheng@huawei.com> Link: https://patch.msgid.link/20241107011015.2472600-3-quzicheng@huawei.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
show more ...
|