linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Franziska Naepelt <franziska.naepelt@idt.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: light: ltr501 Fix interchanged als/ps register field
Date: Sun, 21 May 2017 14:52:21 +0100	[thread overview]
Message-ID: <5e0f4afc-ee45-f74c-f4a1-ec895d217eef@kernel.org> (raw)
In-Reply-To: <d42349ae-0202-38aa-2f24-610180772ab5@idt.com>

On 17/05/17 11:41, Franziska Naepelt wrote:
> The register mapping for the IIO driver for the Liteon Light and Proximity
> sensor LTR501 interrupt mode is interchanged (ALS/PS).
> There is a register called INTERRUPT register (address 0x8F)
> Bit 0 represents PS measurement trigger.
> Bit 1 represents ALS measurement trigger.
> This two bit fields are interchanged within the driver.
> see datasheet page 24:
> http://optoelectronics.liteon.com/upload/download/DS86-2012-0006/S_110_LTR-501ALS-01_PrelimDS_ver1%5B1%5D.pdf
> 
> Signed-off-by: Franziska Naepelt <franziska.naepelt@idt.com>
> Acked-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Hi Franziska,

I think your email client is replacing all the tabs with spaces which
means this won't apply.  I've just done it by hand, but you might want
to look into this in future.  There are some hints in the kernel
documentation.

Anyhow, applied to the fixes-togreg branch of iio.git with a fixes
tag added and marked for stable (stable is up to me but ideally
you'd have figured out when this broke and added a fixes tag).

Not bad for a first patch ;)  Hopefully the first of many.

Thanks,

Jonathan
> ---
>   drivers/iio/light/ltr501.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c
> index b30e0c1..67838ed 100644
> --- a/drivers/iio/light/ltr501.c
> +++ b/drivers/iio/light/ltr501.c
> @@ -74,9 +74,9 @@
>   static const struct reg_field reg_field_it =
>                   REG_FIELD(LTR501_ALS_MEAS_RATE, 3, 4);
>   static const struct reg_field reg_field_als_intr =
> -                REG_FIELD(LTR501_INTR, 0, 0);
> -static const struct reg_field reg_field_ps_intr =
>                   REG_FIELD(LTR501_INTR, 1, 1);
> +static const struct reg_field reg_field_ps_intr =
> +                REG_FIELD(LTR501_INTR, 0, 0);
>   static const struct reg_field reg_field_als_rate =
>                   REG_FIELD(LTR501_ALS_MEAS_RATE, 0, 2);
>   static const struct reg_field reg_field_ps_rate =


      reply	other threads:[~2017-05-21 13:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 10:41 [PATCH] iio: light: ltr501 Fix interchanged als/ps register field Franziska Naepelt
2017-05-21 13:52 ` Jonathan Cameron [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=5e0f4afc-ee45-f74c-f4a1-ec895d217eef@kernel.org \
    --to=jic23@kernel.org \
    --cc=franziska.naepelt@idt.com \
    --cc=linux-iio@vger.kernel.org \
    /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).