From patchwork Tue Feb 5 17:43:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 10797911 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 748D0746 for ; Tue, 5 Feb 2019 17:43:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62D6E27F4B for ; Tue, 5 Feb 2019 17:43:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 605AB288AD; Tue, 5 Feb 2019 17:43:49 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 D1E152C7A4 for ; Tue, 5 Feb 2019 17:43:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbfBERns (ORCPT ); Tue, 5 Feb 2019 12:43:48 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38738 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726742AbfBERns (ORCPT ); Tue, 5 Feb 2019 12:43:48 -0500 Received: by mail-wm1-f65.google.com with SMTP id m22so4654656wml.3 for ; Tue, 05 Feb 2019 09:43:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5G7MY3lyyhZOIyQwfjnfPbhOo9LpUCTU21q4nR8D3yo=; b=ok9P7WNROz+FqlcvqDpVfUWLuzqMjXwl1yyFbeFzLFeFQ9i4Mtk3puyhdyQi6nEHyP hcJ74041h7dYfdgiAWHK5H1E+lwWeo/jlBo2h8Z5IPc27ViuQwVyjUpqVlKAaX9Ax0ED oVrnucrAsfNMsTJ9k1b42lRBZPkbw5C4NLIigqaHmFdN5TRsAN/zic4Ret/VmMfjvJGO s9auq503Z37I862ArwXnRGocitp0BHCte/983Os1I0CyoZ2VF60de/rOBIpmnaJYhB7L FSQzn++I8L5GhHLHTceVXx85q7U8+AjNEsoGxuTKXp4s8TQnbXRLEIHcEvDhBxLWhBSX b5FQ== 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=5G7MY3lyyhZOIyQwfjnfPbhOo9LpUCTU21q4nR8D3yo=; b=jz4REHjXePhS1aiAa55UztVNfaPvSjKk5s7BES1j7WiAKIaN3BX2U/QEUQrwB77QzP bdF2x9ztz+lUasb8IHYFWEZIl+7C7kqhBElF+amz6Y+SY5344wd/YmMlDslX9OMHQR6L zZi5rDjy2FbsZLv4T4m+tFZgRYGKQkd2qMF6sA15jzb6zigu1yM2ZEPj8hpN7kAEOiXn DMpwwjaIWF6QWzZIoRfYkXjW68bxit2ItB8/ct5Rs4QC7W3K1EnZVs9xc4Y5e+cmzqec hceXKmqt/zhpPY4bDIf0eocae8vx6mQ1y+HwCj9OuYm7prZ1Redjy2ouL/mUpzS9h0Vb /OYw== X-Gm-Message-State: AHQUAuYgz31dBw5ZUF0U86SLBKGBRjrGLfAxiC0l1xJ0+mNdsNCKt0dc MRQyjepyFxR2OFHdXqAn0OX0ZA== X-Google-Smtp-Source: AHgI3Iax+csmmdOJxYpA4viXAFHQmv8kuqgCKa4uOEYxNNFABJZWkJuEjW9A8i2oUDRyn2CGln0XAQ== X-Received: by 2002:a1c:2088:: with SMTP id g130mr4577296wmg.122.1549388626210; Tue, 05 Feb 2019 09:43:46 -0800 (PST) Received: from arch-late.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id s132sm12225751wmf.28.2019.02.05.09.43.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 09:43:45 -0800 (PST) From: Rui Miguel Silva To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Shawn Guo , Rob Herring , Fabio Estevam Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Rui Miguel Silva Subject: [PATCH v2 0/5] iio: gyro: add fxas2100x driver Date: Tue, 5 Feb 2019 17:43:28 +0000 Message-Id: <20190205174333.17672-1-rui.silva@linaro.org> X-Mailer: git-send-email 2.20.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 Hi, This series introduce a NXP fxas2100x family tri axis gyroscope driver [0] It add a core implementaiton plus an i2c and spi. This device can be found in the warp7 board [1], where it was tested. --- Cheers, Rui v1->v2: Peter Meerwal-Stadler: - changed (c) to current year - add regmap include file in .h - fix comments s/cuttof/cutoff/ - add more info in mutex comment - check value in range_fs_from_value - ret not checked in range_value_from_fs - move mode to enum type - remove line between value get and validation of value in all file - pre-write, regmap_field_write, post_write refactoring - check val2 and val == 0 in write raw - check in_anglvel_scale: 7.8125? - trigger_handler: 2 => sizeof(s16) - check buffer size - print %02% to output chip id - remove !! as state is bool - trigger probe return devm_iio_trigger_register - remove error msg in case of devm_iio_device_register Fabio Estebam: - rename FXAS2100X to FXAS21002 - change compatible nxp,fxas2100x to the exact support - add VDD and VDDIO regulators in bindings and driver [0]: https://www.nxp.com/docs/en/data-sheet/FXAS21002.pdf [1]: https://www.element14.com/community/community/designcenter/single-board-computers/warp7/overview Rui Miguel Silva (5): iio: gyro: add DT bindings to fxas21002 iio: gyro: fxas2100x: add core driver for fxas2100x gyroscope iio: gyro: fxas2100x: add i2c driver iio: gyro: fxas2100x: add spi driver ARM: dts: imx7s-warp: add fxas21002 gyroscope .../bindings/iio/gyroscope/fxas2100x.txt | 18 + arch/arm/boot/dts/imx7s-warp.dts | 7 + drivers/iio/gyro/Kconfig | 22 + drivers/iio/gyro/Makefile | 3 + drivers/iio/gyro/fxas2100x.h | 151 +++ drivers/iio/gyro/fxas2100x_core.c | 931 ++++++++++++++++++ drivers/iio/gyro/fxas2100x_i2c.c | 73 ++ drivers/iio/gyro/fxas2100x_spi.c | 70 ++ 8 files changed, 1275 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/gyroscope/fxas2100x.txt create mode 100644 drivers/iio/gyro/fxas2100x.h create mode 100644 drivers/iio/gyro/fxas2100x_core.c create mode 100644 drivers/iio/gyro/fxas2100x_i2c.c create mode 100644 drivers/iio/gyro/fxas2100x_spi.c