All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Koivunen, Mikko" <Mikko.Koivunen@fi.rohmeurope.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "pmeerw@pmeerw.net" <pmeerw@pmeerw.net>,
	"knaack.h@gmx.de" <knaack.h@gmx.de>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v2 1/7] iio: light: rpr0521 disable sensor -bugfix
Date: Thu, 13 Apr 2017 06:35:19 +0000	[thread overview]
Message-ID: <E223F49C7E3E1C4E8F3928A8EC9CF0F8DBEC4925@WILL-MAIL002.REu.RohmEu.com> (raw)
In-Reply-To: 19d68038-5af3-2728-cbc9-8df28b3b26d9@kernel.org

On 8.4.2017 17:47, Jonathan Cameron wrote:
> On 07/04/17 13:07, 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>
> What effect does this have on device operation?

Actually none with current code.
Because it's never called for disabling, not even in_poweroff(). This
could also be fixed by removing second parameter and hardcoding status
as _MODE_x_ENABLE.

> What I'm looking for is info on whether this wants to go to stable as
> it will cause the device not to work, or whether it is wasting power etc.
>
> Also useful to add a fixes tag as that makes it easy for stable maintainers
> to filter incoming patches for relevance to their trees.
>
> Will be looking for Acks from Daniel on all of these as he wrote the original
> and is still active.
>
> Jonathan
>> ---
>> Tested on LeMaker HiKey with AOSP7.1 kernel 4.4.
>>
>>  drivers/iio/light/rpr0521.c |   11 ++++++++---
>>  1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/iio/light/rpr0521.c b/drivers/iio/light/rpr0521.c
>> index 7de0f39..c15529b 100644
>> --- a/drivers/iio/light/rpr0521.c
>> +++ b/drivers/iio/light/rpr0521.c
>> @@ -197,8 +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 +214,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;
>>  }
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


      reply	other threads:[~2017-04-13  6:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07 12:07 [PATCH v2 1/7] iio: light: rpr0521 disable sensor -bugfix Mikko Koivunen
2017-04-07 12:07 ` [PATCH v2 2/7] iio: light: rpr0521 whitespace fixes Mikko Koivunen
2017-04-08 14:49   ` Jonathan Cameron
2017-04-10 13:25     ` Koivunen, Mikko
2017-04-07 12:07 ` [PATCH v2 3/7] iio: light: rpr0521 sample_frequency read/write added Mikko Koivunen
2017-04-08 15:02   ` Jonathan Cameron
2017-04-10 13:26     ` Koivunen, Mikko
2017-04-07 12:07 ` [PATCH v2 4/7] iio: light: rpr0521 proximity offset " Mikko Koivunen
2017-04-08 15:07   ` Jonathan Cameron
2017-04-10 13:36     ` Koivunen, Mikko
2017-04-07 12:07 ` [PATCH v2 5/7] iio: light: rpr0521 channel numbers reordered Mikko Koivunen
2017-04-08 15:09   ` Jonathan Cameron
2017-04-07 12:07 ` [PATCH v2 6/7] iio: light: rpr0521 triggered buffer added Mikko Koivunen
2017-04-08 15:28   ` Jonathan Cameron
2017-04-12 13:44     ` Koivunen, Mikko
2017-04-14 15:21       ` Jonathan Cameron
2017-04-25  8:37         ` Koivunen, Mikko
2017-04-07 12:07 ` [PATCH v2 7/7] iio: light: rpr0521 magic number to sizeof() on value read Mikko Koivunen
2017-04-08 15:30   ` Jonathan Cameron
2017-04-08 14:47 ` [PATCH v2 1/7] iio: light: rpr0521 disable sensor -bugfix Jonathan Cameron
2017-04-13  6:35   ` Koivunen, Mikko [this message]

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=E223F49C7E3E1C4E8F3928A8EC9CF0F8DBEC4925@WILL-MAIL002.REu.RohmEu.com \
    --to=mikko.koivunen@fi.rohmeurope.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@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 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.