From patchwork Tue Mar 26 10:16:45 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: 161168 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5024230jan; Tue, 26 Mar 2019 03:17:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvWBQDWwdj8bOJgfLkP1Ry41OggTNLspTcOrCNdThUqF7Y5xiHwAMV+56Ua4+pm3LZqNLh X-Received: by 2002:a62:f24e:: with SMTP id y14mr29079685pfl.209.1553595427292; Tue, 26 Mar 2019 03:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553595427; cv=none; d=google.com; s=arc-20160816; b=avqnCs8jWxDwHuevzVQREKaR7ZXXw/MnNbiXKEh46Imn/ABlvv/Yhl9kuWZPkwziMd RuRQBL8l0p97EKyo1TLLHmNa48F3W6EwXZ3Vk5vPm4B6TJKefSlU7zj01ZR9fwFYwUy8 H7q+L/OCYGtTTCVOeX2x264AjxeGgpSU+w3hETybmb8tdqx9Tm5NyZUVGnSsB0pF7U8v vUgPWTxNJjtw17e+NVozRnXeBcKj9EHFbHMbh2PLCiLtPz3ZegPkI8wR3aYM4bvI7c8V BC+X4ghr65/7GSJFLt1Be3g3zW8tnnA3YdJfC3e7z4aOeoaVnqQ4H33nxyE665YT3ZQe VyeA== 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=FvjQ0KaN17fm8d4sliqWx6H9mLiak7bj4iGfsi7kTDk=; b=B4/CvKXzCXpkj4A5JwWNniq0QA1/rj0PY7eFMFy7wMwMjlywLAA5ukXTz+gLsw5emH 1QiYq3xuMWw93wpUO5iAz3Mr4cVbBrUj29Gdu4sHSTVetZ1A1z6k53DpIvDGHAsY4chd 87AZSSoCRA7sPG7lNAP/uEjw1crpcoyeMGa52M3V3rszLY/9mCAHGTH03SdHt3lO5PZk wRzXgwrfGqSkt/S+RCFNg6DWAgM+SqieKFTzpaMXPXMRKgU2LCAF9yp/fQtgofhkopak KIr7P0jtrW+vkadrtRZghIqx5MK953BV0mKPBjFuncsFBrCGcMvX+5lVft5Bl8g9kcSR VelQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RzAp6Esx; 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 g1si16358589plp.406.2019.03.26.03.17.07; Tue, 26 Mar 2019 03:17:07 -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=RzAp6Esx; 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 S1730422AbfCZKRG (ORCPT + 7 others); Tue, 26 Mar 2019 06:17:06 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41910 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfCZKRG (ORCPT ); Tue, 26 Mar 2019 06:17:06 -0400 Received: by mail-wr1-f66.google.com with SMTP id r4so5915974wrq.8 for ; Tue, 26 Mar 2019 03:17:04 -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=FvjQ0KaN17fm8d4sliqWx6H9mLiak7bj4iGfsi7kTDk=; b=RzAp6EsxzQga1DAPb5dbmZ1XK7BkGS461hptV8r2MFW1JE+mto7YfCStisTZ9Rla+5 kRnoMTpc8sOKoKSg4rNEJTTRLL69+eRqP278C43LwvcE7EabJ0QuEJdX+s1bvUf6g0kH 5xJIokKZzJbnrgu3zGLfAxi9vONduuh4cs1bDKysCGUlM2Q1x7Z89kAr2dT3H4SHKv22 xjLmK4NoEi7uVyhGBJeHvGkG8/QMDvvI1Hcq/HyBkvY2RC078TrGQZZpj+lsF6pHfVN0 +oAKzAr4bHrEuLKSjtoGJKcfvi4ITouPJaczGF6RvqKXrHnAMRPyNe55lMwERWVXGCH5 zLgw== 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=FvjQ0KaN17fm8d4sliqWx6H9mLiak7bj4iGfsi7kTDk=; b=V8bZ9LIwMVt5tYQ/4irwCnjBXbaH5oi1nbTNHFw5c/jCK2+4ZsGgOVEwv73H5w4nD9 s0IoIbN8RuMIbfFkmLvAqpJmXJQQLQ81m4rwMSjRqz+PKiEuXPszEAheYZrM5c2lX4MR 4mVFiS2Ld0/MB8aKah5xHtid2tNe8S+ELu51xhC1OnBQv4fzc3q2zhTZ0gqLGXK4OQ+P RPT8aqFaBki5V+SkRr2stFTTgiY70Vx1IFzhwpNVvMxSPwtJPVTQt3aWNl8AUQLEVQk/ jS0OyotWyvyvbC1kV7J//b3F5x6cq9FrMFwxft/NVUHJYzRuBlnU2he0XK98kKQSDggd r4og== X-Gm-Message-State: APjAAAXXxLBX1SwICpet87PF6oVpmcu+zu2Gf7H9MawEXMvKwW8yXVbT XrNcG+WgOnoseXL9uq8CcKRHVg== X-Received: by 2002:adf:ed8a:: with SMTP id c10mr1976780wro.40.1553595424046; Tue, 26 Mar 2019 03:17:04 -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 j1sm22281024wme.4.2019.03.26.03.17.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 03:17:03 -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 v5 0/6] iio: gyro: add fxas21002c driver Date: Tue, 26 Mar 2019 10:16:45 +0000 Message-Id: <20190326101651.25056-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 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 [0]: https://www.nxp.com/docs/en/data-sheet/FXAS21002.pdf [1]: https://www.element14.com/community/community/designcenter/single-board-computers/warp7/overview [2]: https://events.linuxfoundation.org/wp-content/uploads/2017/12/20181023-Wolfram-Sang-ELCE18-safe_dma_buffers.pdf 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 | 151 +++ drivers/iio/gyro/fxas21002c_core.c | 1006 +++++++++++++++++ drivers/iio/gyro/fxas21002c_i2c.c | 69 ++ drivers/iio/gyro/fxas21002c_spi.c | 70 ++ 9 files changed, 1369 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