Re: LSM9DS1 testing with st_lsm6dsx driver

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

 



>
> > @Jonathan: how do you prefer to proceed? Push just this patch to
> > 'togreg' branch and rebase the other fixes ontop of Sean's series or
> > merge all the fixes now? (they will conflict with Sean's series)
> Assuming I don't find any issues in Sean's latest, I'll apply that
> first.  Then we put this on top but also look at a backport fix
> to get this into stable after the next merge window.

Ack, please hold on with this series since I want to post a new one
fixing missing bits for lsm9ds1.
I will rebase it ontop of Sean's series

Regards,
Lorenzo

>
> It's always tricky to deal with these cases when a driver is
> in a state of fairly rapid change.
>
> I'll take a proper look at patch 3 if that is the only one
> 'necessary'.  It looks small so we might just push the fix
> along side Sean's patch and let everyone concerned know that
> a merge conflict is expected by trivial.

Yes, patch 3/3 is the only one necessary to fix the issue.

>
> Thanks,
>
> Jonathan
>
> >
> > Regards,
> > Lorenzo
> >
> > >
> > > Thanks,
> > > Bobby Jones
> > >
> > > >
> > > > Regards,
> > > > Lorenzo
> > > >
> > > > >
> > > > > Thanks,
> > > > > Bobby Jones
> > > > >
> > > > > >
> > > > > > Regards,
> > > > > > Lorenzo
> > > > > >
> > > > > > > lsm9ds1_ag@6a {
> > > > > > >   compatible = "st,lsm9ds1-imu";
> > > > > > >   reg = <0x6a>;
> > > > > > >   st,drdy-int-pin = <1>;
> > > > > > >   pinctrl-names = "default";
> > > > > > >   pinctrl-0 = <&pinctrl_acc_gyro>;
> > > > > > >   interrupt-parent = <&gpio7>;
> > > > > > >   interrupts = <13 IRQ_TYPE_EDGE_RISING>;
> > > > > > > };
> > > > > > >
> > > > > > > >
> > > > > > > > @Jonathan: do you prefer this patch to be ontop of Sean's series?
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Lorenzo
> > > > > > > >
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > iio: imu: st_lsm6dsx: check read_fifo pointer in st_lsm6dsx_handler_thread
> > > > > > > > > >
> > > > > > > > > > Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
> > > > > > > > > > ---
> > > > > > > > > >  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 3 +++
> > > > > > > > > >  1 file changed, 3 insertions(+)
> > > > > > > > > >
> > > > > > > > > > diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
> > > > > > > > > > index b0f3da1976e4..f4fd4842bd79 100644
> > > > > > > > > > --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
> > > > > > > > > > +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
> > > > > > > > > > @@ -666,6 +666,9 @@ static irqreturn_t st_lsm6dsx_handler_thread(int irq, void *private)
> > > > > > > > > >         struct st_lsm6dsx_hw *hw = private;
> > > > > > > > > >         int count;
> > > > > > > > > >
> > > > > > > > > > +       if (!hw->settings->fifo_ops.read_fifo)
> > > > > > > > > > +               return IRQ_NONE;
> > > > > > > > > > +
> > > > > > > > > >         mutex_lock(&hw->fifo_lock);
> > > > > > > > > >         count = hw->settings->fifo_ops.read_fifo(hw);
> > > > > > > > > >         mutex_unlock(&hw->fifo_lock);
> > > > > > > > > > --
> > > > > > > > > > 2.21.0
> > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > For context I'm working with a board that has every data ready and
> > > > > > > > > > > interrupt signal connected to the LSM9DS1. Could you clarify what the
> > > > > > > > > > > proper usage of the "st,drdy-int-pin" would be in this case and
> > > > > > > > > > > whether or not I need more than one interrupt called out in my device
> > > > > > > > > > > tree node?
> > > > > > > > > > > I'm not really understanding how they're currently being utilized for
> > > > > > > > > > > this device in the driver.
> > > > > > > > > >
> > > > > > > > > > For the moment irq line in lsm9ds1 (acc/gyro) is not used at all,
> > > > > > > > > > so you can omit the "st,drdy-int-pin" property
> > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Also, I know support for this device was added recently and the combo
> > > > > > > > > > > device hardware FIFO is complex, but is support for this something
> > > > > > > > > > > that's currently being worked on?
> > > > > > > > > >
> > > > > > > > > > It is actually in my ToDo list but I have no this device at the moment, so
> > > > > > > > > > patches are welcome :)
> > > > > > > > > >
> > > > > > > > > > Regards,
> > > > > > > > > > Lorenzo
> > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Thanks,
> > > > > > > > > > > Bobby Jones
> > > > > > > > > > >
> > > > > > > > > > > > Regards,
> > > > > > > > > > > > Lorenzo
> > > > > > > > > > > >
> > > > > > > > > > > > iio: imu: st_lsm6dsx: do not configure the fifo if not supported
> > > > > > > > > > > >
> > > > > > > > > > > > Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
> > > > > > > > > > > > ---
> > > > > > > > > > > >  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
> > > > > > > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > > > > > > >
> > > > > > > > > > > > diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> > > > > > > > > > > > index b65a6ca775e0..90a0e5ce44e5 100644
> > > > > > > > > > > > --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> > > > > > > > > > > > +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> > > > > > > > > > > > @@ -1572,7 +1572,7 @@ int st_lsm6dsx_probe(struct device *dev, int irq, int hw_id,
> > > > > > > > > > > >                         return err;
> > > > > > > > > > > >         }
> > > > > > > > > > > >
> > > > > > > > > > > > -       if (hw->irq > 0) {
> > > > > > > > > > > > +       if (hw->irq > 0 && hw->settings->fifo_ops.update_fifo) {
> > > > > > > > > > > >                 err = st_lsm6dsx_fifo_setup(hw);
> > > > > > > > > > > >                 if (err < 0)
> > > > > > > > > > > >                         return err;
> > > > > > > > > > > > --
> > > > > > > > > > > > 2.21.0
> > > > > > > > > > > >
> > > > > > > > > > > >
> >
> >
> >
>


-- 
UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch;
unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp;
umount; make clean; sleep



[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