* [PATCH v3 0/3] ad777x driver addressing patch comments
@ 2024-06-19 12:22 Ramona Alexandra Nechita
2024-06-19 12:22 ` [PATCH v3 2/3] Documentation: ABI: added filter mode doc in sysfs-bus-iio Ramona Alexandra Nechita
0 siblings, 1 reply; 3+ messages in thread
From: Ramona Alexandra Nechita @ 2024-06-19 12:22 UTC (permalink / raw)
To: linux-iio
Cc: Ramona Alexandra Nechita, Jonathan Cameron, Lars-Peter Clausen,
Cosmin Tanislav, Michael Hennerich, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko, Nuno Sa,
Marcelo Schmitt, Maksim Kiselev, Marius Cristea, Mike Looijmans,
Ivan Mikhaylov, Okan Sahin, Marcus Folkesson, Lee Jones,
Liam Beguin, linux-kernel, devicetree
This patch series is sent to address the comments received
with regards to the ad7779 driver patch:
v2-0001-drivers-iio-adc-add-support-for-ad777x-family.patch,
as well as the dt-bindings patch:
v3-0001-dt-bindings-iio-adc-add-a7779-doc.patch.
The patches were initially sent separated, this has now
been corrected with this patch series, along with soeme
other issues such as the cover letter and author.
The changes in the series:
v3:
* drop spi-max-frequency from yaml and fix indent
* separate ABI doc into different patch, drop ad4130
ABI doc file and combine the filter_mode/type properties
in the sysfs-bus-iio file
* update Kconfig help section for the driver
* update driver commit message
* drop crc_enabled and check crc by default on all regs
except GEN_ERR_REG_1_EN
* rename from "ad777x_*" to "ad7779_*"
* switch from kfifo to triggered buffer and send w/timestamp
* switched spidata_rx/tx buffer data type to u8 and declared
channels as IIO_BE
* switched to fsleep and added comments for each of them
* changed "____cacheline_aligned" to "__aligned(IIO_DMA_MINALIGN)"
* fixed allignments and removed redundant variables
* removed local update_scan_mode in favor of iio active_scan_mask
* requested trigger as NO_AUTOEN and it is enabled/disabled only
in preenable/postdisable functions
* removed separate ad777x_register function and moved the code
in probe
* switched to get_clk_enabled
* check for irq earlier in probe
* misc code style / format changes, as suggested
Ramona Alexandra Nechita (3):
dt-bindings: iio: adc: add a7779 doc
Documentation: ABI: added filter mode doc in sysfs-bus-iio
drivers: iio: adc: add support for ad777x family
Documentation/ABI/testing/sysfs-bus-iio | 7 +
.../ABI/testing/sysfs-bus-iio-adc-ad4130 | 46 -
.../bindings/iio/adc/adi,ad7779.yaml | 84 ++
drivers/iio/adc/Kconfig | 11 +
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/ad7779.c | 936 ++++++++++++++++++
6 files changed, 1039 insertions(+), 46 deletions(-)
delete mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7779.yaml
create mode 100644 drivers/iio/adc/ad7779.c
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v3 2/3] Documentation: ABI: added filter mode doc in sysfs-bus-iio
2024-06-19 12:22 [PATCH v3 0/3] ad777x driver addressing patch comments Ramona Alexandra Nechita
@ 2024-06-19 12:22 ` Ramona Alexandra Nechita
2024-06-23 12:46 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Ramona Alexandra Nechita @ 2024-06-19 12:22 UTC (permalink / raw)
To: linux-iio
Cc: Ramona Alexandra Nechita, Jonathan Cameron, Lars-Peter Clausen,
Cosmin Tanislav, Michael Hennerich, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko, Nuno Sa,
Maksim Kiselev, Marcelo Schmitt, Marius Cristea, Mike Looijmans,
Okan Sahin, Ivan Mikhaylov, Marcus Folkesson, Liam Beguin,
linux-kernel, devicetree
The filter mode / filter type property is used for ad4130
and ad7779 drivers, therefore the ABI doc file for ad4130
was removed, merging both of them in the sysfs-bus-iio
Signed-off-by: Ramona Alexandra Nechita <ramona.nechita@analog.com>
---
Documentation/ABI/testing/sysfs-bus-iio | 7 +++
.../ABI/testing/sysfs-bus-iio-adc-ad4130 | 46 -------------------
2 files changed, 7 insertions(+), 46 deletions(-)
delete mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 2e6d5ebfd3c7..c808ec9c4a81 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -2225,6 +2225,13 @@ Description:
An example format is 16-bytes, 2-digits-per-byte, HEX-string
representing the sensor unique ID number.
+What: /sys/bus/iio/devices/iio:deviceX/filter_type_available
+What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_mode_available
+KernelVersion: 6.1
+Contact: linux-iio@vger.kernel.org
+Description:
+ Reading returns a list with the possible filter modes.
+
What: /sys/.../events/in_proximity_thresh_either_runningperiod
KernelVersion: 6.6
Contact: linux-iio@vger.kernel.org
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130 b/Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130
deleted file mode 100644
index f24ed6687e90..000000000000
--- a/Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130
+++ /dev/null
@@ -1,46 +0,0 @@
-What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_mode_available
-KernelVersion: 6.2
-Contact: linux-iio@vger.kernel.org
-Description:
- Reading returns a list with the possible filter modes.
-
- * "sinc4" - Sinc 4. Excellent noise performance. Long
- 1st conversion time. No natural 50/60Hz rejection.
-
- * "sinc4+sinc1" - Sinc4 + averaging by 8. Low 1st conversion
- time.
-
- * "sinc3" - Sinc3. Moderate 1st conversion time.
- Good noise performance.
-
- * "sinc3+rej60" - Sinc3 + 60Hz rejection. At a sampling
- frequency of 50Hz, achieves simultaneous 50Hz and 60Hz
- rejection.
-
- * "sinc3+sinc1" - Sinc3 + averaging by 8. Low 1st conversion
- time. Best used with a sampling frequency of at least
- 216.19Hz.
-
- * "sinc3+pf1" - Sinc3 + Post Filter 1. 53dB rejection @
- 50Hz, 58dB rejection @ 60Hz.
-
- * "sinc3+pf2" - Sinc3 + Post Filter 2. 70dB rejection @
- 50Hz, 70dB rejection @ 60Hz.
-
- * "sinc3+pf3" - Sinc3 + Post Filter 3. 99dB rejection @
- 50Hz, 103dB rejection @ 60Hz.
-
- * "sinc3+pf4" - Sinc3 + Post Filter 4. 103dB rejection @
- 50Hz, 109dB rejection @ 60Hz.
-
-What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_filter_mode
-KernelVersion: 6.2
-Contact: linux-iio@vger.kernel.org
-Description:
- Set the filter mode of the differential channel. When the filter
- mode changes, the in_voltageY-voltageZ_sampling_frequency and
- in_voltageY-voltageZ_sampling_frequency_available attributes
- might also change to accommodate the new filter mode.
- If the current sampling frequency is out of range for the new
- filter mode, the sampling frequency will be changed to the
- closest valid one.
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3 2/3] Documentation: ABI: added filter mode doc in sysfs-bus-iio
2024-06-19 12:22 ` [PATCH v3 2/3] Documentation: ABI: added filter mode doc in sysfs-bus-iio Ramona Alexandra Nechita
@ 2024-06-23 12:46 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2024-06-23 12:46 UTC (permalink / raw)
To: Ramona Alexandra Nechita
Cc: linux-iio, Lars-Peter Clausen, Cosmin Tanislav, Michael Hennerich,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko,
Nuno Sa, Maksim Kiselev, Marcelo Schmitt, Marius Cristea,
Mike Looijmans, Okan Sahin, Ivan Mikhaylov, Marcus Folkesson,
Liam Beguin, linux-kernel, devicetree
On Wed, 19 Jun 2024 15:22:43 +0300
Ramona Alexandra Nechita <ramona.nechita@analog.com> wrote:
> The filter mode / filter type property is used for ad4130
> and ad7779 drivers, therefore the ABI doc file for ad4130
> was removed, merging both of them in the sysfs-bus-iio
>
> Signed-off-by: Ramona Alexandra Nechita <ramona.nechita@analog.com>
> ---
> Documentation/ABI/testing/sysfs-bus-iio | 7 +++
> .../ABI/testing/sysfs-bus-iio-adc-ad4130 | 46 -------------------
> 2 files changed, 7 insertions(+), 46 deletions(-)
> delete mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index 2e6d5ebfd3c7..c808ec9c4a81 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -2225,6 +2225,13 @@ Description:
> An example format is 16-bytes, 2-digits-per-byte, HEX-string
> representing the sensor unique ID number.
>
> +What: /sys/bus/iio/devices/iio:deviceX/filter_type_available
> +What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_mode_available
> +KernelVersion: 6.1
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Reading returns a list with the possible filter modes.
Even though it is not generalized an a given device might not provide each option, we still
need to let those writing userspace software know what they might get.
So Include the options, but skip the frequency specific details etc.
For things like the pf ones, just say + device specific post filter X
If the details are necessary we do allow a device specific entry in the main
docs. I think there are a few existing ones though not sure they've
made it to the top level doc rather than one of the device type specific ones.
> +
> What: /sys/.../events/in_proximity_thresh_either_runningperiod
> KernelVersion: 6.6
> Contact: linux-iio@vger.kernel.org
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130 b/Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130
> deleted file mode 100644
> index f24ed6687e90..000000000000
> --- a/Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130
> +++ /dev/null
> @@ -1,46 +0,0 @@
> -What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_mode_available
> -KernelVersion: 6.2
> -Contact: linux-iio@vger.kernel.org
> -Description:
> - Reading returns a list with the possible filter modes.
> -
> - * "sinc4" - Sinc 4. Excellent noise performance. Long
> - 1st conversion time. No natural 50/60Hz rejection.
> -
> - * "sinc4+sinc1" - Sinc4 + averaging by 8. Low 1st conversion
> - time.
> -
> - * "sinc3" - Sinc3. Moderate 1st conversion time.
> - Good noise performance.
> -
> - * "sinc3+rej60" - Sinc3 + 60Hz rejection. At a sampling
> - frequency of 50Hz, achieves simultaneous 50Hz and 60Hz
> - rejection.
> -
> - * "sinc3+sinc1" - Sinc3 + averaging by 8. Low 1st conversion
> - time. Best used with a sampling frequency of at least
> - 216.19Hz.
> -
> - * "sinc3+pf1" - Sinc3 + Post Filter 1. 53dB rejection @
> - 50Hz, 58dB rejection @ 60Hz.
> -
> - * "sinc3+pf2" - Sinc3 + Post Filter 2. 70dB rejection @
> - 50Hz, 70dB rejection @ 60Hz.
> -
> - * "sinc3+pf3" - Sinc3 + Post Filter 3. 99dB rejection @
> - 50Hz, 103dB rejection @ 60Hz.
> -
> - * "sinc3+pf4" - Sinc3 + Post Filter 4. 103dB rejection @
> - 50Hz, 109dB rejection @ 60Hz.
> -
> -What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_filter_mode
> -KernelVersion: 6.2
> -Contact: linux-iio@vger.kernel.org
> -Description:
> - Set the filter mode of the differential channel. When the filter
> - mode changes, the in_voltageY-voltageZ_sampling_frequency and
> - in_voltageY-voltageZ_sampling_frequency_available attributes
> - might also change to accommodate the new filter mode.
> - If the current sampling frequency is out of range for the new
> - filter mode, the sampling frequency will be changed to the
> - closest valid one.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-23 12:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19 12:22 [PATCH v3 0/3] ad777x driver addressing patch comments Ramona Alexandra Nechita
2024-06-19 12:22 ` [PATCH v3 2/3] Documentation: ABI: added filter mode doc in sysfs-bus-iio Ramona Alexandra Nechita
2024-06-23 12:46 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox