From patchwork Wed Jul 10 14:56:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitor Soares X-Patchwork-Id: 11043423 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 DEAE81902 for ; Mon, 15 Jul 2019 07:25:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6AA7203B9 for ; Mon, 15 Jul 2019 07:25:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB45627DA4; Mon, 15 Jul 2019 07:25:02 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7762E203B9 for ; Mon, 15 Jul 2019 07:25:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=5GBDPvlEZ0GMuLY6oBqNJpEbtQFYw+iEGXdBU7+sOqg=; b=jOO o7mdG0mRm4YUG5Att/AoxGuomTZgLmZWOHLDXvfLFsx19B46Ta/M0Rge5pqREuzbMM4sVmBUyPB+2 9JfPjaicVgE/JdkcdTO8KcT5pRJUNk7Tq3mzr/pU7dSHnrbeiv+QG2N/zy6K1IO8RBUnyGcq9fkiJ ElYvSGof8JgnPW7FhIlwPlMHb4ZVSxBetTgr+SwIpf6CgBYnK/x5ySWXAF4cm601U9i+bXeKsb6Qs EEZ9JU7iC957UTDPTDcpbAz+vucfIxdJFgjO6uldx9mffVzA4nP8TrHKMXV2SaPPp94yZR2zx0/mJ SncwbKiPXJtvRxfAXMFhYApf32L2tCA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hmvM6-0000tI-0a; Mon, 15 Jul 2019 07:25:02 +0000 Received: from dc2-smtprelay2.synopsys.com ([198.182.61.142] helo=smtprelay-out1.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hlE1W-0000Oq-OI for linux-i3c@lists.infradead.org; Wed, 10 Jul 2019 14:56:49 +0000 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 64173C1C7F; Wed, 10 Jul 2019 14:56:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1562770604; bh=wlZvgrVT1cnhuSHx1zID1cemmfpVHJ+ubZIZzKEp5eM=; h=From:To:Cc:Subject:Date:From; b=OjpWs0Y4Qg+BBOtqLlD7heYkPssrjR3AOfFSvw9SX4JRMwIF0Yka8UKgEIEoqore7 5jJi8Vg++vwsHFQDIlEbnSILEoF1EEDIeXVZiLgbV5hmydzP3YPLlV7PEoWQpAf83N 4UG65yGR2yyUOHLPaoiAW0KlVZfStCUArPW6ORmF0sx+ywz/WObRDK8ELSXXwCDE2y 8ZrablIAkPrUUZFO7AEUdHxRjfe3khI1L66YlanQZBE8zH9bM5ghaYhAOtu4PWhPu6 tLVyytJVFLfb0RnkNdaKG6CGh8VMLjIGxjUq4tP+Jd2L6hYJ0B7pPrbJOweX3IPyli nO2AncxBoKeOg== Received: from de02.synopsys.com (de02.internal.synopsys.com [10.225.17.21]) by mailhost.synopsys.com (Postfix) with ESMTP id E6898A0057; Wed, 10 Jul 2019 14:56:41 +0000 (UTC) Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by de02.synopsys.com (Postfix) with ESMTP id BCB503FA2F; Wed, 10 Jul 2019 16:56:41 +0200 (CEST) From: Vitor Soares To: linux-iio@vger.kernel.org, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] Add ST lsm6dso i3c support Date: Wed, 10 Jul 2019 16:56:36 +0200 Message-Id: X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190710_075646_799428_D24C6D57 X-CRM114-Status: GOOD ( 10.96 ) X-Mailman-Approved-At: Mon, 15 Jul 2019 00:24:58 -0700 X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joao.Pinto@synopsys.com, rafael@kernel.org, gregkh@linuxfoundation.org, Vitor Soares , broonie@kernel.org, bbrezillon@knernel.org, lorenzo@kernel.org MIME-Version: 1.0 Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch series add i3c support for STM LSM6DSO and LSM6DSR sensors. It is also introduced i3c support on regmap api. Due the lack of i3c devices HDR capables on the market the support for now is only for i3c sdr mode by using i3c_device_do_priv_xfers() method. The i3c regmap api is already available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git tags/regmap-i3c Change in v3: Update st_lsm6dsx_probe() call Remove i3c_get_device_id() and use i3c_device_match_id() Changes in v2: Change i3c_get_device_id() to drivers/i3c/device.c Add support for LSM6DSR Vitor Soares (3): regmap: add i3c bus support i3c: add i3c_get_device_id helper iio: imu: st_lsm6dsx: add i3c basic support for LSM6DSO and LSM6DSR drivers/base/regmap/Kconfig | 6 ++- drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-i3c.c | 60 ++++++++++++++++++++++++++++ drivers/i3c/device.c | 46 ++++++++++++++++++++++ drivers/i3c/master.c | 45 --------------------- drivers/iio/imu/st_lsm6dsx/Kconfig | 8 +++- drivers/iio/imu/st_lsm6dsx/Makefile | 1 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c | 61 +++++++++++++++++++++++++++++ include/linux/i3c/device.h | 4 ++ include/linux/regmap.h | 20 ++++++++++ 10 files changed, 205 insertions(+), 47 deletions(-) create mode 100644 drivers/base/regmap/regmap-i3c.c create mode 100644 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c