linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Thomas Weißschuh" <thomas@t-8ch.de>
Cc: Basavaraj Natikar <Basavaraj.Natikar@amd.com>,
	jikos@kernel.org, benjamin.tissoires@redhat.com, lars@metafoo.de,
	srinivas.pandruvada@linux.intel.com, linux-input@vger.kernel.org,
	linux-iio@vger.kernel.org, regressions@lists.linux.dev
Subject: Re: [PATCH v2 0/9] Support light color temperature and chromaticity
Date: Sun, 10 Dec 2023 11:07:35 +0000	[thread overview]
Message-ID: <20231210110735.52f8dc53@jic23-huawei> (raw)
In-Reply-To: <4441bd6b-01cd-4f26-bf85-bde2e1bf404e@t-8ch.de>

On Thu, 7 Dec 2023 00:39:28 +0100
Thomas Weißschuh <thomas@t-8ch.de> wrote:

> Hi everybody,
> 
> On 2023-09-19 13:40:45+0530, Basavaraj Natikar wrote:
> > This series adds support for light color temperature and chromaticity.
> > 
> > v1->v2:
> > *Rename the series.
> > *Rename als_illum to als channel as it supports other channels.
> > *Update patch description to include same reading for the two existing
> >  channels to use channel index to support more hub attributes.
> > *Keep line length under 80chars in hid-sensor-als.
> > *Add new channel type IIO_COLORTEMP.
> > *Update patch description and its subject to add channel type for 
> >  chromaticity. 
> > 
> > Basavaraj Natikar (9):
> >   iio: hid-sensor-als: Use channel index to support more hub attributes
> >   iio: Add channel type light color temperature
> >   iio: hid-sensor-als: Add light color temperature support
> >   HID: amd_sfh: Add support for light color temperature
> >   HID: amd_sfh: Add support for SFH1.1 light color temperature
> >   iio: Add channel type for chromaticity
> >   iio: hid-sensor-als: Add light chromaticity support
> >   HID: amd_sfh: Add light chromaticity support
> >   HID: amd_sfh: Add light chromaticity for SFH1.1  
> 
> This series is breaking probing of hid-sensor-als on Framework 13 AMD
> laptops [0].
> The problem is that the patches require hid-sensors-als sensors to also
> report chromaticity and color temparature which they don't.
Gah.  Missed that in review.  Sorry about that and thanks for digging into
this.
> 
> When I remove the 'if (ret < 0) return ret;' checks in
> als_parse_report() probing works and the illuminance/intensity channels
> that show up behave as expected.
> Unfortunately this still leaves behind a bunch of unusable channels.
> A nice fix would be to have something like sysfs/hwmon .is_visible()
> callback but that's not supported by IIO.

It's tricky to do because there is no simple association between
what is registered as channels and the resulting attribute.  We could probably
make it work, but not a simple thing to do.

> 
> One aproach would be to detect the usable channels in als_parse_report()
> and then adapt the indio_dev->channels based on that information.
> 
> [0] https://bugzilla.kernel.org/show_bug.cgi?id=218223

Agreed that adapting the channels is the way to go.
Easiest option probably to set the relevant masks to 0 if the chromacity and
temp channels aren't there + set their scan index values to -1.
That 'should' suppress any attributes being created.
Having a gap in scan indexes is common anyway so any userspace should cope
with the timestamp being after a gap.

Alternatives would be to rebuild the chan_spec array to not have the entries,
or pass in and fill in two copies of the array, picking the relevant one only
on discovering if the temp and chromacity channels are present.

Jonathan

> 
> #regzbot introduced: 5f05285df691b1e82108eead7165feae238c95ef
> #regzbot monitor: https://bugzilla.kernel.org/show_bug.cgi?id=218223
> 


  reply	other threads:[~2023-12-10 11:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19  8:10 [PATCH v2 0/9] Support light color temperature and chromaticity Basavaraj Natikar
2023-09-19  8:10 ` [PATCH v2 1/9] iio: hid-sensor-als: Use channel index to support more hub attributes Basavaraj Natikar
2023-09-20 16:59   ` srinivas pandruvada
2023-09-19  8:10 ` [PATCH v2 2/9] iio: Add channel type light color temperature Basavaraj Natikar
2023-09-19  8:10 ` [PATCH v2 3/9] iio: hid-sensor-als: Add light color temperature support Basavaraj Natikar
2023-09-20 17:00   ` srinivas pandruvada
2023-09-19  8:10 ` [PATCH v2 4/9] HID: amd_sfh: Add support for light color temperature Basavaraj Natikar
2023-09-20 15:25   ` Jiri Kosina
2023-09-19  8:10 ` [PATCH v2 5/9] HID: amd_sfh: Add support for SFH1.1 " Basavaraj Natikar
2023-09-20 15:25   ` Jiri Kosina
2023-09-19  8:10 ` [PATCH v2 6/9] iio: Add channel type for chromaticity Basavaraj Natikar
2023-09-24 12:31   ` Jonathan Cameron
2023-09-19  8:10 ` [PATCH v2 7/9] iio: hid-sensor-als: Add light chromaticity support Basavaraj Natikar
2023-09-20 17:10   ` srinivas pandruvada
2023-09-19  8:10 ` [PATCH v2 8/9] HID: amd_sfh: " Basavaraj Natikar
2023-09-20 15:25   ` Jiri Kosina
2023-09-19  8:10 ` [PATCH v2 9/9] HID: amd_sfh: Add light chromaticity for SFH1.1 Basavaraj Natikar
2023-09-20 15:26   ` Jiri Kosina
2023-09-20 14:13 ` [PATCH v2 0/9] Support light color temperature and chromaticity Jiri Kosina
2023-09-20 15:23   ` Basavaraj Natikar
2023-09-24 12:42     ` Jonathan Cameron
2023-09-24 14:20       ` Basavaraj Natikar
2023-12-06 23:39 ` Thomas Weißschuh
2023-12-10 11:07   ` Jonathan Cameron [this message]
2023-12-15 10:04     ` Linux regression tracking (Thorsten Leemhuis)
2023-12-15 17:33       ` srinivas pandruvada
2023-12-23  8:14   ` Linux regression tracking #update (Thorsten Leemhuis)

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=20231210110735.52f8dc53@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=thomas@t-8ch.de \
    /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).