From: Jonathan Cameron <jic23@kernel.org>
To: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: linux-iio@vger.kernel.org, lorenzo.bianconi@st.com,
devicetree@vger.kernel.org
Subject: Re: [PATCH 2/4] iio: common: st_sensors: check odr address value in st_sensors_set_odr()
Date: Tue, 10 Oct 2017 20:40:01 +0100 [thread overview]
Message-ID: <20171010204001.76065029@archlinux> (raw)
In-Reply-To: <20170917161712.14645-3-lorenzo.bianconi@st.com>
On Sun, 17 Sep 2017 18:17:10 +0200
Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> wrote:
> Do not try to configure sample frequency if the sensor do not export
> odr register address in register map. That change will be used to
> properly support LIS3DHH accel sensor.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> 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 40dfdfc0906b..57db19182e95 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_core.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_core.c
> @@ -93,6 +93,9 @@ 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)
> + return 0;
> +
> err = st_sensors_match_odr(sdata->sensor_settings, odr, &odr_out);
> if (err < 0)
> goto st_sensors_match_odr_error;
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Lorenzo Bianconi
<lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
lorenzo.bianconi-qxv4g6HH51o@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/4] iio: common: st_sensors: check odr address value in st_sensors_set_odr()
Date: Tue, 10 Oct 2017 20:40:01 +0100 [thread overview]
Message-ID: <20171010204001.76065029@archlinux> (raw)
In-Reply-To: <20170917161712.14645-3-lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
On Sun, 17 Sep 2017 18:17:10 +0200
Lorenzo Bianconi <lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Do not try to configure sample frequency if the sensor do not export
> odr register address in register map. That change will be used to
> properly support LIS3DHH accel sensor.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> 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 40dfdfc0906b..57db19182e95 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_core.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_core.c
> @@ -93,6 +93,9 @@ 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)
> + return 0;
> +
> err = st_sensors_match_odr(sdata->sensor_settings, odr, &odr_out);
> if (err < 0)
> goto st_sensors_match_odr_error;
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-10-10 19:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 16:17 [PATCH 0/4] Add support to LIS3DHH accel sensor Lorenzo Bianconi
2017-09-17 16:17 ` Lorenzo Bianconi
2017-09-17 16:17 ` [PATCH 1/4] iio: st_sensors: split open-drain parameters for irq1 and irq2 Lorenzo Bianconi
2017-09-17 16:17 ` Lorenzo Bianconi
2017-10-10 19:39 ` Jonathan Cameron
2017-10-10 19:39 ` Jonathan Cameron
2017-09-17 16:17 ` [PATCH 2/4] iio: common: st_sensors: check odr address value in st_sensors_set_odr() Lorenzo Bianconi
2017-09-17 16:17 ` Lorenzo Bianconi
2017-10-10 19:40 ` Jonathan Cameron [this message]
2017-10-10 19:40 ` Jonathan Cameron
2017-09-17 16:17 ` [PATCH 3/4] iio: accel: add support to LIS3DHH Lorenzo Bianconi
2017-09-17 16:17 ` Lorenzo Bianconi
2017-10-10 19:40 ` Jonathan Cameron
2017-10-10 19:40 ` Jonathan Cameron
2017-09-17 16:17 ` [PATCH 4/4] dt-bindings: iio: accel: add LIS3DHH device bindings Lorenzo Bianconi
2017-09-17 16:17 ` Lorenzo Bianconi
2017-09-20 20:53 ` Rob Herring
2017-09-20 20:53 ` Rob Herring
2017-10-10 19:43 ` Jonathan Cameron
2017-10-10 19:43 ` 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=20171010204001.76065029@archlinux \
--to=jic23@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=lorenzo.bianconi@st.com \
/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.