devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Marcelo Schmitt <marcelo.schmitt@analog.com>
Cc: <apw@canonical.com>, <joe@perches.com>, <dwaipayanray1@gmail.com>,
	<lukas.bulwahn@gmail.com>, <paul.cercueil@analog.com>,
	<Michael.Hennerich@analog.com>, <lars@metafoo.de>,
	<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
	<conor+dt@kernel.org>, <dan.carpenter@linaro.org>,
	<dlechner@baylibre.com>, <marcelo.schmitt1@gmail.com>,
	<linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 00/11] Add support for AD7091R-2/-4/-8
Date: Thu, 21 Dec 2023 16:53:22 +0000	[thread overview]
Message-ID: <20231221165322.1d6ecfdc@jic23-huawei> (raw)
In-Reply-To: <cover.1703013352.git.marcelo.schmitt1@gmail.com>

On Tue, 19 Dec 2023 17:25:04 -0300
Marcelo Schmitt <marcelo.schmitt@analog.com> wrote:

> From: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
> 
> ----------------- Updates -----------------
> 
> Applied all suggestions. 
> Only submitting patches not applied on v4:
> Patches after ("Align arguments to function call parenthesis").
> 
> Change log v4 -> v5:
> - Patch 1: Event callbacks
>   * Moved to begin of the series to easy backport;
>   * Reverted to original event attributes;
>   * Reworked event configuration to do per direction per channel enable/disable;
>   * Improved commit message;
>   * Added fixes tag;
>   * Added Suggested-by tag.
> - Patch 2: Enable internal vref
>   * Added fixes tag and improved commit message;
>   * Now earlier in the series to easy backport;
>   * Used regmap_set_bits() to make code more neat.
> - Patch 3: Move generic AD7091R code
>   * event specs moved earlier in patch 1.
> - Patch 4: Move chip init data
>   * Renamed field to make initialization clearer: irq_info -> info_irq.
>   * Fixed ad7091r_init_info initialization by passing pointers to info structs;
> - Patch 10: Add ad7091r8 support
>   * Moved bitfield.h include to patch event callbacks patch;
>   * Dropped GPIO consumer include on ad7091r-base.h and added gpio_desc;
>   * Removed extra space before devm_gpiod_get_optional().
> 
> So, since we are already fixing a few things here, maybe it's a good time to
> comment about the event ABI.
> I see the event config files under events directory appearing as
> in_voltage0_thresh_falling_value
> in_voltage0_thresh_rising_value
> in_voltage1_thresh_falling_value
> and so on.
> They don't have the `_raw` part of the name as documented in the IIO ABI [1].
> Not sure if that is how it's intended to be, the driver is still missing
> something, or maybe ABI is somehow outdated.

I think the docs have always been wrong :(
We always derived if these were raw or processed from matching channels (they
are almost always raw because non linear mess in typically processed channels
is hard to invert in order to program a register etc)

> Anyway, if that is also something to be fixed then let me know I'll have a look
> at it.

Great - just drop the _raw bit from the event documentation. I see it's a mixed bag
with some channel types correctly not including it whilst others do :(

Not sure why we've not picked up on that in reviews in the past.

Jonathan

> 
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/tree/Documentation/ABI/testing/sysfs-bus-iio#n887
> 
> Thanks,
> Marcelo
> 
> ----------------- Context -----------------
> 
> This series adds support for AD7091R-2/-4/-8 ADCs which can do single shot
> or sequenced readings. Threshold events are also supported.
> Overall, AD7091R-2/-4/-8 are very similar to AD7091R-5 except they use SPI interface.
> 
> Changes have been tested with raspberrypi and eval board on raspberrypi kernel
> 6.7-rc3 from raspberrypi fork.
> Link: https://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad7091r8
> 
> 
> Marcelo Schmitt (11):
>   iio: adc: ad7091r: Allow users to configure device events
>   iio: adc: ad7091r: Enable internal vref if external vref is not
>     supplied
>   iio: adc: ad7091r: Move generic AD7091R code to base driver and header
>     file
>   iio: adc: ad7091r: Move chip init data to container struct
>   iio: adc: ad7091r: Remove unneeded probe parameters
>   iio: adc: ad7091r: Set device mode through chip_info callback
>   iio: adc: ad7091r: Add chip_info callback to get conversion result
>     channel
>   iio: adc: Split AD7091R-5 config symbol
>   dt-bindings: iio: Add AD7091R-8
>   iio: adc: Add support for AD7091R-8
>   MAINTAINERS: Add MAINTAINERS entry for AD7091R
> 
>  .../bindings/iio/adc/adi,ad7091r5.yaml        |  82 +++++-
>  MAINTAINERS                                   |   8 +
>  drivers/iio/adc/Kconfig                       |  16 ++
>  drivers/iio/adc/Makefile                      |   4 +-
>  drivers/iio/adc/ad7091r-base.c                | 269 +++++++++++------
>  drivers/iio/adc/ad7091r-base.h                |  83 +++++-
>  drivers/iio/adc/ad7091r5.c                    | 120 ++++----
>  drivers/iio/adc/ad7091r8.c                    | 272 ++++++++++++++++++
>  8 files changed, 714 insertions(+), 140 deletions(-)
>  create mode 100644 drivers/iio/adc/ad7091r8.c
> 


      parent reply	other threads:[~2023-12-21 16:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 20:25 [PATCH v5 00/11] Add support for AD7091R-2/-4/-8 Marcelo Schmitt
2023-12-19 20:26 ` [PATCH v5 01/11] iio: adc: ad7091r: Allow users to configure device events Marcelo Schmitt
2023-12-19 20:26 ` [PATCH v5 02/11] iio: adc: ad7091r: Enable internal vref if external vref is not supplied Marcelo Schmitt
2023-12-19 20:27 ` [PATCH v5 03/11] iio: adc: ad7091r: Move generic AD7091R code to base driver and header file Marcelo Schmitt
2023-12-19 20:27 ` [PATCH v5 04/11] iio: adc: ad7091r: Move chip init data to container struct Marcelo Schmitt
2023-12-19 20:28 ` [PATCH v5 05/11] iio: adc: ad7091r: Remove unneeded probe parameters Marcelo Schmitt
2023-12-19 20:28 ` [PATCH v5 06/11] iio: adc: ad7091r: Set device mode through chip_info callback Marcelo Schmitt
2023-12-19 20:29 ` [PATCH v5 07/11] iio: adc: ad7091r: Add chip_info callback to get conversion result channel Marcelo Schmitt
2023-12-19 20:29 ` [PATCH v5 08/11] iio: adc: Split AD7091R-5 config symbol Marcelo Schmitt
2023-12-19 20:32 ` [PATCH v5 09/11] dt-bindings: iio: Add AD7091R-8 Marcelo Schmitt
2023-12-19 20:32 ` [PATCH v5 10/11] iio: adc: Add support for AD7091R-8 Marcelo Schmitt
2023-12-19 20:32 ` [PATCH v5 11/11] MAINTAINERS: Add MAINTAINERS entry for AD7091R Marcelo Schmitt
2023-12-21 16:59   ` Jonathan Cameron
2023-12-22 12:49     ` Marcelo Schmitt
2023-12-26 15:45       ` Jonathan Cameron
2023-12-21 16:53 ` Jonathan Cameron [this message]

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=20231221165322.1d6ecfdc@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=apw@canonical.com \
    --cc=conor+dt@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=marcelo.schmitt@analog.com \
    --cc=paul.cercueil@analog.com \
    --cc=robh+dt@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).