From patchwork Fri Apr 12 16:48:55 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: 162125 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp857935jan; Fri, 12 Apr 2019 09:49:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgEmPD13Aa966szqvd1I+JxJzwxGyys2/0LENeFL4aAP77FKeU2S/CvNxdSj8K5/LPpGt/ X-Received: by 2002:a63:5b4d:: with SMTP id l13mr51932321pgm.160.1555087753410; Fri, 12 Apr 2019 09:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555087753; cv=none; d=google.com; s=arc-20160816; b=se5kg7VIZI//kwDEbry6KHxygMLQeIC2oZrsk97sDXqMuGoD1U6W1lYFVs5BmS8qb/ t1KwwxElsT9VjdvuelpZsScLVWnQ2OC3ipjbxvX7NN6kBxCXe2+YO6+7iTAub1ddEq2u S8kpHDb23tkheH7a9w20BFFul2xJm6W7CKVZJG+pQygNql6GFsMCNF2Ef7tBpFRiJ8v5 BjTWQDNQg+Qdl1j3/XzslH7UtkyqKWwdWONiFlELlIuZuO6jdrjXF25yESUo/9njPJGy jI/ahBZulj9wm79MXocc3Ac75jCDpbycC+sWAPSLZLMThVHafCwnPXLrh4yeZhkWOkbS 4ZNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NW4FHJVuyv1Xdt22HkzBW3/8jlCrIvjwbnytFoVpbYo=; b=KVY7N83J9afyoWVj8wPyhIWDqccI9M2tyYby/jLxqSZsg7zBeGic4Pm4VRglgiCB2j VqIWhM2K4Y+S2QmWdx/VAqMeNrZrIuW7QnWifk3FKLmC4k4ip3MfpdBZsFHrqXlHDbTO pZaoNzQbN50YJe532PDHj2l9RpoIQAhzF5yQOh+675Egbx5Y6yi9uHh9ixsQwDk9eKoH x+XlO9Qi0hNK/8dUndASkGA5hon12fOajiZYt9upEb0zLnOmtm18G0MLXAFsPikW/gD2 NlcCSCYGL3lyN1MFkDwMCV07d+dOzAJfGCr3Q66KQVs/6cdyvj2anYm/dYMQ1C6/Nvje woew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XpKJpdRg; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si37190885pll.132.2019.04.12.09.49.13; Fri, 12 Apr 2019 09:49:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XpKJpdRg; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726685AbfDLQtM (ORCPT + 7 others); Fri, 12 Apr 2019 12:49:12 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41604 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726884AbfDLQtM (ORCPT ); Fri, 12 Apr 2019 12:49:12 -0400 Received: by mail-wr1-f67.google.com with SMTP id r4so12761083wrq.8 for ; Fri, 12 Apr 2019 09:49:10 -0700 (PDT) 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=NW4FHJVuyv1Xdt22HkzBW3/8jlCrIvjwbnytFoVpbYo=; b=XpKJpdRgl2XvbJ43WmgOUIVmWSibL4ujbmWZjwqLg+EgcJtVJRJz8g5gGtaCk9k9L7 2u4jMmEfx3QC0iDmy3EZaq4+0hfXJnIeGCSmwADCKtU4HBIfKoSM5xs4s4LfMP8gAiph TQ6XTp4gmiWHw8wHMikjQkgaA2zvFi0/yjM2VJJ/BcRwyUHiA4HYWzOpMLSJCHRAfJQs jA9IN+TqTqUe2ZM8y3LKUX5BRzrA9QKWUE+qVwSlqv/eHlpm6cgL9PHKQg5oPW8DgCcn HXP++ulCmZAaz9+ZW8qe7JSuFEo1U6A+DPpIJh8E+qZ7RQaC4VVqXFUpp2tIchxtbVfB Ky/g== 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=NW4FHJVuyv1Xdt22HkzBW3/8jlCrIvjwbnytFoVpbYo=; b=uXhUNiLmd64IcVHRrIPXiN+ceSyw541J4Mq+nCSNd01jKKUuZSOT6G774NqzyOPNtM WwFxzRIrtt9Sne2yEDBhMB2P2Qvd12qlOQ3Wyc3PdA+5PHyoJ+uewCiKUcV7/xaLUrRA fHjiX/9UUjrz2mWhWFbuxuAcCbm0Ysg1YDBEvQUXKZ8lA3f/sGdWgmdcC72Am/EBOhAB mGs47i8y7YMf2r1PRMiBUxTtDLskFt2Qxtg5+rALx8wK2utl0YBHNiJw4smJxuM+X2nn vT8Ed1nBpXhydC6ZrumszQ/ABsgTDdKXBvxcmbp9AZVK+iQ5f2ngUIQY0plXI25GgNGK X3xQ== X-Gm-Message-State: APjAAAWDBmzdD9mdu3FOOxSwA/FmBssvIDhkvY5TM8HxaadiF5AtvIBk oXqSZ3SKbcw+kiRn797/MPaz/g== X-Received: by 2002:adf:dd0f:: with SMTP id a15mr477245wrm.221.1555087750068; Fri, 12 Apr 2019 09:49:10 -0700 (PDT) Received: from arch-late.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id h10sm73863141wrs.27.2019.04.12.09.49.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 09:49:09 -0700 (PDT) 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 v6 0/6] iio: gyro: add core driver for fxas21002c Date: Fri, 12 Apr 2019 17:48:55 +0100 Message-Id: <20190412164901.2321-1-rui.silva@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, This series introduce a NXP fxas21002c 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 v5->v6: Jonathan Cameron: - restore devm_ to some init calls - remove blank line in .h header - fix lock in trigger handler - use _chained Rob Herring: - add reviewed by tag: v4->v5: Jonathan Cameron: - remove init ret - change handle of iio register, buffer and trigger in probe and remove (I think this is what you mean, Jonathan) v3->v4: Tomasz Duszynski: - mention irq flags in bindings - add reference to drive-open-drain in bindings - fix headers files - drop comas in of_device_id sentinel - drop of_match_ptr - use probe_new Jonathan Cameron: - disable vdd regulator in case of vddio fail - use devm_add_action_or_reset - simpler functions returns - remove noisy dev_info - remove EAGAIN from runtime_suspend v2->v3: Jonathan Cameron: - cacheline aligned (DMA safe buffer) Great presentation [2] and links in the presentation, thanks - global renaming, including filenames, fxas2100x->fxas21002c - provide spi info in dts bidings - Remove SPI_MASTER in Kconfig i2c patch and move it to right patch - remove extra blank line in comment - add break range_value_from_fs after found - in range_value_from_fs use local variable - remove mode check at mode_set - combine two if statements in mode_set - in scale_get return 0 and let caller to set IIO_VAL_FRACTIONAL - remove dev_err from vdd_io regulator get - handle regulator error path - devm_add_action - check unwind order - simplify data in _suspend and alike - disable regulators at suspend - error handling at _resume - return -EAGAIN at runtime_resume Rob Herring: - Set label as gyroscope - add interrupt to bindings - add entry to maintainers 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 Rui Miguel Silva (6): iio: gyro: add DT bindings to fxas21002c iio: gyro: add core driver for fxas21002c iio: gyro: fxas21002c: add i2c driver iio: gyro: fxas21002c: add spi driver ARM: dts: imx7s-warp: add fxas21002c gyroscope MAINTAINERS: add entry for fxas21002c gyro driver .../bindings/iio/gyroscope/nxp,fxas21002c.txt | 31 + MAINTAINERS | 10 + arch/arm/boot/dts/imx7s-warp.dts | 7 + drivers/iio/gyro/Kconfig | 22 + drivers/iio/gyro/Makefile | 3 + drivers/iio/gyro/fxas21002c.h | 150 +++ drivers/iio/gyro/fxas21002c_core.c | 1006 +++++++++++++++++ drivers/iio/gyro/fxas21002c_i2c.c | 69 ++ drivers/iio/gyro/fxas21002c_spi.c | 70 ++ 9 files changed, 1368 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt create mode 100644 drivers/iio/gyro/fxas21002c.h create mode 100644 drivers/iio/gyro/fxas21002c_core.c create mode 100644 drivers/iio/gyro/fxas21002c_i2c.c create mode 100644 drivers/iio/gyro/fxas21002c_spi.c -- 2.21.0