Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp836316pxb; Thu, 17 Feb 2022 16:10:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8V0Z5JGuaaLhbH/FP5jsDyop1lpmLmbpsRb4XzWbMc028RCuK+JPBmovBo6pHKQnJJp1c X-Received: by 2002:a63:8f18:0:b0:372:eacf:e8da with SMTP id n24-20020a638f18000000b00372eacfe8damr4223034pgd.362.1645143045090; Thu, 17 Feb 2022 16:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645143045; cv=none; d=google.com; s=arc-20160816; b=YT9gJBUwg9ZBUTBmYUtn/vhJNNiWIYD+j3Sem1TI0KNv5jaG30r/Gjik8qX7Scj8A1 m+fjZcFGUqFacWHKLqqT0Px1vsBDiT3mG19EXzFSQ3aJTrCBQ2u5eKIHhr464yA85c91 4yEpkEGdmHk5VvmOQmgFrMwT16hLnVGkQwI4fisbaSKQNDFtDoZ49+K0yUxqjVcGt9U4 oM2c7oVhRMw7rOZ5jpaaiGMuSuoc+gLgbMS639TAgpUQ/oELk9kPF1AzrAge3rRoMsi9 uoGRyeMoDuNN/fh4mFVK7WaOuha5Rqp2qeWRQ5l/dG1qn35kwVFvtE4SLy1ZP4F5dzCA Hxsg== 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=Hw2Jui/kNYseL0KVgLc40Ac/EwZ3g3QErB9gIo0wOQA=; b=EoBrgACzpCgQ0kHt7K7uw9wg91qG/L3hWpZ+Hj9Wla/bG6TTlW64jmb9Iu8KyNer+H 9MpjBI3LQ3SSxIE0k5p8cT7DHhMIlKdBRsn3DhfNQNYoZZiR1BocTFgAXKp8IDtZeu0X 8yk3GATnrTqUU2NU81PYv4NjDEaXu9S9zWozu4hx2kKjZqbdmus2IUvO+xU2eOUOT6ug FCsbdHBB42MI5xHOTpI5QRuft2uSdXw/1bf0NpXPSJAaVUZCE6W60R26SCe2yN1ByDdX 9lm+0JTe/Uaq3BUM5LvetOjbdwnGNgO/HEkw7B+Z1sFpjAcb/aKQfrKTKsKr33ZsX3m7 XhlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gYc3fv2q; 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 m9si7835038plc.318.2022.02.17.16.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 16:10:45 -0800 (PST) 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=gYc3fv2q; 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 AB4EA343B40; Thu, 17 Feb 2022 15:37:06 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243175AbiBQQ1w (ORCPT + 99 others); Thu, 17 Feb 2022 11:27:52 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243123AbiBQQ1m (ORCPT ); Thu, 17 Feb 2022 11:27:42 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16FB19AD9B; Thu, 17 Feb 2022 08:27:28 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id a23so8581664eju.3; Thu, 17 Feb 2022 08:27:28 -0800 (PST) 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=Hw2Jui/kNYseL0KVgLc40Ac/EwZ3g3QErB9gIo0wOQA=; b=gYc3fv2qUFO4rr7likmfGjcDiFRd/MCKILMn9lx45vtGgNRBOEjRGr5N+t0jiMK9z8 1O6KFmPVf2BifwDmhsLc/J7T/5+YNJmNoDlhwVTDiXMFIuAZMXAhp648LpH3e08rDjI2 v9b5QOr99k5wXny8y5kS+AR8NAiU3kVOWXOOX5LXkD2usg8gSgAzgumzRv3eovBUQhk3 2PyirFoxMInET8M5l4cMlMaJrayah4awWIvfmIjiaE6NVWyGWVJFHIUM2v0tQusN75nb oQsX5gmWTjORILkOe0z3TLgXZ6d5BiEBe1yXG18lZN14oXDBrgDmffNb4vLf0sOVP7tp iPsA== 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=Hw2Jui/kNYseL0KVgLc40Ac/EwZ3g3QErB9gIo0wOQA=; b=MUE2eOXu9ld9iqF9Q6vH1i56LH7SBp4szgW2YKexIOgmHYNb8ssXRYJOb+dfC6aplQ o487e+d5ubxO4pX31EdataolCBo26aQpjMwEWAAHOn5GtVaQrTk6v7xtonFdh4WX/YS8 UqLnPPksaWtLaPN/ZOIZzVdSbcoWjDcYTvasicigbzAu2SWOyUE+p8qbpk7luG+aECz7 jDOhAeZFRwNPwUJ/NL02pzbAJrwSbTZfwNobdwaiJzPup6URp8iRJCgQ2Yt+5u0gBx++ NftL1EKLzFlTvQOA/uElttDfxBPAwmQd5bxtuWOu60BFnHXXZpMS9CgRQ3LM1SAEYxnt yAGQ== X-Gm-Message-State: AOAM532vvYv6Cq1F5ZfNn4S4FHo1E0Tc0UF0AscpXyM5CFkbx2r1N2x9 rHisZYyUp3LluFez0ByVtDY= X-Received: by 2002:a17:906:7714:b0:6ba:8a6a:b464 with SMTP id q20-20020a170906771400b006ba8a6ab464mr2961475ejm.613.1645115246662; Thu, 17 Feb 2022 08:27:26 -0800 (PST) Received: from poker.lan (static.2-229-210-222.ip198.fastwebnet.it. [2.229.210.222]) by smtp.gmail.com with ESMTPSA id j13sm3653742edw.24.2022.02.17.08.27.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 08:27:26 -0800 (PST) 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 , Andrea Merello Subject: [v3 04/13] iio: add modifers for pitch, yaw, roll Date: Thu, 17 Feb 2022 17:27:01 +0100 Message-Id: <20220217162710.33615-5-andrea.merello@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217162710.33615-1-andrea.merello@gmail.com> References: <20220217162710.33615-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 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 252dbe3444cc..8a5ba32d3963 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 387a1b5cd1a9..4a7481cdaf7a 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