* RE: [PATCH] staging: iio: tsl2x7x_core: fix proximity threshold
@ 2014-06-02 16:08 Jon Brenner
2014-06-02 17:50 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Jon Brenner @ 2014-06-02 16:08 UTC (permalink / raw)
To: Jonathan Cameron, Mario Schuknecht, linux-iio@vger.kernel.org
Hello Jonathan,
Looks fine (these changes should have already been in there as they reflect exactly what I have in my most recent source) - but I'll figure that out later.
-----Original Message-----
From: Jonathan Cameron [mailto:jic23@kernel.org]
Sent: Saturday, May 31, 2014 5:25 AM
To: Mario Schuknecht; linux-iio@vger.kernel.org; Jon Brenner
Subject: Re: [PATCH] staging: iio: tsl2x7x_core: fix proximity treshold
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) {
>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] staging: iio: tsl2x7x_core: fix proximity threshold
2014-06-02 16:08 [PATCH] staging: iio: tsl2x7x_core: fix proximity threshold Jon Brenner
@ 2014-06-02 17:50 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2014-06-02 17:50 UTC (permalink / raw)
To: Jon Brenner, Mario Schuknecht, linux-iio@vger.kernel.org
On 02/06/14 17:08, Jon Brenner wrote:
> Hello Jonathan,
> Looks fine (these changes should have already been in there as they reflect exactly what I have in my most recent source) - but I'll figure that out later.
Cool - formal acks or even better reviewed-by tags
always welcome. Anyhow I've applied it now so too late
for this one ;)
>
>
> -----Original Message-----
> From: Jonathan Cameron [mailto:jic23@kernel.org]
> Sent: Saturday, May 31, 2014 5:25 AM
> To: Mario Schuknecht; linux-iio@vger.kernel.org; Jon Brenner
> Subject: Re: [PATCH] staging: iio: tsl2x7x_core: fix proximity treshold
>
> 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) {
>>
>
> --
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-02 17:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02 16:08 [PATCH] staging: iio: tsl2x7x_core: fix proximity threshold Jon Brenner
2014-06-02 17:50 ` Jonathan Cameron
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).