All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nuno Sá" <nuno.sa@analog.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@intel.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux@analog.com,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	David Lechner <dlechner@baylibre.com>,
	Andy Shevchenko <andy@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 6/6] iio: adc: ad7793: add firmware support and drop platform data
Date: Thu, 26 Nov 2026 10:29:37 +0000	[thread overview]
Message-ID: <awgJ9_3WEqtcdkEn@nsa> (raw)
In-Reply-To: <20261126020051.670fd7bd@jic23-hlaptop>

On Thu, Nov 26, 2026 at 02:00:51AM +0000, Jonathan Cameron wrote:
> On Wed, 25 Nov 2026 11:11:48 +0000
> Nuno Sá <nuno.sa@analog.com> wrote:
> 
> > On Wed, Nov 25, 2026 at 12:43:39PM +0200, Andy Shevchenko wrote:
> > > On Wed, Nov 25, 2026 at 10:19:22AM +0000, Nuno Sá wrote:  
> > > > The driver refuses to probe without struct ad7793_platform_data, and
> > > > there are no in-tree users of it. That means the driver can not be used
> > > > at all on a modern system.
> > > > 
> > > > Get the configuration from firmware properties instead, following the
> > > > new binding, and drop the platform data header:
> > > > 
> > > > - The reference is REFIN (REFIN1) if refin-supply is present, REFIN2 if
> > > >   refin2-supply is present, and the internal 1.17 V reference otherwise.
> > > >   Parts without an internal reference need refin-supply.
> > > > - An external clock on the CLK pin is used if given. A 128 kHz clock
> > > >   is divided by 2 internally.
> > > > - The input buffer stays enabled (as it is at power-up) unless
> > > >   adi,buffer-disable is set, and unipolar coding is used unless bipolar
> > > >   is set.
> > > > - The bias voltage generator, the burnout currents and the excitation
> > > >   current sources get their own properties.
> > > > 
> > > > While at it, also enable the AVDD and DVDD supplies, add an OF match
> > > > table and fold the platform data checks into the property parsing.  
> > > 
> > > First of all, can this be split to a few smaller changes?
> > > I will look at the rest later on.  
> > 
> > I could but is it worth it? In theory this is all actually resulting of
> > the same change which is dropping platdata which means supporting FW and
> > of_id_table (the extra supplies could another patch but it comes
> > down to the regulator bulk reg). I'll double check if something can be spitted
> > but I do prefer to keep s/platdata/of_id as one single patch.
> One churn reducing thing we've done before with these is to squash the header
> into the c file as a precursor. That gets you all the enums + lots of docs.
> 
> The we get to see the switch to a firmware filled structure slightly more
> easily.   Another thing I think we did once or twice is just leave
> the platform_data naming alone.  That can also reduce the churn somewhat.
> I'm less keen on that one but you could do:
> 
> 1. Code move for platform data into the c file.
> 2. Simple renames of platform data to cfg.
> 3. The new handling.

Alright! Will go in the above direction on v2.

- Nuno Sá

> 
> 
> 
> > 
> > - Nuno Sá
> > 
> > > 
> > > -- 
> > > With Best Regards,
> > > Andy Shevchenko
> > > 
> > >   
> 

  reply	other threads:[~2026-11-26 10:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 10:19 [PATCH 0/6] iio: adc: drop platform data from some ADI ADC drivers Nuno Sá
2026-11-25 10:19 ` [PATCH 1/6] iio: adc: ad7887: fix on-chip reference enable logic Nuno Sá
2026-11-25 10:25   ` sashiko-bot
2026-11-26 10:41   ` Joshua Crofts
2026-11-25 10:19 ` [PATCH 2/6] iio: adc: ad7887: drop platform data support Nuno Sá
2026-11-25 10:35   ` Andy Shevchenko
2026-11-26 10:30     ` Nuno Sá
2026-11-25 10:19 ` [PATCH 3/6] iio: adc: ad7266: " Nuno Sá
2026-11-25 10:38   ` Andy Shevchenko
2026-11-26 10:28     ` Nuno Sá
2026-11-25 10:19 ` [PATCH 4/6] iio: adc: ad7791: " Nuno Sá
2026-11-25 10:40   ` Andy Shevchenko
2026-11-25 10:19 ` [PATCH 5/6] dt-bindings: iio: adc: add AD7793 and similar ADCs Nuno Sá
2026-11-25 10:28   ` sashiko-bot
2026-11-25 17:41   ` Conor Dooley
2026-11-26 12:24     ` Nuno Sá
2026-11-26 18:25       ` Conor Dooley
2026-11-27 11:04         ` Nuno Sá
2026-11-27 18:16           ` Conor Dooley
2026-11-25 10:19 ` [PATCH 6/6] iio: adc: ad7793: add firmware support and drop platform data Nuno Sá
2026-11-25 10:33   ` sashiko-bot
2026-11-25 10:43   ` Andy Shevchenko
2026-11-25 11:11     ` Nuno Sá
2026-11-26  2:00       ` Jonathan Cameron
2026-11-26 10:29         ` Nuno Sá [this message]
2026-11-26  2:00   ` Jonathan Cameron
2026-11-25 10:36 ` [PATCH 0/6] iio: adc: drop platform data from some ADI ADC drivers Arnd Bergmann
2026-11-25 11:01   ` 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=awgJ9_3WEqtcdkEn@nsa \
    --to=nuno.sa@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.