linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: michael.hennerich@analog.com
Cc: linux-iio@vger.kernel.org,
	device-drivers-devel@blackfin.uclinux.org, drivers@analog.com
Subject: Re: [PATCH 03/12] iio: ad7291: Fix AD7291_T_SENSE_MASK
Date: Wed, 31 Aug 2011 12:19:36 +0100	[thread overview]
Message-ID: <4E5E18C8.9000306@cam.ac.uk> (raw)
In-Reply-To: <1314788260-5791-3-git-send-email-michael.hennerich@analog.com>

On 08/31/11 11:57, michael.hennerich@analog.com wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
> 
> AD7291_T_SENSE_MASK must set bit-7.
> Change definition style.
> 
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Merged
> ---
>  drivers/staging/iio/adc/ad7291.c |   28 ++++++++++++++--------------
>  1 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/staging/iio/adc/ad7291.c b/drivers/staging/iio/adc/ad7291.c
> index d47df4a..dda6bcb 100644
> --- a/drivers/staging/iio/adc/ad7291.c
> +++ b/drivers/staging/iio/adc/ad7291.c
> @@ -37,30 +37,30 @@
>  #define AD7291_T_AVERAGE		3
>  #define AD7291_VOLTAGE_LIMIT_BASE	4
>  #define AD7291_VOLTAGE_LIMIT_COUNT	8
> -#define AD7291_T_SENSE_HIGH		0x1c
> -#define AD7291_T_SENSE_LOW		0x1d
> -#define AD7291_T_SENSE_HYST		0x1e
> -#define AD7291_VOLTAGE_ALERT_STATUS	0x1f
> +#define AD7291_T_SENSE_HIGH		0x1C
> +#define AD7291_T_SENSE_LOW		0x1D
> +#define AD7291_T_SENSE_HYST		0x1E
> +#define AD7291_VOLTAGE_ALERT_STATUS	0x1F
>  #define AD7291_T_ALERT_STATUS		0x20
>  
>  /*
>   * AD7291 command
>   */
> -#define AD7291_AUTOCYCLE		0x1
> -#define AD7291_RESET			0x2
> -#define AD7291_ALERT_CLEAR		0x4
> -#define AD7291_ALERT_POLARITY		0x8
> -#define AD7291_EXT_REF			0x10
> -#define AD7291_NOISE_DELAY		0x20
> -#define AD7291_T_SENSE_MASK		0x40
> -#define AD7291_VOLTAGE_MASK		0xff00
> +#define AD7291_AUTOCYCLE		(1 << 0)
> +#define AD7291_RESET			(1 << 1)
> +#define AD7291_ALERT_CLEAR		(1 << 2)
> +#define AD7291_ALERT_POLARITY		(1 << 3)
> +#define AD7291_EXT_REF			(1 << 4)
> +#define AD7291_NOISE_DELAY		(1 << 5)
> +#define AD7291_T_SENSE_MASK		(1 << 7)
> +#define AD7291_VOLTAGE_MASK		0xFF00
>  #define AD7291_VOLTAGE_OFFSET		0x8
>  
>  /*
>   * AD7291 value masks
>   */
> -#define AD7291_CHANNEL_MASK		0xf000
> -#define AD7291_VALUE_MASK		0xfff
> +#define AD7291_CHANNEL_MASK		0xF000
> +#define AD7291_VALUE_MASK		0xFFF
>  #define AD7291_T_VALUE_SIGN		0x400
>  #define AD7291_T_VALUE_FLOAT_OFFSET	2
>  #define AD7291_T_VALUE_FLOAT_MASK	0x2


  reply	other threads:[~2011-08-31 11:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-31 10:57 [PATCH 01/12] iio: ad7291: fix channel mapping michael.hennerich
2011-08-31 10:57 ` [PATCH 02/12] iio: ad7291: Fix typos, change kconfig description and file header michael.hennerich
2011-08-31 11:18   ` Jonathan Cameron
2011-08-31 10:57 ` [PATCH 03/12] iio: ad7291: Fix AD7291_T_SENSE_MASK michael.hennerich
2011-08-31 11:19   ` Jonathan Cameron [this message]
2011-08-31 10:57 ` [PATCH 04/12] iio: ad7291: Add regulator, reference voltage and scale handling michael.hennerich
2011-08-31 11:22   ` Jonathan Cameron
2011-08-31 10:57 ` [PATCH 05/12] iio: ad7291: don't swab results twice and introduce more register defines michael.hennerich
2011-08-31 11:28   ` Jonathan Cameron
2011-08-31 11:49     ` Hennerich, Michael
2011-08-31 12:01       ` Jonathan Cameron
2011-08-31 10:57 ` [PATCH 06/12] iio: ad7291: fix mask bit generation michael.hennerich
2011-08-31 11:29   ` Jonathan Cameron
2011-08-31 10:57 ` [PATCH 07/12] iio: ad7291: introduce IIO_EVENT_CODE_EXTRACT_CHAN_TYPE and use accordingly michael.hennerich
2011-08-31 11:33   ` Jonathan Cameron
2011-08-31 10:57 ` [PATCH 08/12] iio: ad7291: fix channel mapping for event enables michael.hennerich
2011-08-31 11:34   ` Jonathan Cameron
2011-08-31 10:57 ` [PATCH 09/12] iio: core: fix IIO_EVENT_CODE_EXTRACT_DIR definition michael.hennerich
2011-08-31 11:15   ` Jonathan Cameron
2011-08-31 12:01     ` Jonathan Cameron
2011-08-31 10:57 ` [PATCH 10/12] iio: ad7192: return len and fix out of range checking michael.hennerich
2011-08-31 11:37   ` Jonathan Cameron
2011-08-31 11:47     ` Hennerich, Michael
2011-08-31 11:59       ` Jonathan Cameron
2011-08-31 10:57 ` [PATCH 11/12] iio: ad7291: reset device and setup irq before it is enabled michael.hennerich
2011-08-31 11:39   ` Jonathan Cameron
2011-08-31 10:57 ` [PATCH 12/12] iio: ad7192: add temp_scale attribute, change module description michael.hennerich
2011-08-31 11:52   ` Jonathan Cameron
2011-08-31 11:14 ` [PATCH 01/12] iio: ad7291: fix channel mapping 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=4E5E18C8.9000306@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=drivers@analog.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@analog.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 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).