devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Angelo Dureghello <adureghello@baylibre.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Nuno Sa <nuno.sa@analog.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Olivier Moysan <olivier.moysan@foss.st.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, dletchner@baylibre.com,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v5 09/10] iio: dac: ad3552r: add high-speed platform driver
Date: Sat, 12 Oct 2024 15:07:09 +0100	[thread overview]
Message-ID: <20241012150709.1278066c@jic23-huawei> (raw)
In-Reply-To: <20241008-wip-bl-ad3552r-axi-v0-iio-testing-v5-9-3d410944a63d@baylibre.com>

On Tue, 08 Oct 2024 17:43:41 +0200
Angelo Dureghello <adureghello@baylibre.com> wrote:

> From: Angelo Dureghello <adureghello@baylibre.com>
> 
> Add High Speed ad3552r platform driver.
> 
> The ad3552r DAC is controlled by a custom (fpga-based) DAC IP
> through the current AXI backend, or similar alternative IIO backend.
> 
> Compared to the existing driver (ad3552r.c), that is a simple SPI
> driver, this driver is coupled with a DAC IIO backend that finally
> controls the ad3552r by a fpga-based "QSPI+DDR" interface, to reach
> maximum transfer rate of 33MUPS using dma stream capabilities.
> 
> All commands involving QSPI bus read/write are delegated to the backend
> through the provided APIs for bus read/write.
> 
> Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
> ---
>  drivers/iio/dac/Kconfig                  |  14 +
>  drivers/iio/dac/Makefile                 |   1 +
>  drivers/iio/dac/ad3552r-hs.c             | 526 +++++++++++++++++++++++++++++++
>  drivers/iio/dac/ad3552r.h                |   7 +
>  include/linux/platform_data/ad3552r-hs.h |  18 ++
I'd missed this before.  No obvious reason to put the include in a 'global' location
when for now at least only includers re in drivers/iio/dac/

So please move it there.

Some stuff include/linux/platform_data/ is ancient things dating back to board file
days.

Other than that and things bit Nuno raised, this series looks good to me.
Please drop the first 2 patches from v6 as I've applied those now.

Jonathan


> diff --git a/include/linux/platform_data/ad3552r-hs.h b/include/linux/platform_data/ad3552r-hs.h
> new file mode 100644
> index 000000000000..4e3213a0c73b
> --- /dev/null
> +++ b/include/linux/platform_data/ad3552r-hs.h

This isn't what we'd think of as 'platform_data' normally and it is only used
in drivers/iio/dac/ so I would simply move the header to drivers/iio/dac/ad3552r-hs.h

> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/*
> + * Copyright (c) 2010-2024 Analog Devices Inc.

Generous on the years.  This one should probably just be new copyright given
the code is effectively new.

> + * Copyright (c) 2024 Baylibre, SAS
> + */
> +#ifndef __LINUX_PLATFORM_DATA_AD3552R_HS_H__
> +#define __LINUX_PLATFORM_DATA_AD3552R_HS_H__
> +
> +#include <linux/iio/backend.h>
For this use a forwards reference

struct iio_backend;

Nice to avoid nests of includes where we can easily do so.

> +
> +struct ad3552r_hs_platform_data {
> +	int (*bus_reg_read)(struct iio_backend *back, u32 reg, u32 *val,
> +			    size_t data_size);
> +	int (*bus_reg_write)(struct iio_backend *back, u32 reg, u32 val,
> +			     size_t data_size);
> +};
> +
> +#endif /* __LINUX_PLATFORM_DATA_AD3552R_HS_H__ */
> 


  reply	other threads:[~2024-10-12 14:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 15:43 [PATCH v5 00/10] iio: add support for the ad3552r AXI DAC IP Angelo Dureghello
2024-10-08 15:43 ` [PATCH v5 01/10] iio: dac: adi-axi-dac: fix wrong register bitfield Angelo Dureghello
2024-10-12 13:45   ` Jonathan Cameron
2024-10-08 15:43 ` [PATCH v5 02/10] iio: dac: adi-axi-dac: update register names Angelo Dureghello
2024-10-10 12:59   ` Nuno Sá
2024-10-10 17:52     ` Angelo Dureghello
2024-10-11  6:47       ` Nuno Sá
2024-10-12 13:50         ` Jonathan Cameron
2024-10-12 13:46   ` Jonathan Cameron
2024-10-08 15:43 ` [PATCH v5 03/10] dt-bindings: iio: dac: ad3552r: add iio backend support Angelo Dureghello
2024-10-08 15:43 ` [PATCH v5 04/10] dt-bindings: iio: dac: adi-axi-dac: add ad3552r axi variant Angelo Dureghello
2024-10-08 17:22   ` Rob Herring (Arm)
2024-10-12 13:43     ` Jonathan Cameron
2024-10-12 13:49   ` Jonathan Cameron
2024-10-08 15:43 ` [PATCH v5 05/10] iio: backend: extend features Angelo Dureghello
2024-10-10 13:06   ` Nuno Sá
2024-10-08 15:43 ` [PATCH v5 06/10] iio: dac: adi-axi-dac: " Angelo Dureghello
2024-10-10 13:20   ` Nuno Sá
2024-10-11  8:06     ` Angelo Dureghello
2024-10-08 15:43 ` [PATCH v5 07/10] iio: dac: ad3552r: changes to use FIELD_PREP Angelo Dureghello
2024-10-08 15:43 ` [PATCH v5 08/10] iio: dac: ad3552r: extract common code (no changes in behavior intended) Angelo Dureghello
2024-10-08 15:43 ` [PATCH v5 09/10] iio: dac: ad3552r: add high-speed platform driver Angelo Dureghello
2024-10-12 14:07   ` Jonathan Cameron [this message]
2024-10-08 15:43 ` [PATCH v5 10/10] iio: dac: adi-axi-dac: add registering of child fdt node Angelo Dureghello
2024-10-10 13:51   ` Nuno Sá
2024-10-11 12:31   ` Nuno Sá

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=20241012150709.1278066c@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=adureghello@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dletchner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=olivier.moysan@foss.st.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;
as well as URLs for NNTP newsgroup(s).