From: Jonathan Cameron <jic23@kernel.org>
To: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Cc: pmeerw@pmeerw.net, knaack.h@gmx.de, lars@metafoo.de,
Daniel Baluta <daniel.baluta@nxp.com>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH v5 1/9] iio: light: rpr0521 disable sensor -bugfix
Date: Sun, 21 May 2017 12:06:57 +0100 [thread overview]
Message-ID: <a3eae34c-1108-2e11-70e1-a01fbe0c16b3@kernel.org> (raw)
In-Reply-To: <1495109577-29596-2-git-send-email-mikko.koivunen@fi.rohmeurope.com>
On 18/05/17 13:12, Mikko Koivunen wrote:
> Sensor was marked enabled on each call even if the call was for disabling
> sensor.
>
> Signed-off-by: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
I'm going to guess it 'kind of worked' before this and treat this
as a low urgency fix. This is primarily to avoid having to delay
the non bug fix patches later in the series.
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> Tested on LeMaker HiKey with AOSP7.1 kernel 4.4.
> Patch v2->v3 changes:
> whitespace change.
>
> drivers/iio/light/rpr0521.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/light/rpr0521.c b/drivers/iio/light/rpr0521.c
> index 7de0f39..03504f6 100644
> --- a/drivers/iio/light/rpr0521.c
> +++ b/drivers/iio/light/rpr0521.c
> @@ -197,7 +197,10 @@ static int rpr0521_als_enable(struct rpr0521_data *data, u8 status)
> if (ret < 0)
> return ret;
>
> - data->als_dev_en = true;
> + if (status & RPR0521_MODE_ALS_MASK)
> + data->als_dev_en = true;
> + else
> + data->als_dev_en = false;
>
> return 0;
> }
> @@ -212,7 +215,10 @@ static int rpr0521_pxs_enable(struct rpr0521_data *data, u8 status)
> if (ret < 0)
> return ret;
>
> - data->pxs_dev_en = true;
> + if (status & RPR0521_MODE_PXS_MASK)
> + data->pxs_dev_en = true;
> + else
> + data->pxs_dev_en = false;
>
> return 0;
> }
>
next prev parent reply other threads:[~2017-05-21 11:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 12:12 [PATCH v5 0/9] iio: light: rpr0521 Mikko Koivunen
2017-05-18 12:12 ` [PATCH v5 1/9] iio: light: rpr0521 disable sensor -bugfix Mikko Koivunen
2017-05-21 11:06 ` Jonathan Cameron [this message]
2017-05-18 12:12 ` [PATCH v5 2/9] iio: light: rpr0521 poweroff for probe fails Mikko Koivunen
2017-05-21 11:08 ` Jonathan Cameron
2017-05-18 12:12 ` [PATCH v5 3/9] iio: light: rpr0521 on-off sequence change for CONFIG_PM Mikko Koivunen
2017-05-21 11:10 ` Jonathan Cameron
2017-05-18 12:12 ` [PATCH v5 4/9] iio: light: rpr0521 magic number to sizeof() on value read Mikko Koivunen
2017-05-21 11:11 ` Jonathan Cameron
2017-05-18 12:12 ` [PATCH v5 5/9] iio: light: rpr0521 whitespace fixes Mikko Koivunen
2017-05-21 11:12 ` Jonathan Cameron
2017-05-18 12:12 ` [PATCH v5 6/9] iio: light: rpr0521 sample_frequency read/write Mikko Koivunen
2017-05-21 11:14 ` Jonathan Cameron
2017-05-18 12:12 ` [PATCH v5 7/9] iio: light: rpr0521 proximity offset read/write Mikko Koivunen
2017-05-21 11:15 ` Jonathan Cameron
2017-05-18 12:12 ` [PATCH v5 8/9] iio: light: rpr0521 channel numbers reordered Mikko Koivunen
2017-05-21 11:16 ` Jonathan Cameron
2017-05-18 12:12 ` [PATCH v5 9/9] iio: light: rpr0521 triggered buffer Mikko Koivunen
2017-05-21 11:34 ` Jonathan Cameron
2017-05-25 13:53 ` Koivunen, Mikko
2017-05-28 15:06 ` Jonathan Cameron
2017-05-18 12:20 ` [PATCH v5 0/9] iio: light: rpr0521 Daniel Baluta
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=a3eae34c-1108-2e11-70e1-a01fbe0c16b3@kernel.org \
--to=jic23@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=mikko.koivunen@fi.rohmeurope.com \
--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).