From: Jonathan Cameron <jic23@kernel.org>
To: Crestez Dan Leonard <leonard.crestez@intel.com>,
linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Daniel Baluta <daniel.baluta@intel.com>,
Linus Walleij <linus.walleij@linaro.org>,
Giuseppe Barba <giuseppe.barba@st.com>,
Denis Ciocca <denis.ciocca@st.com>
Subject: Re: [PATCH 2/3] iio: st_sensors: Disable DRDY at init time
Date: Sat, 14 May 2016 17:55:08 +0100 [thread overview]
Message-ID: <12e74954-0ab2-1c00-e589-84114f3062ec@kernel.org> (raw)
In-Reply-To: <52054a54539759100d9c926c78616858b12a2089.1463164919.git.leonard.crestez@intel.com>
On 13/05/16 19:43, Crestez Dan Leonard wrote:
> This fixes odd behavior after reboot.
>
> The fact that we set the device to powerdown mode is not sufficient to
> prevent DRDY being active because we might still have an unread sample.
>
> Even if powerdown was sufficient keeping DRDY disabled while trigger is
> not active is a good idea.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Giuseppe Barba <giuseppe.barba@st.com>
> Cc: Denis Ciocca <denis.ciocca@st.com>
> Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Again, this one seems obviously correct to me, but would like Denis Ack.
Jonathan
> ---
> drivers/iio/common/st_sensors/st_sensors_core.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
> index 928ee68..9e59c90 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_core.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_core.c
> @@ -363,6 +363,11 @@ int st_sensors_init_sensor(struct iio_dev *indio_dev,
> if (err < 0)
> return err;
>
> + /* Disable DRDY, this might be still be enabled after reboot. */
> + err = st_sensors_set_dataready_irq(indio_dev, false);
> + if (err < 0)
> + return err;
> +
> if (sdata->current_fullscale) {
> err = st_sensors_set_fullscale(indio_dev,
> sdata->current_fullscale->num);
>
next prev parent reply other threads:[~2016-05-14 16:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 18:43 [PATCH 1/3] iio: st_sensors: Init trigger before irq request Crestez Dan Leonard
2016-05-13 18:43 ` [PATCH 2/3] iio: st_sensors: Disable DRDY at init time Crestez Dan Leonard
2016-05-14 16:55 ` Jonathan Cameron [this message]
2016-05-24 11:28 ` Linus Walleij
2016-05-29 19:28 ` Jonathan Cameron
2016-05-13 18:43 ` [PATCH 3/3] iio: st_sensors: Use level interrupts Crestez Dan Leonard
2016-05-14 16:16 ` Jonathan Cameron
2016-05-24 11:40 ` Linus Walleij
2016-05-24 12:35 ` Crestez Dan Leonard
2016-05-29 19:29 ` Jonathan Cameron
2016-06-02 14:36 ` Linus Walleij
2016-06-03 11:08 ` Jonathan Cameron
2016-06-20 13:26 ` Linus Walleij
2016-05-14 16:54 ` [PATCH 1/3] iio: st_sensors: Init trigger before irq request Jonathan Cameron
2016-05-24 11:27 ` Linus Walleij
2016-05-24 12:33 ` Crestez Dan Leonard
2016-05-24 21:54 ` Linus Walleij
2016-05-29 19:26 ` 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=12e74954-0ab2-1c00-e589-84114f3062ec@kernel.org \
--to=jic23@kernel.org \
--cc=daniel.baluta@intel.com \
--cc=denis.ciocca@st.com \
--cc=giuseppe.barba@st.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=leonard.crestez@intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@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
Powered by JetHome