Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp61224lfe; Fri, 15 Apr 2022 19:32:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRX+n+6F5qipbAYR7xY/LdCoGe58wLMus/1ik7Gwry2lXXAmus2/Kr14wilHeOdYFVDfIL X-Received: by 2002:a17:902:b697:b0:151:4c2e:48be with SMTP id c23-20020a170902b69700b001514c2e48bemr1724931pls.70.1650076364595; Fri, 15 Apr 2022 19:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650076364; cv=none; d=google.com; s=arc-20160816; b=G/+C9OvOVwfEIe5jOmlApb3C+2cHLaLiNYiY06DW4zNWMBtIAoQVnlZIEEo9fBui1O QqLlJcxl7jjjM4ErGAqSqB5o1YgcdNcg/1f9+w5br/TFVV1m8g5YHPuSkkf9GidGRAQm b5HbuD7HN6EnJUw06WRhOD5upn+CBKbqtv9h5DAtrr9RZF1OE62WMd/ogA9qa0wdSAuS vj8cjMzLLG9DcL3cY5wujf8Myf0/zK9Sof0G47OWbNTb9aeV781bU4wImgNa41J4AWZt wWczJdX7qYcT0Y4YLzMisfDtR6Z4M25bb0T5WyqRdqiIKJI5bqA7QnDUfOKL6f0svVNk ZxIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iPSxNSDHQgGlVMg1tM8lN9vUHBMFOTVS8umUM6GB8jI=; b=AfrmyLVZb+9RKY7pomqahzK0mJZocaitMfgJDZUUBGOyHCMxL+z/lghm8PJJHN1cOI KjZxBoN2m0vgNVgi71sBJ8N7DP2tS3LtEOVSC3vlm1soz+k2YXZQCZb/c6WW0yQQ3b1u uwQTI5tbIAy9DepREf+p4BcL3/v1Gb/TqsiRDvrbPN+Kw4B76OY4W8PZa8PUVBnRkcDZ GHamVSuVi2OHMgY9W2p4pPLm+4lu8Y6usUW9N4ilwHxJ37PeuiCpxHKZH0f95RVa84nI nCEwgXGBd32ePX1zwawmtcr2B8oIpmNEchZ6WZQa4Ab6u8t0buqn3TP1rcsSzFd+VCkL dQ7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Y0I+oiau; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id pg7-20020a17090b1e0700b001ca9946de5dsi3601680pjb.56.2022.04.15.19.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:32:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Y0I+oiau; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 58665166663; Fri, 15 Apr 2022 18:42:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353908AbiDONDM (ORCPT + 99 others); Fri, 15 Apr 2022 09:03:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353874AbiDONC5 (ORCPT ); Fri, 15 Apr 2022 09:02:57 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D72DA366AD; Fri, 15 Apr 2022 06:00:28 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id bv19so15276793ejb.6; Fri, 15 Apr 2022 06:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iPSxNSDHQgGlVMg1tM8lN9vUHBMFOTVS8umUM6GB8jI=; b=Y0I+oiauERbDc+13+UqLwQy/56ZZqTb359ySoC1oQrP8rFjiHGEyiHeK8XW7JS/3gs K0RPOnDx5/ZVsfJQevZGfL37Akf5mGabA0jTV2loWpWFHktgLJ97fa8SV8LpbVRmnDjv MkqvVOUQJE9wS8J/xyXRn5+mUsH5M14hBUDTXAHXTtU4UTokoimjQCy+wJcw+PKOgWS5 7mvGbeL7NbZJcV5f1VIk0NAcMx+Sc0jkUKgUaWk64IY3+cstpeKLWNJNsBa+3+MEnHh4 6XFwryQ4hsIX44SbtffXFMyVlaY4v5h4gtxZG7CI4iHOX32ZIda3mD7g6lvstGpCQBWd viMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iPSxNSDHQgGlVMg1tM8lN9vUHBMFOTVS8umUM6GB8jI=; b=Qg1aQwPArsj21ESAGfOJHKdtqH0BGIaLBBsAD1vT6q8s+x9WIc7j/Y/DJ/re8DiZ1A BY3+UgVgeKOb92SRAPSZ8sqdC41YPKGu3ocPOkEeWEAXLgqvKEacP/DzW8sje0mtAKsv P1qlu3dVhzcjf8UJow/7OvaS6UeRfOkFbw98wtEXg7gFX+SwlLhGu58Q4R3WkH6rQBu6 HKA5jcmoxXPmu8jxYOTGOxfPoT80navEdBCTxFoh3ue232KHhtyPSIbZ7TAoQTt6qlz0 DTX+5m9qgrBPDpbkHTixEBvMvXyZfzA5vAPtTAimtU89EJhc43nqShNRR8ZSCZsngrfI yPyQ== X-Gm-Message-State: AOAM5330kj3qYPU3IgBeYaUtltWdeveZDMFD/nSlskaaU/1KhICipmPr /EXXtb3YJNea+QkHb6l38Vc= X-Received: by 2002:a17:907:3f18:b0:6e8:9332:542e with SMTP id hq24-20020a1709073f1800b006e89332542emr5961415ejc.633.1650027627401; Fri, 15 Apr 2022 06:00:27 -0700 (PDT) Received: from poker.lan (static.2-229-210-222.ip198.fastwebnet.it. [2.229.210.222]) by smtp.gmail.com with ESMTPSA id i26-20020a50d75a000000b0041e84bb406fsm2704715edj.0.2022.04.15.06.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 06:00:27 -0700 (PDT) From: Andrea Merello To: jic23@kernel.org, mchehab+huawei@kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: lars@metafoo.de, robh+dt@kernel.org, andy.shevchenko@gmail.com, matt.ranostay@konsulko.com, ardeleanalex@gmail.com, jacopo@jmondi.org, Andrea Merello Subject: [v4 04/14] iio: add modifers for pitch, yaw, roll Date: Fri, 15 Apr 2022 14:59:55 +0200 Message-Id: <20220415130005.85879-5-andrea.merello@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220415130005.85879-1-andrea.merello@gmail.com> References: <20220415130005.85879-1-andrea.merello@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrea Merello This patch adds modifiers for reporting rotations as euler angles (i.e. yaw, pitch and roll). Signed-off-by: Andrea Merello --- drivers/iio/industrialio-core.c | 3 +++ include/uapi/linux/iio/types.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index d087b2607cc9..aa5f98d3b334 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -137,6 +137,9 @@ static const char * const iio_modifier_names[] = { [IIO_MOD_LINEAR_X] = "linear_x", [IIO_MOD_LINEAR_Y] = "linear_y", [IIO_MOD_LINEAR_Z] = "linear_z", + [IIO_MOD_PITCH] = "pitch", + [IIO_MOD_YAW] = "yaw", + [IIO_MOD_ROLL] = "roll", }; /* relies on pairs of these shared then separate */ diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h index 0993f6b697fc..4853701ba70d 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h @@ -98,6 +98,9 @@ enum iio_modifier { IIO_MOD_LINEAR_X, IIO_MOD_LINEAR_Y, IIO_MOD_LINEAR_Z, + IIO_MOD_PITCH, + IIO_MOD_YAW, + IIO_MOD_ROLL, }; enum iio_event_type { -- 2.17.1