devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Hugo Villeneuve <hvilleneuve@dimonoff.com>,
	Nuno Sa <nuno.sa@analog.com>,
	David Lechner <dlechner@baylibre.com>,
	Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev
Subject: Re: [PATCH v3 6/9] iio: adc: rzg2l_adc: Use adc-helpers
Date: Mon, 24 Feb 2025 07:40:02 +0200	[thread overview]
Message-ID: <24609799-636d-4e8f-8406-f83b5db08f90@gmail.com> (raw)
In-Reply-To: <20250223163018.2c0290e8@jic23-huawei>

On 23/02/2025 18:30, Jonathan Cameron wrote:
> On Wed, 19 Feb 2025 14:31:38 +0200
> Matti Vaittinen <mazziesaccount@gmail.com> wrote:
> 
>> The new devm_iio_adc_device_alloc_chaninfo() -helper is intended to help
>> drivers avoid open-coding the for_each_node -loop for getting the
>> channel IDs. The helper provides standard way to detect the ADC channel
>> nodes (by the node name), and a standard way to convert the "reg",
>> "diff-channels", "single-channel" and the "common-mode-channel" to
>> channel identification numbers used in the struct iio_chan_spec.
>> Furthermore, the helper checks the ID is in range of 0 ... num-channels.
>>
>> The original driver treated all found child nodes as channel nodes. The
>> new helper requires channel nodes to be named channel[@N]. This should
>> help avoid problems with devices which may contain also other but ADC
>> child nodes. Quick grep from arch/* with the rzg2l_adc's compatible
>> string didn't reveal any in-tree .dts with channel nodes named
>> othervice. Also, same grep shows all the .dts seem to have channel IDs
>> between 0..num of channels.
>>
>> Use the new helper.
>>
>> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
> 
> I should have read on.  Definitely more convincing with these usecases.
> however drag them to start of series.  Better to add infrastructure
> so some use and then on to your new driver.

Ok. I'll reorder the series.

I'll drop the differential channels support in v4 - and thus also the 
expected property types parameters - which will simplify this and other 
callers.

Thanks for taking a look at this!

Yours,
	-- Matti

  reply	other threads:[~2025-02-24  5:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 12:29 [PATCH v3 0/9] Support ROHM BD79124 ADC Matti Vaittinen
2025-02-19 12:30 ` [PATCH v3 1/9] dt-bindings: ROHM BD79124 ADC/GPO Matti Vaittinen
2025-02-19 12:30 ` [PATCH v3 2/9] iio: adc: add helpers for parsing ADC nodes Matti Vaittinen
2025-02-19 20:41   ` Andy Shevchenko
2025-02-20  7:13     ` Matti Vaittinen
2025-02-20 12:41       ` Andy Shevchenko
2025-02-20 13:40         ` Matti Vaittinen
2025-02-20 14:04           ` Andy Shevchenko
2025-02-20 14:21             ` Matti Vaittinen
2025-02-20 14:56               ` Andy Shevchenko
2025-02-21 10:10                 ` Matti Vaittinen
2025-02-21 16:41                   ` Andy Shevchenko
2025-02-22 14:34                     ` Matti Vaittinen
2025-02-22 17:48                     ` Jonathan Cameron
2025-02-23 16:13   ` Jonathan Cameron
2025-02-24 13:45     ` Matti Vaittinen
2025-02-19 12:30 ` [PATCH v3 3/9] iio: adc: Support ROHM BD79124 ADC Matti Vaittinen
2025-02-23 16:28   ` Jonathan Cameron
2025-02-24  6:14     ` Matti Vaittinen
2025-03-02  2:44       ` Jonathan Cameron
2025-02-19 12:30 ` [PATCH v3 4/9] MAINTAINERS: Add IIO ADC helpers Matti Vaittinen
2025-02-19 12:31 ` [PATCH v3 5/9] MAINTAINERS: Add ROHM BD79124 ADC/GPO Matti Vaittinen
2025-02-19 12:31 ` [PATCH v3 6/9] iio: adc: rzg2l_adc: Use adc-helpers Matti Vaittinen
2025-02-19 13:36   ` Matti Vaittinen
2025-02-20 16:07   ` kernel test robot
2025-02-23 16:30   ` Jonathan Cameron
2025-02-24  5:40     ` Matti Vaittinen [this message]
2025-02-19 12:31 ` [PATCH v3 7/9] iio: adc: sun20i-gpadc: " Matti Vaittinen
2025-02-20 16:17   ` kernel test robot
2025-02-19 12:32 ` [PATCH v3 8/9] iio: adc: ti-ads7924 Drop unnecessary function parameters Matti Vaittinen
2025-02-19 12:32 ` [PATCH v3 9/9] iio: adc: ti-ads7924: Respect device tree config Matti Vaittinen
2025-03-01  3:06   ` Jonathan Cameron

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=24609799-636d-4e8f-8406-f83b5db08f90@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=nuno.sa@analog.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=wens@csie.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).