From patchwork Tue Mar 19 10:59:19 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: 160560 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp3725075jad; Tue, 19 Mar 2019 03:59:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbY0u28ogP6ClSu/fLl+iLiDXxz5pCMS3jKqcwEmKZ35Vr4TjK6V9RjvlFUPcGqtw4GCcH X-Received: by 2002:a62:57d7:: with SMTP id i84mr1598311pfj.125.1552993184048; Tue, 19 Mar 2019 03:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552993184; cv=none; d=google.com; s=arc-20160816; b=GQHuC7vfYTgA1Tkp/XfVNdbX122vTruv/bgXg3dp8fcDKnEXn94NOYm5fodvOpngtO 1O1C0VIH0jOtFAMUPkuCgDzblwY2dHgEceAKfUAFeIscnL9vDkax5eUuZbBEnlt3gQ7K XVDLp0GRepDpiG3VCw8DfkWsGVdkC6u8eAgAlBOyfPJ8+WMcwLhHhJ3qL+0MMfXQSTfP mZZWrVEKqVgKSHwQmtDkhV+riqVKjNVL1regpgn4kdWFf17GS+iOsH2A7n1cQVfpbqZ4 P62mpyrPC7PYzv4YgDODkSHxTrHhL+doRH38sevXsaboNih8LJ1X5JvJh9LkD9W8ubl8 5/uQ== 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=zH9giUCYZL9zDARv1fT0vviPsw2iChigPaqO4dJ69OU=; b=O+bpWFXydooB/Cr+Z1cRZSTVEA+kYlH/AoIte6YKqqgK2rQTf8g2BRNFjMYHVl15qy gHUBUfaB/zF/nA1xU2BIoTLe3Rfp+f+le/EewoWeHmg3b8R0H1H3acTQGUaPv/UHZ2lP 0VaQ6TMdfL0lCpBKJaqS7Mc74B8LxkpraLPWzif+sClmFadN//138D9+OwhGy7yErZLO iFP1bKoqKbrsSgxZ3TlcIXxZAyIeUB4tnifLvG5p6l7To7Z//W+G110biQAKc1iKaH02 fY88dFBPNOJJxrYVUSCKAyhIeCcTgPTFA6/mvasuwOpqpX1+rBdko9LGlEUKcRZ4ZFvq TnUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LL9eMp1g; 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 gn10si11377812plb.94.2019.03.19.03.59.43; Tue, 19 Mar 2019 03:59:44 -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=LL9eMp1g; 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 S1727275AbfCSK7n (ORCPT + 7 others); Tue, 19 Mar 2019 06:59:43 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53311 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726349AbfCSK7n (ORCPT ); Tue, 19 Mar 2019 06:59:43 -0400 Received: by mail-wm1-f67.google.com with SMTP id e74so16095859wmg.3 for ; Tue, 19 Mar 2019 03:59:41 -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=zH9giUCYZL9zDARv1fT0vviPsw2iChigPaqO4dJ69OU=; b=LL9eMp1gA24PrTn3hVdEamV4dmNVTomStZsfO1Efi6WM7M3xnqAclTPEEoC7Wvz/Sz ClgUBA/k8bvy5tekaWPTce7gRlxga9DSJ2mj7ypnUpvNHvZTSbgnezWAv5WV4lyGJmxS E7P6IhyktkXDV1pUVDVxGFcTzKh0govVFllYGGsF4P6VrKSicSpvIFM3bMvzShi4dnmE udYWVbzyzu76aj86cpDa8GkDCo9ZxAA+IW+Ifxg/Y4agoleqG8NSnhduh8icaopVed+g MIzSXxOCoBmArV5HgRakEfGqzSPS4OJj/Fok68ftLTL1hSTBSYG+k5nyBox4JkgAX7yV 1tbg== 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=zH9giUCYZL9zDARv1fT0vviPsw2iChigPaqO4dJ69OU=; b=VTiu4gaxcfRzY6g+uIwrMVSkt0WZJQkXx3ImO24JAlXuh8bC1DVl+9G1aKVtdbYTNS U/Wcl/TrcE0RUPEPdkjHghj2LN3oQ++TohAEy8MskcXGeBm3WDOUOTWizAyAJamfWTyN h3V4Nyrq1ErdjCFLfKfHj2nOFQasTYpexPSsoyVqqpMMzFyHppbsM3BuwH1+M1MSwKC3 I4Rh7EjVhO1RihgaBYLIZItoRsZx2z1cfKGekmfyHpQJEWf9Nw6HbzKKkVaAhorNO8eV hAHX+LEm7dWsJJFvhZ/36SC9VdRLXD8F9Hlq0mcx+Mz+OiFEYJcvvGphvGYZGIaXTECc m5mg== X-Gm-Message-State: APjAAAXQOni26l8oy6m5Y1UVIiVd/jziu+oEVWgYknXYbJZ2pWrqM4cd r7sGMc+UDgJXQkvjvdmoclRx0bhm5KQ= X-Received: by 2002:a1c:38b:: with SMTP id 133mr3053926wmd.26.1552993180699; Tue, 19 Mar 2019 03:59:40 -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 h10sm4120052wmf.2.2019.03.19.03.59.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Mar 2019 03:59:39 -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 v4 0/6] iio: gyro: add fxas21002c driver Date: Tue, 19 Mar 2019 10:59:19 +0000 Message-Id: <20190319105925.25863-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 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 Joan 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 | 987 ++++++++++++++++++ drivers/iio/gyro/fxas21002c_i2c.c | 69 ++ drivers/iio/gyro/fxas21002c_spi.c | 70 ++ 9 files changed, 1350 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