From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Arka Mondal" <arka@arkamondal.net>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Robert Eshleman" <bobbyeshleman@gmail.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] iio: light: max44009: Report the integration time via read_avail()
Date: Sat, 14 Nov 2026 23:41:06 +0000 [thread overview]
Message-ID: <20261114234106.3b7b0f0b@jic23-hlaptop> (raw)
In-Reply-To: <avJVHXMynrrMiSzK@ashevche-desk.local>
On Tue, 10 Nov 2026 01:19:57 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Mon, Nov 09, 2026 at 02:07:38PM +0900, Arka Mondal wrote:
> > The integration times the light channel accepts are listed by a custom
> > attribute named illuminance_integration_time_available. That name has
> > no in_ prefix, so it is registered at the device level instead of
> > beside in_illuminance_integration_time, and userspace looking for
> > in_illuminance_integration_time_available finds nothing.
> >
> > Report the list through read_avail() and drop the custom attribute.
>
> Will break it user space?
Yes, but given no standard tools would have looked for that naming
we should be able to get away with it without anyone noticing.
Given it's an optional attribute I'm guessing everything just assumed
it wasn't provided.
Always the risk of a custom board script of course that might cause
us to have to carry the old broken ABI.
Arka, you should clearly state thee concerns in the patch description
to answer questions like the one Andy raised.
Thanks
Jonathan
>
> > All eight values are a whole number of microseconds, so they go in as
> > IIO_VAL_INT_PLUS_MICRO pairs with nothing rounded. The values do not
> > change; the core prints them with six decimals, so the attribute reads
> > 0.800000 down to 0.006250 instead of 0.8 down to 0.00625. read_raw()
> > still reports the time itself as IIO_VAL_INT_PLUS_NANO.
>
> ...
>
> > +static const int max44009_int_time_avail[] = {
> > + 0, 800000,
> > + 0, 400000,
> > + 0, 200000,
> > + 0, 100000,
> > + 0, 50000,
> > + 0, 25000,
> > + 0, 12500,
> > + 0, 6250,
> > +};
>
> Make it 2d array.
>
next prev parent reply other threads:[~2026-11-14 23:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 5:07 [PATCH v2 0/2] iio: light: Report the available lists " Arka Mondal
2026-11-09 5:07 ` [PATCH v2 1/2] iio: light: isl29125: Report the scale list " Arka Mondal
2026-11-09 5:07 ` [PATCH v2 2/2] iio: light: max44009: Report the integration time " Arka Mondal
2026-11-09 23:19 ` Andy Shevchenko
2026-11-14 23:41 ` Jonathan Cameron [this message]
2026-11-14 23:44 ` [PATCH v2 0/2] iio: light: Report the available lists " 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=20261114234106.3b7b0f0b@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=arka@arkamondal.net \
--cc=bobbyeshleman@gmail.com \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@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®