From: Antoniu Miclaus <antoniu.miclaus@analog.com>
To: <jic23@kernel.org>, <robh@kernel.org>, <conor+dt@kernel.org>,
<linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: "Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"Nuno Sá" <nuno.sa@analog.com>
Subject: [PATCH v4 03/10] iio: backend: add support for number of lanes
Date: Fri, 2 May 2025 11:58:58 +0300 [thread overview]
Message-ID: <20250502085905.24926-4-antoniu.miclaus@analog.com> (raw)
In-Reply-To: <20250502085905.24926-1-antoniu.miclaus@analog.com>
Add iio backend support for number of lanes to be enabled.
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
no changes in v4.
drivers/iio/industrialio-backend.c | 17 +++++++++++++++++
include/linux/iio/backend.h | 3 +++
2 files changed, 20 insertions(+)
diff --git a/drivers/iio/industrialio-backend.c b/drivers/iio/industrialio-backend.c
index b7cbbc7a8fcd..78a957d1fe92 100644
--- a/drivers/iio/industrialio-backend.c
+++ b/drivers/iio/industrialio-backend.c
@@ -810,6 +810,23 @@ int iio_backend_interface_data_align(struct iio_backend *back, u32 timeout)
}
EXPORT_SYMBOL_NS_GPL(iio_backend_interface_data_align, "IIO_BACKEND");
+/**
+ * iio_backend_num_lanes_set - Number of lanes enabled.
+ * @back: Backend device
+ * @num_lanes: Number of lanes.
+ *
+ * RETURNS:
+ * 0 on success, negative error number on failure.
+ */
+int iio_backend_num_lanes_set(struct iio_backend *back, unsigned int num_lanes)
+{
+ if (!num_lanes)
+ return -EINVAL;
+
+ return iio_backend_op_call(back, num_lanes_set, num_lanes);
+}
+EXPORT_SYMBOL_NS_GPL(iio_backend_num_lanes_set, "IIO_BACKEND");
+
/**
* iio_backend_ddr_enable - Enable interface DDR (Double Data Rate) mode
* @back: Backend device
diff --git a/include/linux/iio/backend.h b/include/linux/iio/backend.h
index 452cb2838dad..1ffb200eb3ff 100644
--- a/include/linux/iio/backend.h
+++ b/include/linux/iio/backend.h
@@ -110,6 +110,7 @@ enum iio_backend_filter_type {
* @debugfs_reg_access: Read or write register value of backend.
* @filter_type_set: Set filter type.
* @interface_data_align: Perform the data alignment process.
+ * @num_lanes_set: Set the number of lanes enabled.
* @ddr_enable: Enable interface DDR (Double Data Rate) mode.
* @ddr_disable: Disable interface DDR (Double Data Rate) mode.
* @data_stream_enable: Enable data stream.
@@ -163,6 +164,7 @@ struct iio_backend_ops {
int (*filter_type_set)(struct iio_backend *back,
enum iio_backend_filter_type type);
int (*interface_data_align)(struct iio_backend *back, u32 timeout);
+ int (*num_lanes_set)(struct iio_backend *back, unsigned int num_lanes);
int (*ddr_enable)(struct iio_backend *back);
int (*ddr_disable)(struct iio_backend *back);
int (*data_stream_enable)(struct iio_backend *back);
@@ -206,6 +208,7 @@ int devm_iio_backend_request_buffer(struct device *dev,
int iio_backend_filter_type_set(struct iio_backend *back,
enum iio_backend_filter_type type);
int iio_backend_interface_data_align(struct iio_backend *back, u32 timeout);
+int iio_backend_num_lanes_set(struct iio_backend *back, unsigned int num_lanes);
int iio_backend_ddr_enable(struct iio_backend *back);
int iio_backend_ddr_disable(struct iio_backend *back);
int iio_backend_data_stream_enable(struct iio_backend *back);
--
2.49.0
next prev parent reply other threads:[~2025-05-02 8:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 8:58 [PATCH v4 00/10] Add support for AD4080 ADC Antoniu Miclaus
2025-05-02 8:58 ` [PATCH v4 01/10] iio: backend: add support for filter config Antoniu Miclaus
2025-05-02 8:58 ` [PATCH v4 02/10] iio: backend: add support for data alignment Antoniu Miclaus
2025-05-02 15:26 ` Nuno Sá
2025-05-02 8:58 ` Antoniu Miclaus [this message]
2025-05-02 8:58 ` [PATCH v4 04/10] dt-bindings: iio: adc: add ad408x axi variant Antoniu Miclaus
2025-05-02 8:59 ` [PATCH v4 05/10] iio: adc: adi-axi-adc: add filter type config Antoniu Miclaus
2025-05-02 15:20 ` Nuno Sá
2025-05-02 8:59 ` [PATCH v4 06/10] iio: adc: adi-axi-adc: add data align process Antoniu Miclaus
2025-05-02 15:27 ` Nuno Sá
2025-05-02 8:59 ` [PATCH v4 07/10] iio: adc: adi-axi-adc: add num lanes support Antoniu Miclaus
2025-05-02 8:59 ` [PATCH v4 08/10] dt-bindings: iio: adc: add ad4080 Antoniu Miclaus
2025-05-02 8:59 ` [PATCH v4 09/10] iio: adc: ad4080: add driver support Antoniu Miclaus
2025-05-02 15:37 ` Nuno Sá
2025-05-04 15:40 ` Jonathan Cameron
2025-05-02 8:59 ` [PATCH v4 10/10] Documetation: ABI: add sinc1 and sinc5+pf1 filter Antoniu Miclaus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250502085905.24926-4-antoniu.miclaus@analog.com \
--to=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox