From patchwork Fri Mar 30 18:43:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10318269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 01B4060212 for ; Fri, 30 Mar 2018 18:43:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E39EE2A656 for ; Fri, 30 Mar 2018 18:43:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D58492A665; Fri, 30 Mar 2018 18:43:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D2AC2A656 for ; Fri, 30 Mar 2018 18:43:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752536AbeC3Snc (ORCPT ); Fri, 30 Mar 2018 14:43:32 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:56022 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752530AbeC3Snc (ORCPT ); Fri, 30 Mar 2018 14:43:32 -0400 Received: by mail-wm0-f68.google.com with SMTP id b127so15960234wmf.5 for ; Fri, 30 Mar 2018 11:43:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CLUQ7cJ13A7szaaxKXNEpi6c2i2EWo//gv2wLMItj+g=; b=ErCN/GAbEpD5pTOnIpGXMK0e8IIMYKXXyxMeuUnrJK9N2FW+dWtDh6nCIDq+hhIWx9 AaerNuZAY103gLOovMepic4j+VMu93rj3MyjKo9TfAWc6WVHu5NfZctkSJXtu8YoGBBS RTA+GDiMv4ARZMiL8UKvlUdxh/hlyjTz5AZZ6uPu89QkPqnrQwqM1T9ZJUJg0WyF2/AF t5E2HrG4BZXr+uJqDGSzHr2dYTkqok9dwdVdhBQxfgMlpKO2DFskJ/IppJLTXwzR3roy niJY+2ZKDsAPkl3L5ffWKFgcoNQhWkvUxnWHu8EHVQIDOzzRkrfr3y/91HwowfmLQftl X3QA== X-Gm-Message-State: AElRT7HmGxC5v6WpcJCm00pbMjE6UJXoo2OpOzx6MkLFMwK5FOiBN3FL WerPGtZiRiqhNfxuLsoj0Fg+5fDEm3s= X-Google-Smtp-Source: AIpwx4+UjfTMfqpYyfx0Vgfbp94peyAd3OxbRQMVkQO6uevKf9R06921/QMwtBKglYxWBlchWnbrbg== X-Received: by 10.28.12.79 with SMTP id 76mr2809697wmm.116.1522435411126; Fri, 30 Mar 2018 11:43:31 -0700 (PDT) Received: from localhost.localdomain ([151.66.2.62]) by smtp.gmail.com with ESMTPSA id k184sm3535506wmk.45.2018.03.30.11.43.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Mar 2018 11:43:30 -0700 (PDT) From: Lorenzo Bianconi To: jic23@kernel.org Cc: linux-iio@vger.kernel.org Subject: [PATCH] iio: imu: st_lsm6dsx: fix FIFO threshold mask for LSM6DSM/LSM6DSL Date: Fri, 30 Mar 2018 20:43:22 +0200 Message-Id: <20180330184322.5455-1-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.16.2 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According to the latest datasheet, LSM6DSM and LSM6DSL imu sensors export GENMASK(10, 0) for FIFO threshold mask definition. Despite that is not an actual issue since write on fifo_th register is protected by max_fifo_size value, fix fifo_th and fifo_diff register definitions Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver") Signed-off-by: Lorenzo Bianconi --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index 8656d72ef4ee..50d6491df484 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -266,11 +266,11 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = { .fifo_ops = { .fifo_th = { .addr = 0x06, - .mask = GENMASK(11, 0), + .mask = GENMASK(10, 0), }, .fifo_diff = { .addr = 0x3a, - .mask = GENMASK(11, 0), + .mask = GENMASK(10, 0), }, .th_wl = 3, /* 1LSB = 2B */ },