lkml.org 
[lkml]   [2019]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] io: accel: kxcjk1013: restore the range after resume.
From
Date
Hi,

On 06-03-19 03:32, Chen, Hu wrote:
> From: "he, bo" <bo.he@intel.com>
>
> On some laptops, kxcjk1013 is powered off when system enters S3. We need
> restore the range regiter during resume. Otherwise, the sensor doesn't
> work properly after S3.
>
> Signed-off-by: he, bo <bo.he@intel.com>
> Signed-off-by: Chen, Hu <hu1.chen@intel.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
> v3: Avoid unnecessary mutex_unlock (Hans).
> v2: Handle return value independently (Jonathan).
>
> drivers/iio/accel/kxcjk-1013.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> index 7096e577b23f..50f3ff386bea 100644
> --- a/drivers/iio/accel/kxcjk-1013.c
> +++ b/drivers/iio/accel/kxcjk-1013.c
> @@ -1437,6 +1437,8 @@ static int kxcjk1013_resume(struct device *dev)
>
> mutex_lock(&data->mutex);
> ret = kxcjk1013_set_mode(data, OPERATION);
> + if (ret == 0)
> + ret = kxcjk1013_set_range(data, data->range);
> mutex_unlock(&data->mutex);
>
> return ret;
>

\
 
 \ /
  Last update: 2019-03-06 09:44    [W:0.057 / U:38.220 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site