All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Sa, Nuno" <Nuno.Sa@analog.com>,
	linux-iio <linux-iio@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	"Ardelean, Alexandru" <alexandru.Ardelean@analog.com>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>
Subject: Re: [PATCH v4 5/6] iio: imu: Add support for adis16475
Date: Sun, 12 Apr 2020 12:48:01 +0100	[thread overview]
Message-ID: <20200412124801.2a80b067@archlinux> (raw)
In-Reply-To: <CAHp75VcOxjnNRetQxUR=8Z-WA=V6rzAFwCfhjNCmjQE3hgAEEA@mail.gmail.com>



> ...
> 
> > > > +                       if (scaled_out_freq < 1900 || scaled_out_freq > 2100) {
> > > > +                               dev_err(dev,
> > > > +                                       "Invalid value:%u for adi,scaled-output-hz",
> > > > +                                       scaled_out_freq);  
> > >
> > > When there is no property or property has a value 0 this message can't
> > > tell the difference.
> > > Perhaps you have to check return code from device_property_read_u32()
> > > call.
> > >  
> >
> > Well, I think we don't really need to. If the sync mode is scaled, then this property is mandatory
> > (and this is stated in the bindings). So, I don't really care if the property is not there or if it's just
> > a wrong value. We should fail either way and I'm not sure an extra if with some other message will
> > give us that extra value...  
> 
> Up to maintainer (I have no strong opinion about this)

Nice to give a hint to the user about the two different cases so I'd check the
return value as Andy first suggested.


  parent reply	other threads:[~2020-04-12 11:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 15:08 [PATCH v4 0/6] Support ADIS16475 and similar IMUs Nuno Sá
2020-04-06 15:08 ` [PATCH v4 1/6] iio: imu: adis: Add Managed device functions Nuno Sá
2020-04-06 15:08 ` [PATCH v4 2/6] iio: imu: adis: Add irq mask variable Nuno Sá
2020-04-06 15:08 ` [PATCH v4 3/6] iio: adis: Add adis_update_bits() APIs Nuno Sá
2020-04-06 15:08 ` [PATCH v4 4/6] iio: adis: Support different burst sizes Nuno Sá
2020-04-06 15:08 ` [PATCH v4 5/6] iio: imu: Add support for adis16475 Nuno Sá
2020-04-06 16:19   ` Andy Shevchenko
2020-04-07  7:26     ` Sa, Nuno
2020-04-07  9:19       ` Andy Shevchenko
2020-04-07  9:26         ` Sa, Nuno
2020-04-07  9:54           ` Andy Shevchenko
2020-04-07 10:38             ` Sa, Nuno
2020-04-07 10:42               ` Andy Shevchenko
2020-04-12 11:49             ` Jonathan Cameron
2020-04-12 11:48         ` Jonathan Cameron [this message]
2020-04-06 15:08 ` [PATCH v4 6/6] dt-bindings: iio: Add adis16475 documentation Nuno Sá

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=20200412124801.2a80b067@archlinux \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=Nuno.Sa@analog.com \
    --cc=alexandru.Ardelean@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.