Re: [PATCH] iio: light: apds9960: Fix iio_event_spec structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 11 Nov 2022 21:44:48 +0800
Subhajit Ghosh <subhajit.ghosh@xxxxxxxxxxxxxxxxx> 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
> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux