From patchwork Sun Nov 11 14:15:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10677657 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A61C4139B for ; Sun, 11 Nov 2018 14:15:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9604E2AA5A for ; Sun, 11 Nov 2018 14:15:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A0F62AA61; Sun, 11 Nov 2018 14:15:46 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 2A4B12AA5A for ; Sun, 11 Nov 2018 14:15:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728091AbeKLAE0 (ORCPT ); Sun, 11 Nov 2018 19:04:26 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:34576 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727996AbeKLAE0 (ORCPT ); Sun, 11 Nov 2018 19:04:26 -0500 Received: by mail-wm1-f65.google.com with SMTP id f1-v6so7013985wmg.1 for ; Sun, 11 Nov 2018 06:15:44 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=RK62r8Ff6xf9BjntonGMYFQGs6yY6f1xaBooNhSEhwM=; b=C10DXHt2TtgVT57W7LF9TYdvBe32ifJvabJZxq/oBAhE98jKAzMxxV/FfItlFsQl43 CQj7aDtJBgyK2cFnQb2lofLOHLLyKXIk9+d75j5bqsKPkvdgvj6R/9KKWFgb45ezYicF /3jZmMiNQGDp5ilmB7ioE2Pxxzf6JVwb7ayEnLQwtJpLBWZvzfcsOlGL2q9Fy+AmKZla xeXjMlkreO5sDnOhI0InuyTeNAVq3ANwWMoJzHiuI+qFBlK5tUIs6Ztldpm+lhvGJAMR sOVAOmZbpm5xhi3MqyClEhkJQBXSzSLNaWrLfo6wFunSYi+zxhHpnAF0UJq1WhvWnCAz 1g8Q== X-Gm-Message-State: AGRZ1gI6sw6OKhvVdbMhEp+Rn4dOIS2gfVpSXTYfN3ZNWPu/g+BJmhM+ JgABsEDEmD3MOWjq9wzdowhpFw== X-Google-Smtp-Source: AJdET5dPkGg9jgh+hkX+BAu/fpehbos9LoXTQeEyiF5Fetkppop/1EB/bGNjFxZNtA1JcKxw14P1ow== X-Received: by 2002:a1c:ccb:: with SMTP id 194-v6mr5493710wmm.102.1541945743798; Sun, 11 Nov 2018 06:15:43 -0800 (PST) Received: from localhost.localdomain ([151.66.8.224]) by smtp.gmail.com with ESMTPSA id w11-v6sm15861685wrr.96.2018.11.11.06.15.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Nov 2018 06:15:42 -0800 (PST) From: Lorenzo Bianconi To: jic23@kernel.org Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 0/9] add i2c controller support to st_lsm6dsx driver Date: Sun, 11 Nov 2018 15:15:27 +0100 Message-Id: X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 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 Introduce i2c controller support to st_lsm6dsx driver for lsm6dso sensor. st_lsm6dsx sensor-hub supports up to 3 concurrent slave devices. Add register map for lis2mdl magnetometer sensor. Add hw FIFO support to st_lsm6dsx sensorhub driver. Changes since v1: - move back st_lsm6dsx_set_fifo_mode routine in fifo_lock critical section in st_lsm6dsx_flush_fifo - improve documentation - move st_lsm6dsx_sensor_set_enable definition in a separated patch - move st_lsm6dsx_push_tagged_data definition in a separated patch - use proper ts_ref for ext devices in st_lsm6dsx_push_tagged_data - fix invalid iio_dev identification in st_lsm6dsx_push_tagged_data when ST_LSM6DSX_EXT1_TAG is read from the FIFO - refactor st_lsm6dsx_shub_probe moving wai check in a dedicated routine - fix abi issue in scale_available definition Lorenzo Bianconi (9): iio: imu: st_lsm6dsx: introduce locked read/write utility routines iio: imu: st_lsm6dsx: reload trimming parameter at bootstrap iio: imu: st_lsm6dsx: remove static from st_lsm6dsx_set_watermark iio: imu: st_lsm6dsx: introduce ST_LSM6DSX_ID_EXT sensor ids iio: imu: st_lsm6dsx: introduce st_lsm6dsx_sensor_set_enable routine iio: imu: st_lsm6dsx: add i2c embedded controller support iio: imu: st_lsm6dsx: add st_lsm6dsx_push_tagged_data routine iio: imu: st_lsm6dsx: add hw FIFO support to i2c controller dt-bindings: iio: imu: st_lsm6dsx: add support to i2c pullup resistors .../bindings/iio/imu/st_lsm6dsx.txt | 1 + drivers/iio/imu/st_lsm6dsx/Makefile | 3 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 167 +++- .../iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 165 ++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 283 +++++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 777 ++++++++++++++++++ .../linux/platform_data/st_sensors_pdata.h | 2 + 7 files changed, 1263 insertions(+), 135 deletions(-) create mode 100644 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c