From: Denis Ciocca <denis.ciocca@st.com>
To: Giuseppe BARBA <giuseppe.barba@st.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Cc: "jic23@kernel.org" <jic23@kernel.org>
Subject: Re: [PATCH V4 2/5] iio: st-sensors: add support for single full scale device
Date: Tue, 21 Jul 2015 18:44:07 +0800 [thread overview]
Message-ID: <55AE2277.9040306@st.com> (raw)
In-Reply-To: <1437467745-18435-3-git-send-email-giuseppe.barba@st.com>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
On 07/21/2015 04:35 PM, Giuseppe BARBA wrote:
> Some sensors could have only one full scale value. This means that the
> sensor hasn't a full scale register. This commit add a check on the
> configured full scale address to support such kind of sensors.
>
> Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com>
> ---
> drivers/iio/common/st_sensors/st_sensors_core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
> index d44bf16..2e7fdb5 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_core.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_core.c
> @@ -126,6 +126,9 @@ static int st_sensors_set_fullscale(struct iio_dev *indio_dev, unsigned int fs)
> int err, i = 0;
> struct st_sensor_data *sdata = iio_priv(indio_dev);
>
> + if (sdata->sensor_settings->fs.addr == 0)
> + return 0;
> +
> err = st_sensors_match_fs(sdata->sensor_settings, fs, &i);
> if (err < 0)
> goto st_accel_set_fullscale_error;
next prev parent reply other threads:[~2015-07-21 10:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 8:35 [PATCH V4 0/5] Added ST LSM303AGR sensor Giuseppe Barba
2015-07-21 8:35 ` [PATCH V4 1/5] iio: st-sensors: add configuration for WhoAmI address Giuseppe Barba
2015-07-21 10:43 ` Denis Ciocca
2015-07-23 19:36 ` Jonathan Cameron
2015-07-21 8:35 ` [PATCH V4 2/5] iio: st-sensors: add support for single full scale device Giuseppe Barba
2015-07-21 10:44 ` Denis Ciocca [this message]
2015-07-21 8:35 ` [PATCH V4 3/5] iio: st_magn: Add irq trigger handling Giuseppe Barba
2015-07-21 10:44 ` Denis Ciocca
2015-07-21 8:35 ` [PATCH V4 4/5] iio: st-accel: add support for lsm303agr accelerometer Giuseppe Barba
2015-07-21 10:44 ` Denis Ciocca
2015-07-23 19:40 ` Jonathan Cameron
2015-07-21 8:35 ` [PATCH V4 5/5] iio: st-magn: add support for lsm303agr magnetometer Giuseppe Barba
2015-07-21 10:44 ` Denis Ciocca
2015-07-23 19:42 ` 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=55AE2277.9040306@st.com \
--to=denis.ciocca@st.com \
--cc=giuseppe.barba@st.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.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.