Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Subhajit Ghosh <subhajit.ghosh@vixtechnology.com>
Cc: Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
	Matt Ranostay <matt.ranostay@konsulko.com>,
	lars@metafoo.de, linux-kernel@vger.kernel.org,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: light: apds9960: Fix iio_event_spec structures
Date: Sat, 12 Nov 2022 17:47:36 +0000	[thread overview]
Message-ID: <20221112174736.75d0b926@jic23-huawei> (raw)
In-Reply-To: <380ae3c3-14c2-db1a-954c-caf8180746f0@vixtechnology.com>

On Fri, 11 Nov 2022 21:44:48 +0800
Subhajit Ghosh <subhajit.ghosh@vixtechnology.com> wrote:

> > Hmm.  Given that event enables often cover a couple of different things
> > (as done here) it isn't unknown for those to not be as easily covered
> > as you have done.  As such, we have drivers were the ABI allows for
> > enabling one event to end up enabling several others (even though they
> > have separate enable attributes).  It's always been permitted for one
> > IIO attribute write to have an effect on other attributes simply because
> > we can't represent all dependencies.
> > 
> > Now the bigger complexity / surprise here is the return of the either
> > direction in response to enabling either rising or falling. 
> > That is going to rather surprise your average writer of userspace cod This is where the inconsistency was found. When an ALS threshold rising   
> value was given and as soon as it was enabled, interrupts started firing
> in low light conditions as there was some value present in the ALS falling 
> threshold(reset value is not defined in the datasheet for this register), 
> but falling threshold value was neither fed nor enabled!
> 
> > So patch covers what we should definitely have had in the first place.
> > Hence it's a question of risk of someone running code that will be affected
> > by the ABI change.  One of those fingers crossed moments...  
> I understand that breaking existing userspace applications is not the best
> thing to do.

Given the risks around this one, I'm going to apply it to the togreg
branch of iio.git which is lined up for next merge cycle.  That should
in theory provide more time before it hits upstream / gets back ported
to stable releases for people to notice the change.

Hopefully no one will though!

Applied to the togreg branch of iio.git and pushed out initially as testing
to let 0-day poke at it.

Thanks,

Jonathan

> 
> > 
> > Jonathan  
> 
> Thank you for your time and comments.
> 
> Regards,
> Subhajit Ghosh
> 


      reply	other threads:[~2022-11-12 17:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 10:12 [PATCH] iio: light: apds9960: Fix iio_event_spec structures Subhajit Ghosh
2022-11-10 13:29 ` Matt Ranostay
2022-11-10 14:45   ` Subhajit Ghosh
2022-11-11  2:50     ` Matt Ranostay
2022-11-11  7:04       ` Subhajit Ghosh
2022-11-11 11:10       ` Jonathan Cameron
2022-11-11 13:44         ` Subhajit Ghosh
2022-11-12 17:47           ` 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=20221112174736.75d0b926@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.ranostay@konsulko.com \
    --cc=subhajit.ghosh@vixtechnology.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