All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Mario Schuknecht <mario.schuknecht@dresearch-fe.de>,
	linux-iio@vger.kernel.org, jbrenner@taosinc.com
Subject: Re: [PATCH] staging: iio: tsl2x7x_core: fix proximity treshold
Date: Sat, 31 May 2014 11:25:23 +0100	[thread overview]
Message-ID: <5389AE13.70903@kernel.org> (raw)
In-Reply-To: <1401171595-13448-1-git-send-email-mario.schuknecht@dresearch-fe.de>

On 27/05/14 07:19, Mario Schuknecht wrote:
> Consider high byte of proximity min and max treshold in function
> 'tsl2x7x_chip_on'. So far, the high byte was not set.
>
> Signed-off-by: Mario Schuknecht <mario.schuknecht@dresearch-fe.de>
Looks right to me.

Jon, it's your driver so do you have a few mins to check this?  Given
timing this won't go in until the merge window has closed now anyway
so you have a few weeks.  Looks like stable material though so I'll
mark it as such when I apply it.


> ---
>   drivers/staging/iio/light/tsl2x7x_core.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c
> index 9e0f2a9..ab338e3 100644
> --- a/drivers/staging/iio/light/tsl2x7x_core.c
> +++ b/drivers/staging/iio/light/tsl2x7x_core.c
> @@ -667,9 +667,13 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev)
>   	chip->tsl2x7x_config[TSL2X7X_PRX_COUNT] =
>   			chip->tsl2x7x_settings.prox_pulse_count;
>   	chip->tsl2x7x_config[TSL2X7X_PRX_MINTHRESHLO] =
> -	chip->tsl2x7x_settings.prox_thres_low;
> +			(chip->tsl2x7x_settings.prox_thres_low) & 0xFF;
> +	chip->tsl2x7x_config[TSL2X7X_PRX_MINTHRESHHI] =
> +			(chip->tsl2x7x_settings.prox_thres_low >> 8) & 0xFF;
>   	chip->tsl2x7x_config[TSL2X7X_PRX_MAXTHRESHLO] =
> -			chip->tsl2x7x_settings.prox_thres_high;
> +			(chip->tsl2x7x_settings.prox_thres_high) & 0xFF;
> +	chip->tsl2x7x_config[TSL2X7X_PRX_MAXTHRESHHI] =
> +			(chip->tsl2x7x_settings.prox_thres_high >> 8) & 0xFF;
>
>   	/* and make sure we're not already on */
>   	if (chip->tsl2x7x_chip_status == TSL2X7X_CHIP_WORKING) {
>


      reply	other threads:[~2014-05-31 10:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27  6:19 [PATCH] staging: iio: tsl2x7x_core: fix proximity treshold Mario Schuknecht
2014-05-31 10:25 ` 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=5389AE13.70903@kernel.org \
    --to=jic23@kernel.org \
    --cc=jbrenner@taosinc.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=mario.schuknecht@dresearch-fe.de \
    /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.