mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Rodrigo Alencar via B4 Relay
	<devnull+rodrigo.alencar.analog.com@kernel.org>
Cc: rodrigo.alencar@analog.com, linux-kernel@vger.kernel.org,
	linux-iio@vger.kernel.org,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>
Subject: Re: [PATCH v2 0/5] iio: split struct iio_dev_attr into typed core attributes
Date: Fri, 4 Dec 2026 23:38:08 +0000	[thread overview]
Message-ID: <20261204233808.3b4faa3d@jic23-hlaptop> (raw)
In-Reply-To: <20261128011010.729b5021@jic23-hlaptop>

On Sat, 28 Nov 2026 01:10:10 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> On Fri, 27 Nov 2026 09:47:43 +0000
> Rodrigo Alencar via B4 Relay <devnull+rodrigo.alencar.analog.com@kernel.org> wrote:
> 
> > struct iio_dev_attr does three unrelated jobs: it backs the static
> > attributes declared by drivers through IIO_DEVICE_ATTR*(), the channel
> > and event attributes generated by the IIO core, and the per-buffer
> > attributes. Every user carries every field (l, c, buffer), whether it
> > needs them or not, and the meaning of @address depends on the context:
> > an info mask bit, an ext_info index, a scan index or, for events, the
> > event_spec index and the event info packed together.
> > 
> > This series keeps struct iio_dev_attr as what drivers use (dev_attr and
> > address) and moves the core-only state into private types embedding it:
> > 
> >   struct iio_chan_attr   - core channel attributes (channel, list node)
> >   struct iio_event_attr  - extends it with the event spec
> >   struct iio_buffer_attr - extends it with the owning buffer
> > 
> > Attribute creation is split into iio_chan_attr_prepare(), which builds
> > the full name and runs the duplicate check, and iio_chan_attr_add(),
> > which initializes an attribute allocated by the caller. Each context
> > allocates its own type and sets its own fields, so the core needs no
> > size, offset or context pointer.  
> 
> Nice.  All looks good to me, but as it is a core change I'll let
> it sit for a little while before applying so others can take a good look.

I want to give this some good test exposure so I'll apply it now but
it is only on the testing branch of iio.git for now hence additional
feedback welcome!

Jonathan

> 
> Jonathan
> 


      reply	other threads:[~2026-12-04 23:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  9:47 Rodrigo Alencar via B4 Relay
2026-11-27  9:47 ` [PATCH v2 1/5] iio: core: emit channel prefixes into a struct seq_buf Rodrigo Alencar via B4 Relay
2026-11-27  9:47 ` [PATCH v2 2/5] iio: buffer: add iio_attr_to_buffer() helper Rodrigo Alencar via B4 Relay
2026-11-27  9:47 ` [PATCH v2 3/5] iio: core: add struct iio_chan_attr and split attribute creation Rodrigo Alencar via B4 Relay
2026-12-04 23:36   ` Jonathan Cameron
2026-11-27  9:47 ` [PATCH v2 4/5] iio: event: add struct iio_event_attr Rodrigo Alencar via B4 Relay
2026-11-27  9:47 ` [PATCH v2 5/5] iio: buffer: add struct iio_buffer_attr Rodrigo Alencar via B4 Relay
2026-11-28  1:10 ` [PATCH v2 0/5] iio: split struct iio_dev_attr into typed core attributes Jonathan Cameron
2026-12-04 23:38   ` 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=20261204233808.3b4faa3d@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=devnull+rodrigo.alencar.analog.com@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=rodrigo.alencar@analog.com \
    /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

all inboxes | Powered by JetHome®