From patchwork Wed Feb 20 14:00:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 10822185 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 4BEF513BF for ; Wed, 20 Feb 2019 14:07:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3399E2E095 for ; Wed, 20 Feb 2019 14:07:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27BBD2E35F; Wed, 20 Feb 2019 14:07:21 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 C41DB2E15E for ; Wed, 20 Feb 2019 14:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726535AbfBTOHU (ORCPT ); Wed, 20 Feb 2019 09:07:20 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]:33262 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726427AbfBTOHU (ORCPT ); Wed, 20 Feb 2019 09:07:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1550671638; s=strato-dkim-0002; d=goldelico.com; h=Message-Id:Date:Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=Z/73S7C4Zbhem92dU01yFfCmWRBwMMtw98BYsPvuu9M=; b=Zb8X2zXkstR15EXYvVQYp03v44sMDEi/MFNWmAfW3YGoIjCb/QyGjoL5wAsk96ZpOi W3AEed1yKmrYwbDV9Su1zS48q0exiWj2j8dbAz3WuDzTx4US5iIVK1vHpR7D8PQ2Dz5B 9yASPvAPR48ScQWpl1nU858c+X0d+/ziLsHuCPYfV3EgOdwY7hxfyeeyKDXX8Lhb51Kz yIa8jewClk1xr5gi0V+Ztu4MG/gpmLqYfTvcjmmyOvEVfVeqmnCrSyxoEXq95/TWX6bw GAQjp7si0VcFZia6nFYp+gdDWLHDYSlBGpU5pflbM7NUgj6J92KsPnOx3ZRqR1S7Axdn bWgA== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1OAA2UNf2M0OzzrKQ==" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 44.9 DYNA|AUTH) with ESMTPSA id 608499v1KE0vEqS (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Wed, 20 Feb 2019 15:00:57 +0100 (CET) From: "H. Nikolaus Schaller" To: Linus Walleij , Jonathan Cameron , Rob Herring , Mark Rutland , "H. Nikolaus Schaller" , Andy Shevchenko , Charles Keepax , Song Qiang Cc: letux-kernel@openphoenux.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/9] iio mount matrix - revitalize missing bindings documentation and provide code for bmc150, bmg160, bma180, itg3200, hmc584x Date: Wed, 20 Feb 2019 15:00:47 +0100 Message-Id: X-Mailer: git-send-email 2.19.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 This patch series adds the mount-matrix to several iio sensor drivers used in handheld devices. The mount-matrix translates the quite arbitrary orientation of the sensor on some printed circuit board to user-tangible orientation in handheld devices that relates to typical screen orientation. There was a bindings documentation by Linus Walleij but the patch did not make it into mainline. Therefore I resend it here. Next I have added some clarifications (at least I hope it clarifies) in a second patch. Finally, the patch set implements the hooks for the mount matrix in several iio drivers: bmc150, bma180, bmg160, itg3200, hmc5843. This includes also one patch for the bma180 to convert it to devm API. We use them in different variants of the omap3-gta04 so a separate patch set will provide device tree additions for them. H. Nikolaus Schaller (8): iio: bindings: clarifications for mount-matrix bindings iio: accel: bmc150: add mount matrix support iio: accel: bma180: add mount matrix support iio: accel: bma180: convert to devm iio: gyro: bmg160: add mount matrix support iio: gyro: itg3200: add mount matrix support iio: magnetometer: bmc150: add mount matrix support iio: magnetometer: hmc5843: add mount matrix support Linus Walleij (1): iio: document bindings for mounting matrices .../devicetree/bindings/iio/mount-matrix.txt | 162 ++++++++++++++++++ drivers/iio/accel/bma180.c | 70 ++++---- drivers/iio/accel/bmc150-accel-core.c | 19 ++ drivers/iio/gyro/bmg160_core.c | 19 ++ drivers/iio/gyro/itg3200_core.c | 18 ++ drivers/iio/magnetometer/bmc150_magn.c | 19 ++ drivers/iio/magnetometer/hmc5843.h | 1 + drivers/iio/magnetometer/hmc5843_core.c | 14 ++ include/linux/iio/gyro/itg3200.h | 1 + 9 files changed, 288 insertions(+), 35 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/mount-matrix.txt