public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Hartmut Knaack <knaack.h@gmx.de>
To: linux-iio@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Kevin Tsai <ktsai@capellamicro.com>,
	Daniel Baluta <daniel.baluta@intel.com>
Subject: Re: [PATCH 1/7] iio:light:cm3323: clear bitmask before set
Date: Wed, 17 Jun 2015 09:14:38 +0200	[thread overview]
Message-ID: <55811E5E.8050209@gmx.de> (raw)
In-Reply-To: <5c3a23e64da5989f97bb6948c4290642d1e642b7.1434492557.git.knaack.h@gmx.de>

Hartmut Knaack schrieb am 17.06.2015 um 00:17:
> When setting the bits for integration time, the appropriate bitmask needs
> to be cleared first.
> 

And it needs to be done right. I will fix it in V2.

> Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
> ---
>  drivers/iio/light/cm3323.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/light/cm3323.c b/drivers/iio/light/cm3323.c
> index 869033e..1e6092a 100644
> --- a/drivers/iio/light/cm3323.c
> +++ b/drivers/iio/light/cm3323.c
> @@ -123,7 +123,7 @@ static int cm3323_set_it_bits(struct cm3323_data *data, int val, int val2)
>  	for (i = 0; i < ARRAY_SIZE(cm3323_int_time); i++) {
>  		if (val == cm3323_int_time[i].val &&
>  		    val2 == cm3323_int_time[i].val2) {
> -			reg_conf = data->reg_conf;
> +			reg_conf = data->reg_conf & CM3323_CONF_IT_MASK;
>  			reg_conf |= i << CM3323_CONF_IT_SHIFT;
>  
>  			ret = i2c_smbus_write_word_data(data->client,
> 


  reply	other threads:[~2015-06-17  7:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 22:16 [PATCH 0/7] cm3323 fixes and cleanups Hartmut Knaack
2015-06-16 22:17 ` [PATCH 1/7] iio:light:cm3323: clear bitmask before set Hartmut Knaack
2015-06-17  7:14   ` Hartmut Knaack [this message]
2015-06-16 22:17 ` [PATCH 2/7] iio:light:Kconfig: fix typo in description Hartmut Knaack
2015-06-17 10:05   ` Daniel Baluta
2015-06-16 22:17 ` [PATCH 3/7] iio:light:cm3323: pass up error value Hartmut Knaack
2015-06-17 10:06   ` Daniel Baluta
2015-06-16 22:17 ` [PATCH 4/7] iio:light:cm3323: drop barely used variable Hartmut Knaack
2015-06-17 10:09   ` Daniel Baluta
2015-06-21 13:21     ` Jonathan Cameron
2015-06-16 22:17 ` [PATCH 5/7] iio:light:cm3323: replace unneeded variable Hartmut Knaack
2015-06-17 10:14   ` Daniel Baluta
2015-06-17 22:28     ` Hartmut Knaack
2015-06-16 22:17 ` [PATCH 6/7] iio:light:cm3323: make use of GENMASK Hartmut Knaack
2015-06-16 22:29   ` Peter Meerwald
2015-06-17  7:13     ` Hartmut Knaack
2015-06-16 22:17 ` [PATCH 7/7] iio:light:cm3323: add empty lines for code structure Hartmut Knaack
2015-06-17 10:17   ` 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=55811E5E.8050209@gmx.de \
    --to=knaack.h@gmx.de \
    --cc=daniel.baluta@intel.com \
    --cc=jic23@kernel.org \
    --cc=ktsai@capellamicro.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox