linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yarl-baudig@mailoo.org
To: "Jonathan Cameron" <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, "Hartmut Knaack" <knaack.h@gmx.de>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Peter Meerwald-Stadler" <pmeerw@pmeerw.net>,
	"Denis Ciocca" <denis.ciocca@st.com>
Subject: Re: [PATCH] iio: st_sensors: rely on odr mask to know if odr can be set
Date: Thu,  9 Apr 2020 13:24:15 +0200 (CEST)	[thread overview]
Message-ID: <ea-mime-5e8f05df-2178-2373fc98@www-1.mailo.com> (raw)
In-Reply-To: <20200405125702.2e72981c@archlinux>

Oh, sorry, just saw your answer. Ok I can list such sensors.
Please tell me what I should do about Fixes tag. That's the first time I send a patch I'm not sure What I should put in it.
Is it :
Fixes: 4358be137952 (MAINTAINERS: Add Syed Nayyar Waris to ACCES 104-QUAD-8 driver)
? Thank you.
---- Message d'origine ----
> De : Jonathan Cameron <jic23@kernel.org>
> À : yarl-baudig@mailoo.org
> Sujet : Re: [PATCH] iio: st_sensors: rely on odr mask to know if odr can be set
> Date : 05/04/2020 13:57:02 Europe/Paris
> Copie à : linux-iio@vger.kernel.org;
>       Hartmut Knaack <knaack.h@gmx.de>;
>       Lars-Peter Clausen <lars@metafoo.de>;
>       Peter Meerwald-Stadler <pmeerw@pmeerw.net>;
>       Denis Ciocca <denis.ciocca@st.com>
> 
> On Thu,  2 Apr 2020 15:40:59 +0200 (CEST)
> yarl-baudig@mailoo.org wrote:
> 
> > Indeed, relying on addr being not 0 cannot work because some device have
> > their register to set odr at address 0. As a matter of fact, if the odr
> > can be set, then there is a mask.
> 
> Hi Lary,
> 
> Which sensor has ODR in the register at address 0?
> 
> I see it's a few of the magnetometers from a quick grep, but please state
> it in the cover letter.  Also please add a suitable Fixes tag
> as we will want this backported if appropriate.
> 
> Thanks,
> 
> Jonathan
> 
> > 
> > Signed-off-by: Lary Gibaud <yarl-baudig@mailoo.org>
> > ---
> >  drivers/iio/common/st_sensors/st_sensors_core.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c 
> b/drivers/iio/common/st_sensors/st_sensors_core.c
> > index a0c2cbd60c6f..cccd4c26dfa4 100644
> > --- a/drivers/iio/common/st_sensors/st_sensors_core.c
> > +++ b/drivers/iio/common/st_sensors/st_sensors_core.c
> > @@ -79,7 +79,7 @@ int st_sensors_set_odr(struct iio_dev *indio_dev, 
> unsigned int odr)
> >  	struct st_sensor_odr_avl odr_out = {0, 0};
> >  	struct st_sensor_data *sdata = iio_priv(indio_dev);
> >  
> > -	if (!sdata->sensor_settings->odr.addr)
> > +	if (!sdata->sensor_settings->odr.mask)
> >  		return 0;
> >  
> >  	err = st_sensors_match_odr(sdata->sensor_settings, odr, &odr_out);
> 
> 



  reply	other threads:[~2020-04-09 11:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 13:40 [PATCH] iio: st_sensors: rely on odr mask to know if odr can be set yarl-baudig
2020-04-05 11:57 ` Jonathan Cameron
2020-04-09 11:24   ` yarl-baudig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-04-11 15:16 yarl-baudig
2020-04-12  9:49 ` Jonathan Cameron
2020-04-02 13:08 yarl-baudig

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=ea-mime-5e8f05df-2178-2373fc98@www-1.mailo.com \
    --to=yarl-baudig@mailoo.org \
    --cc=denis.ciocca@st.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --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).