lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250518180856.0bb104de@jic23-huawei>
Date: Sun, 18 May 2025 18:08:56 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Antoniu Miclaus <antoniu.miclaus@...log.com>
Cc: <robh@...nel.org>, <conor+dt@...nel.org>, <linux-iio@...r.kernel.org>,
 <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Nuno
 Sá <nuno.sa@...log.com>
Subject: Re: [PATCH v6 02/10] iio: backend: add support for data alignment

On Fri, 16 May 2025 11:26:22 +0300
Antoniu Miclaus <antoniu.miclaus@...log.com> wrote:

> Add backend support for staring the capture synchronization.
> When activated, it initates a proccess that aligns the sample's most
> significant bit (MSB) based solely on the captured data, without
> considering any other external signals.
> 
> Reviewed-by: Nuno Sá <nuno.sa@...log.com>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@...log.com>
> ---
> no changes in v6.
>  drivers/iio/industrialio-backend.c | 23 +++++++++++++++++++++++
>  include/linux/iio/backend.h        |  3 +++
>  2 files changed, 26 insertions(+)
> 
> diff --git a/drivers/iio/industrialio-backend.c b/drivers/iio/industrialio-backend.c
> index 038c9e1e2857..545923310f1f 100644
> --- a/drivers/iio/industrialio-backend.c
> +++ b/drivers/iio/industrialio-backend.c
> @@ -796,6 +796,29 @@ int iio_backend_filter_type_set(struct iio_backend *back,
>  }
>  EXPORT_SYMBOL_NS_GPL(iio_backend_filter_type_set, "IIO_BACKEND");
>  
> +/**
> + * iio_backend_data_align - Perform the data alignment process.
Wrong name.  If all else is good I can fix this up.

> + * @back: Backend device
> + * @timeout_us: Timeout value in us.
> + *
> + * When activated, it initates a proccess that aligns the sample's most
> + * significant bit (MSB) based solely on the captured data, without
> + * considering any other external signals.
> + *
> + * The timeout_us value must be greater than 0.
> + *
> + * RETURNS:
> + * 0 on success, negative error number on failure.
> + */
> +int iio_backend_interface_data_align(struct iio_backend *back, u32 timeout_us)
> +{
> +	if (!timeout_us)
> +		return -EINVAL;
> +
> +	return iio_backend_op_call(back, interface_data_align, timeout_us);
> +}
> +EXPORT_SYMBOL_NS_GPL(iio_backend_interface_data_align, "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 5526800f5d4a..a971a83121b7 100644
> --- a/include/linux/iio/backend.h
> +++ b/include/linux/iio/backend.h
> @@ -109,6 +109,7 @@ enum iio_backend_filter_type {
>   * @debugfs_print_chan_status: Print channel status into a buffer.
>   * @debugfs_reg_access: Read or write register value of backend.
>   * @filter_type_set: Set filter type.
> + * @interface_data_align: Perform the data alignment process.
>   * @ddr_enable: Enable interface DDR (Double Data Rate) mode.
>   * @ddr_disable: Disable interface DDR (Double Data Rate) mode.
>   * @data_stream_enable: Enable data stream.
> @@ -161,6 +162,7 @@ struct iio_backend_ops {
>  				  unsigned int writeval, unsigned int *readval);
>  	int (*filter_type_set)(struct iio_backend *back,
>  			       enum iio_backend_filter_type type);
> +	int (*interface_data_align)(struct iio_backend *back, u32 timeout_us);
>  	int (*ddr_enable)(struct iio_backend *back);
>  	int (*ddr_disable)(struct iio_backend *back);
>  	int (*data_stream_enable)(struct iio_backend *back);
> @@ -203,6 +205,7 @@ int devm_iio_backend_request_buffer(struct device *dev,
>  				    struct iio_dev *indio_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_us);
>  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);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ