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: 157504 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp5445116jaa; Tue, 5 Feb 2019 09:43:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IZqzEE8xuKhJgfks7PIaoMQyvg2CncgodL+FGBywZWHFeXExasHMaDuS6S9D6avFFn4iYpS X-Received: by 2002:a17:902:4324:: with SMTP id i33mr6135549pld.227.1549388628811; Tue, 05 Feb 2019 09:43:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549388628; cv=none; d=google.com; s=arc-20160816; b=E4FGU24BIuSnqvRkBlwV3MrYapVef+flzwdtANN8AQA48pSMNBCMKu/DF9e8mJWUi0 /5uUvF9AffQOpvQjSd3poyLbWmxoO/CRf8529hxjmFTaMLj18galK9zokpE5665nsuie nhQdTUzC8xbCWmfWmGZ+XU9MUGN9YnSLZ08Tu5/8mj9yfsA6nRady2b+Ws4iFOPMPivY JanVKYwB4cxAw/4EK74J2Qwk2g4OQE5ixmKkb8cfJPoPuF2Gov1HatSIdhitZb2T9u8a Y1G4WQLlX6XVerVV7EwqQNm5Jn2YISNZaSH3TOumZTVe/Ni8kgO34wcPIOzGUd3Mud5S p8eg== 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=5G7MY3lyyhZOIyQwfjnfPbhOo9LpUCTU21q4nR8D3yo=; b=i8gj9ySGR526+9thldv2rJ47tRjbFV19muzzFjpmNC4Ydg3GUuZy6SH3+vPSdi8IM3 EnBhN+jdZRY1s/XZZdrbufluKZNpEhsTorS3BTWDsVQG/Vh3zgPyKkDyX/oRhZySZ813 5FVHb2TRZVihiW3eeiQecoKnnIg4KbgwN5i4BeA9X2Pm4eCOMEDDKktPVnNy2yCQfA5/ 74208SAKni8GLWZRv0JqArFlAL8SA+M4HiNk2AdAvmWuqDXTJY/JPB/5zsQfxT2Lk3/P PdifBg1J/auWz51zSXIW65TqHGyWpMtjZLHt2iRlignzbI8kExkE9PMgE5tdKpEfwW8i FAfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ok9P7WNR; 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 m14si3576532pgd.326.2019.02.05.09.43.48; Tue, 05 Feb 2019 09:43:48 -0800 (PST) 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=ok9P7WNR; 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 S1728000AbfBERns (ORCPT + 7 others); Tue, 5 Feb 2019 12:43:48 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39768 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbfBERnr (ORCPT ); Tue, 5 Feb 2019 12:43:47 -0500 Received: by mail-wm1-f68.google.com with SMTP id y8so4626414wmi.4 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=U223z0FPsayLQaZEDAow78rB2nGApQucinehPcbgDMEkarNFL+w9+RChBSK9MJjb6Q L/oQkb3usZ6kMiVVrUez25DcdTC5siYwIQ+uKRGShOai+hdMrn3HBotQkpon48bCbett Z+6P+Xp1eTOtes5LvwTVjDJd3NpqUkBHGHYT1+HP9VBYkg4hZaFOWr3d+rMTQppvuexW YaGHc7gSo5172cwOrxGQijJKbqByuY+c+FmfpADbkpjcd3httepjYbeaEpEMstF/3PO6 BWiNYdt/kC83SF5G9sbn67/gUV0WlbmpoUoamDBgoVybzpPDcd4OKC6G+MadjTXixGJE LFXg== X-Gm-Message-State: AHQUAubwYofP03QbgMIpwE7rfrrv4jaTlRnD7Pbb1KXZp5/EuQDz63m0 ykh2AiQUef5MDE+bSoreuWFvdw== 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 -- 2.20.1