Re: [PATCH v2] iio: hid-sensor-prox: Split difference from multiple channels

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

 



On Sat, 2025-01-11 at 10:17 +0100, Ricardo Ribalda wrote:
> Hi Jonathan
> 
> Happy new year!
> 
> Friendly ping about this patch so we can change the ABI before the
> kernel release happens
> 
> On Thu, 19 Dec 2024 at 18:17, Jonathan Cameron <jic23@xxxxxxxxxx>
> wrote:
> > 
> > On Mon, 16 Dec 2024 10:05:53 +0000
> > Ricardo Ribalda <ribalda@xxxxxxxxxxxx> wrote:
> > 
> > > When the driver was originally created, it was decided that
> > > sampling_frequency and hysteresis would be shared_per_type
> > > instead
> > > of shared_by_all (even though it is internally shared by all).
> > > Eg:
> > > in_proximity_raw
> > > in_proximity_sampling_frequency
> > > 
> > > When we introduced support for more channels, we continued with
> > > shared_by_type which. Eg:
> > > in_proximity0_raw
> > > in_proximity1_raw
> > > in_proximity_sampling_frequency
> > > in_attention_raw
> > > in_attention_sampling_frequency
> > > 
> > > Ideally we should change to shared_by_all, but it is not an
> > > option,
> > > because the current naming has been a stablished ABI by now.
> > > Luckily we
> > > can use separate instead. That will be more consistent:
> > > in_proximity0_raw
> > > in_proximity0_sampling_frequency
> > > in_proximity1_raw
> > > in_proximity1_sampling_frequency
> > > in_attention_raw
> > > in_attention_sampling_frequency
> > > 
> > > Fixes: 596ef5cf654b ("iio: hid-sensor-prox: Add support for more
> > > channels")
> > > Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
> > 
> > I got lost somewhere in the discussion.  This is still an ABI
> > change compared
> > to original interface at the top (which is the one that has been
> > there
> > quite some time).
> > 
> > However we already had to make one of those to add the index that
> > wasn't there
> > for _raw. (I'd missed that in earlier discussion - thanks for
> > laying out the
> > steps here!) 

Didn't realize this. I don't see proximity sensor use in the mainline
Linux distro user space, so it will affect only some private user space
programs. 
Adding Mark to see if it affects Lenovo Sensing solution as there was
specific custom sensor added to this driver for Lenovo.

> >  Srinivas, Jiri, do you think we are better off just assuming users
> > of this will be using a library that correctly deals with sharing
> > and just
> > jump to
> > in_proximity0_raw
> > in_proximity1_raw
> > in_attention_raw
> > (should have indexed that but it may never matter) and
> > sampling_frequency
> > 
> > Which is what I think Ricardo originally asked.
> > 
> > Do we have any guarantee the sampling_frequency will be shared
> > across the
> > sensor channels?  It may be the most common situation but I don't
> > want to
> > wall us into a corner if it turns out someone runs separate sensors
> > at
> > different rates (no particularly reason they should be one type of
> > sensor
> > so this might make sense).  If we don't have that guarantee
> > then this patch is fine as far as I'm concerned.


[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