linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Ardelean, Alexandru" <alexandru.Ardelean@analog.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"matt.ranostay@konsulko.com" <matt.ranostay@konsulko.com>,
	"pmeerw@pmeerw.net" <pmeerw@pmeerw.net>,
	"knaack.h@gmx.de" <knaack.h@gmx.de>
Subject: Re: [PATCH] iio: chemical: atlas-ph-sensor: fix iio_triggered_buffer_predisable() position
Date: Sat, 5 Oct 2019 16:12:00 +0100	[thread overview]
Message-ID: <20191005161200.0a82943e@archlinux> (raw)
In-Reply-To: <9e05f129826ad4ddc723a655d712bb6ae41a1259.camel@analog.com>

Matt! Looking for your input on this one if possible.

Thanks,

Jonathan


On Fri, 20 Sep 2019 07:37:56 +0000
"Ardelean, Alexandru" <alexandru.Ardelean@analog.com> wrote:

> On Fri, 2019-09-20 at 10:31 +0300, Alexandru Ardelean wrote:
> > The iio_triggered_buffer_{predisable,postenable} functions attach/detach
> > the poll functions.
> > 
> > The iio_triggered_buffer_predisable() should be called last, to detach
> > the
> > poll func after the devices has been suspended.
> >   
> 
> I just noticed this is a RESEND.
> The original is here:
> https://patchwork.kernel.org/patch/11032569/
> 
> I did not think that I probably already sent it before sending it again.
> 
> > The position of iio_triggered_buffer_postenable() is correct.
> > 
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> > ---
> >  drivers/iio/chemical/atlas-ph-sensor.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/iio/chemical/atlas-ph-sensor.c
> > b/drivers/iio/chemical/atlas-ph-sensor.c
> > index 3a20cb5d9bff..6c175eb1c7a7 100644
> > --- a/drivers/iio/chemical/atlas-ph-sensor.c
> > +++ b/drivers/iio/chemical/atlas-ph-sensor.c
> > @@ -323,16 +323,16 @@ static int atlas_buffer_predisable(struct iio_dev
> > *indio_dev)
> >  	struct atlas_data *data = iio_priv(indio_dev);
> >  	int ret;
> >  
> > -	ret = iio_triggered_buffer_predisable(indio_dev);
> > +	ret = atlas_set_interrupt(data, false);
> >  	if (ret)
> >  		return ret;
> >  
> > -	ret = atlas_set_interrupt(data, false);
> > +	pm_runtime_mark_last_busy(&data->client->dev);
> > +	ret = pm_runtime_put_autosuspend(&data->client->dev);
> >  	if (ret)
> >  		return ret;
> >  
> > -	pm_runtime_mark_last_busy(&data->client->dev);
> > -	return pm_runtime_put_autosuspend(&data->client->dev);
> > +	return iio_triggered_buffer_predisable(indio_dev);
> >  }
> >  
> >  static const struct iio_trigger_ops atlas_interrupt_trigger_ops = {  


  reply	other threads:[~2019-10-05 15:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20  7:31 [PATCH] iio: chemical: atlas-ph-sensor: fix iio_triggered_buffer_predisable() position Alexandru Ardelean
2019-09-20  7:37 ` Ardelean, Alexandru
2019-10-05 15:12   ` Jonathan Cameron [this message]
2019-10-06  1:56 ` Matt Ranostay
2019-10-06  9:27   ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2019-07-05 13:43 Alexandru Ardelean
2019-07-07 12:01 ` Jonathan Cameron
2019-08-11  9:28   ` Jonathan Cameron

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=20191005161200.0a82943e@archlinux \
    --to=jic23@kernel.org \
    --cc=alexandru.Ardelean@analog.com \
    --cc=knaack.h@gmx.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=matt.ranostay@konsulko.com \
    --cc=pmeerw@pmeerw.net \
    /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).