Message ID | 20221115073718.2377311-2-gerald.loacker@wolfvision.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2572665wru; Mon, 14 Nov 2022 23:41:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf5VEoQNDqQ+Zi6TatKomaoWNxXEXzqIIgxLron/9b/jmJIIK5fGQzvYg8QSVaYryptmoUEr X-Received: by 2002:a17:902:ef4c:b0:186:f934:30af with SMTP id e12-20020a170902ef4c00b00186f93430afmr2916952plx.126.1668498097213; Mon, 14 Nov 2022 23:41:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668498097; cv=pass; d=google.com; s=arc-20160816; b=M5XjSe+//AbxJnf/L9ES65AXat2dRLc2vOX5r+e0Kccqgpgs2qH9jW85MTSX/623ZV RuTgz1Gk971anOOZz3CVpEWoRdjPFrUzhPlU2mUrNKQy5idKjjOSeSyizYNlDrb4TrWZ 1lmiyJF+pFF5ZUM+zskJhCLKftXbUto9satey0bDeDPXRihtkRsGzhv8I5ju96G7pJHd Ga4UVmlS5fWtge7AJRw2Bo5sRtKbX37psWWYo/b0NSvhKoGqgfUAcXVHtZTiZm6WqDAC vdoNf0hV7ExTIDFGSjwxOwsGQvvw+Jt4kTX2y+m3SzRv5QZOxe/yy0oRZqiDBMirUPSv IkzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bKkktckgcoLhaPIuecgGEjPGNGph/Tl8jonJhS5cOP8=; b=csDyokga7HIAB7YLs0wifSlTLWaO8buyX54fFQIQr61O2pF78WdgmxzYy0Tb3VvINj dEc2yrAPmaALqKz0LUIS6n7PvuV2M1rLYGJj2Ec/oXOrfk7hjY0JQCCEECqkiJvyXpr+ O7oTAQk2oVx17Y4+6qXlqmOJtNnDX6FX5y/FdC09Az/Ah5abFJmyvX2rO8aJiHDvJZDM s97EfEuu41AyVrww+kxTXvVyLMoRI/0NoawU8r2mYEW5eYm9tnGnVB586brwAls/2RDy NPcvt4F6yQFXtC8sk+rRDqDSHgn90/yg2bKLce2eRPAYlcVeho/Aq9qD9z/Erlge8Fbi y+lg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=OWYhJuLq; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v25-20020a637a19000000b0044ed36e4c57si12041183pgc.217.2022.11.14.23.41.21; Mon, 14 Nov 2022 23:41:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=OWYhJuLq; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232622AbiKOHhx (ORCPT <rfc822;zwp10758@gmail.com> + 99 others); Tue, 15 Nov 2022 02:37:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232406AbiKOHhi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 15 Nov 2022 02:37:38 -0500 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140042.outbound.protection.outlook.com [40.107.14.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E4E6209AA; Mon, 14 Nov 2022 23:37:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qf14vd/QAF/eq4K3W5wei5FPizC3v+3YTG6HWiwjw6lS8htHJSOk1cTsVvu7Szhk9Mkvmq5fPamjc4Jhm5O9efK7ftfI8WBMjrAh7q2UeUzvaxPSUe2nhh+pl3MDP/QOyd6TN/8KltuXrZjxF+9yyECWi2oWS9xdRNfyNzx3cPAf513nuH3NpBq788KcdxlmN1J+A5xMYcicm+R59u+2nLcGGGZLVki8mxogjlk2F86plIPhVOKLJfAhhz5Aa2bXyAXc21L1UGRcaw+svcIYJax4mnKUiq2LLOHUm6zOYZNY6FtRyIOmPoLolHmAdDFj4SH5nyIaEu3Gn0Urc4BxiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bKkktckgcoLhaPIuecgGEjPGNGph/Tl8jonJhS5cOP8=; b=YzxDM3+lOgvwz8nl9uXbux31BeD1a+iIgGXbLGuiT5QJk9mgF78CdyaN4Bmz9KiIfPQCdtlCvJ3UkgVSgYgqXgOQalPkkNXUb3FIn/da7NjrnuU5MvVIa9ZL/Mu7AjBIYhOk3HU5qZ+q5Yvj6YC3QJSS2aLYV8Jr4BM5KjSZmMJywyP0nQnGwbZm7gD2HAbZ79MyrIVHUWXnZV7had3biD7I4Qpnqk7YCg9XlvDe1f9aFWSE0wUpoaVNmBv2vU4ICMXi7baWxJW910TUenBuvpjmrNAS3OlhnyAqA9baSVM5UqBRYShHMB95vWrLYNMAo2kyUOdA4UE4G6lIWlxcOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bKkktckgcoLhaPIuecgGEjPGNGph/Tl8jonJhS5cOP8=; b=OWYhJuLqkCtLrgmyy5BAnMn37leSH9Z6nqhHmSUKzCoa44MK5dk7ICqNaJBtQdDzRgi6K7tRQw9z1mx89oONJMUd4WrJ636gHUnbO7e18xakpRbG7A7Kl0xDp1IZqbHhq6idX9hEeTtI0m6D7n+XeSa3Vvy9XTeP5izVDEw5ayI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VI1PR08MB4544.eurprd08.prod.outlook.com (2603:10a6:803:100::13) by AS2PR08MB9572.eurprd08.prod.outlook.com (2603:10a6:20b:608::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.7; Tue, 15 Nov 2022 07:37:36 +0000 Received: from VI1PR08MB4544.eurprd08.prod.outlook.com ([fe80::bcc7:bc51:bf44:1454]) by VI1PR08MB4544.eurprd08.prod.outlook.com ([fe80::bcc7:bc51:bf44:1454%6]) with mapi id 15.20.5834.006; Tue, 15 Nov 2022 07:37:36 +0000 From: Gerald Loacker <gerald.loacker@wolfvision.net> To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Cameron <jic23@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Nikita Yushchenko <nikita.yoush@cogentembedded.com>, Jakob Hauser <jahau@rocketmail.com>, Michael Riesch <michael.riesch@wolfvision.net>, Gerald Loacker <gerald.loacker@wolfvision.net> Subject: [PATCH 1/2] dt-bindings: iio: magnetometer: add ti tmag5273 documentation file Date: Tue, 15 Nov 2022 08:37:17 +0100 Message-Id: <20221115073718.2377311-2-gerald.loacker@wolfvision.net> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221115073718.2377311-1-gerald.loacker@wolfvision.net> References: <20221115073718.2377311-1-gerald.loacker@wolfvision.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: VE1PR08CA0017.eurprd08.prod.outlook.com (2603:10a6:803:104::30) To VI1PR08MB4544.eurprd08.prod.outlook.com (2603:10a6:803:100::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR08MB4544:EE_|AS2PR08MB9572:EE_ X-MS-Office365-Filtering-Correlation-Id: c3af0130-8ea1-4106-8205-08dac6dc43fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: csp/AlVOXbsny1iREfL4sQikfzqsdwegwy8ePmCuUn3QHkr5l0ZlI3YD3YTCpQn71jRffOoVgtB/tEwznHKJy3tHAtEJ/Y9x4rUVkhhr5snHZsmHeE4TJaHP6YNrC0e05Lb0GBH6L5zr2LSsP+wKL9eRC2Ta2HMdDBpqan17fOSSAaYBmk5hwApA/28jPb3V0X924ht10/po2AzOU2BhfVjLN4FtRTBhvU7pVgSgWnvMI7dvVwcYLxHrYBzjijc6D1mPn3Q/Q63SsY2kLQ+ZJsBjxE8M8/1Z6hB14VTMxmvlMkmrs8uhC3h2Z3LAUlEm0e40eadFDTOj0l1z0LXs0OurI5nEpXByUPlVm/m0TBUei2hF7yFc3IjS9rWyYIfAyc4HoMvsG0D/VrOmUGrGp1TqyZVFXcD7YRk/hoXNQPClCI74pW6gRsJOeykODD96nDuJsUJ+fxiad5mEei+lXokS4m1ealy8GBW4pevmGP661GA3l5gRrgPiKUXSudVgNf7HSOyUoksILEbblFprTyUbqSaXi1S2JhH/IurHrJKg1ojTwgy88QMC1q9JfAaXIoZUai7TCHzhKctnAQzxJsqNlEwCEP0pdryBdvKG9ngd4hx/w+eP/610cy+mj0Sh6Ud4JagJo4SH1p65j0RMLoPAbppDn6MrOqwmz+mwsjg/vuqNWY9DllxC1mHTBWxtWaaOiD5uk425/Gp+GCmvZ7qYoPav5G7ZaADxlee/MYDVrE+ty5xy9FBSZhjXdcdE10fBgwwddFoeQridthWoPyquu7XS3sIXrLLHTahT2CVTPecTLapfDBXrH7c1BCY3sYO2bYqQhyBjaKauqKD/PA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB4544.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(366004)(136003)(346002)(39850400004)(376002)(451199015)(186003)(107886003)(86362001)(41300700001)(2616005)(26005)(6512007)(6666004)(6506007)(38100700002)(4326008)(8676002)(1076003)(54906003)(38350700002)(66556008)(66476007)(2906002)(5660300002)(36756003)(66946007)(966005)(6486002)(7416002)(316002)(8936002)(52116002)(478600001)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xY27eR9+JYTnI9Bi10cZbbzGPLBQ?= =?utf-8?q?sBnQVE37jNkvVGrjz3JqCmguGjRsG3YS442tj2bs7wKWWmx9PillelSIkeuyKZbJ8?= =?utf-8?q?ZhwVgxiUFInoA2kDOHAgG6RCbhTGue3ncgh14sAvdGxp3ZM1J0bc2qdf1tklvaZ+d?= =?utf-8?q?M2O8KvTmvjhdWU4YxXtThMrFisSyk1YIY0IkCKOUvUKFdGBn5ptHJYL9pWPOxxYQs?= =?utf-8?q?kCTJA8vNT0jyubgaHuZdHCXDMIgJR5ro3ZYy9OlNdyI4SApLVzULdBSo/X8jsJdlI?= =?utf-8?q?1cslHyOBc4oOFifeYUUsStpBXQAsPng0dCO3zrwIvEl2s969kuY7jxlx0xV92R+YD?= =?utf-8?q?fEPtO80PHObgtXG2Hh7GMVNZTECEYbt8lL6qHXt258DQ8OOthwBNDFBEOSRIKEEJH?= =?utf-8?q?uMmFPsuvn/0RkI/lSdXZ7hxsJhQUwSPp3yYhkaA1LpqPcMOSPx2yjy5iI/jm1rrc1?= =?utf-8?q?E8Uq3WmZL6t230KCz8+xIws+TrydPnlKc+b1/0t3sv5KoFyFuw3d2DiB+/n4/akfR?= =?utf-8?q?BI6j0PKdkJzr5aIOJtAWcDf9PYIr/FgdVdvWpyr+SdjD82KE1mTXzaG7elAqPZVce?= =?utf-8?q?XSzYFTJ/tDZk6l+LZ/rgHQ0jS8b5Q95KPNOtwHV9y3HQiav3YFg7kPUvwn+uN+0Ur?= =?utf-8?q?A0BhgG7wNMYLiJO8tjSYCnazNVqK19QOGeWFfYraw0UugE/t8hEUtkeCu9i+lrcam?= =?utf-8?q?49JCXR1BLdYmgtYuQVt/kE38aP4Tzcn0i+dPyxYIwqGXNg9PIt7sRbIp49ytZxwxh?= =?utf-8?q?o2xtn8NAcHPeEJM4y08TbAe9hbEQyo7VWzDjtTVQibHk/eCnxolvyXnXfWh1IxlbT?= =?utf-8?q?P3my45HQy7Z+h8bvIIuU73RDcwTkOhPOis8YCfcirACJrswJy0PyxcVLrEAnIe99R?= =?utf-8?q?rOEtwvpGLuP3UPGTMvelfF/xq4rmKe18OyR9ZZvgfHK2DwaeM4J+p2ybqAEATPM0k?= =?utf-8?q?gjRM4g5oDKPxtYYoToVX+QDibqofLLM7pHF5vnvITYm0G+G7EDjI68cCagK4uMXHQ?= =?utf-8?q?8lF8VyCJHyeCAdTjEVhLXua7S/WFi7JixsRy0p4+cZbKAlDyef/a6L7qvPcUlqV+T?= =?utf-8?q?s/RlI7hJFya3OaxLI73qLPpBS6CqVxbbwCx9A1D+sW9sHL5H0due00ZeBsh4GyI24?= =?utf-8?q?TwoHDpDqKb3o25eV7X7/AeOo8h7S7NxseWi8w1nCrCdEDKgZH0R5eSMvz1FbdyLaN?= =?utf-8?q?4ckdv6F9qULgJIL+rUCm1IlqRX2+MUq8hbthx8UvNkQwnmy3xahTWuAhsl1K+3SvU?= =?utf-8?q?TeOCZID0bCqUMVdypBSKZjhNMONaEGTs2GyKCQB5STzZ9QuX6zXdb+50zlLkNw4we?= =?utf-8?q?R6YHfw0+pjemTAMoPW/sN4HG3+LAE2ZEffyvTBTdhQpU/FQBlTR2GYL6nmT2z1zLd?= =?utf-8?q?YoNdr96ma33gv7nKvbiJYb5aXYLswb/IgOdJfxq1m+kTBzIq1PR5v23kC6DZexODW?= =?utf-8?q?yyCvAokQYr7F79yUDft0qz78K64d+Ch2Mvs3YbqAhbtGtA9OoBzPNgm8b1SmMwkr/?= =?utf-8?q?lKR/ww8Z7KP0Vbi4tgJVKK47JIuhcN1HLA=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: c3af0130-8ea1-4106-8205-08dac6dc43fc X-MS-Exchange-CrossTenant-AuthSource: VI1PR08MB4544.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2022 07:37:36.3323 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5tR4d29R+w+HOSID9VpahhKL4H1Uheb/PGcrZJmBC12D7lIUD3n1GyWE14VSgdZAE3NcrFwWXSTQ63r6O9bKoGAsikxGfxEIgjxzAaIjm5w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9572 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749547060975724602?= X-GMAIL-MSGID: =?utf-8?q?1749547060975724602?= |
Series |
add ti tmag5273 driver
|
|
Commit Message
Gerald Loacker
Nov. 15, 2022, 7:37 a.m. UTC
Add bindings documentation file for TI TMAG5273.
Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net>
---
.../iio/magnetometer/ti,tmag5273.yaml | 72 +++++++++++++++++++
MAINTAINERS | 6 ++
2 files changed, 78 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml
Comments
On 15/11/2022 08:37, Gerald Loacker wrote: > Add bindings documentation file for TI TMAG5273. Subject - drop "documentation file". > > Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net> > --- > .../iio/magnetometer/ti,tmag5273.yaml | 72 +++++++++++++++++++ > MAINTAINERS | 6 ++ > 2 files changed, 78 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml > > diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml b/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml > new file mode 100644 > index 000000000000..2f5b0a4d2f40 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml > @@ -0,0 +1,72 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/magnetometer/ti,tmag5273.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: TI TMAG5273 Low-Power Linear 3D Hall-Effect Sensor > + > +maintainers: > + - Gerald Loacker <gerald.loacker@wolfvision.net> > + > +description: > + The TI TMAG5273 is a low-power linear 3D Hall-effect sensor. This device > + integrates three independent Hall-effect sensors in the X, Y, and Z axes. > + The device has an integrated temperature sensor available. The TMAG5273 > + can be configured through the I2C interface to enable any combination of > + magnetic axes and temperature measurements. An integrated angle calculation > + engine (CORDIC) provides full 360° angular position information for both > + on-axis and off-axis angle measurement topologies. The angle calculation is > + performed using two user-selected magnetic axes. > + > +properties: > + $nodename: > + pattern: '^magnetometer@[0-9a-f]+$' Device schemas do not need to enforce the names. > + > + compatible: > + const: ti,tmag5273 > + > + reg: > + maxItems: 1 > + > + "#io-channel-cells": > + const: 1 > + > + ti,angle-enable: ti,angle-measurement > + description: > + Enables angle measurement in the selected plane. > + 0 = OFF > + 1 = X-Y (default) > + 2 = Y-Z > + 3 = X-Z Why not strings which are easier for humans? off/x-y/y-z/x-z? How anyone reading DTS can remember what is "3" in this and in thousands of other devices? > + $ref: /schemas/types.yaml#/definitions/uint32 > + minimum: 0 > + maximum: 3 default: 1 > + > + vcc-supply: > + description: > + A regulator providing 1.7 V to 3.6 V supply voltage on the VCC pin, > + typically 3.3 V. > + > +required: > + - compatible > + - reg > + - vcc-supply > + > +additionalProperties: false > + > +examples: > + - | > + i2c-0 { Just: i2c Best regards, Krzysztof
On Tue, 15 Nov 2022 08:37:17 +0100 Gerald Loacker <gerald.loacker@wolfvision.net> wrote: > Add bindings documentation file for TI TMAG5273. > > Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net> > --- > .../iio/magnetometer/ti,tmag5273.yaml | 72 +++++++++++++++++++ > MAINTAINERS | 6 ++ > 2 files changed, 78 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml > > diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml b/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml > new file mode 100644 > index 000000000000..2f5b0a4d2f40 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml > @@ -0,0 +1,72 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/magnetometer/ti,tmag5273.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: TI TMAG5273 Low-Power Linear 3D Hall-Effect Sensor > + > +maintainers: > + - Gerald Loacker <gerald.loacker@wolfvision.net> > + > +description: > + The TI TMAG5273 is a low-power linear 3D Hall-effect sensor. This device > + integrates three independent Hall-effect sensors in the X, Y, and Z axes. > + The device has an integrated temperature sensor available. The TMAG5273 > + can be configured through the I2C interface to enable any combination of > + magnetic axes and temperature measurements. An integrated angle calculation > + engine (CORDIC) provides full 360° angular position information for both > + on-axis and off-axis angle measurement topologies. The angle calculation is > + performed using two user-selected magnetic axes. > + > +properties: > + $nodename: > + pattern: '^magnetometer@[0-9a-f]+$' What Krzysztof said on this ;) > + > + compatible: > + const: ti,tmag5273 > + > + reg: > + maxItems: 1 > + > + "#io-channel-cells": > + const: 1 > + > + ti,angle-enable: > + description: > + Enables angle measurement in the selected plane. > + 0 = OFF > + 1 = X-Y (default) > + 2 = Y-Z > + 3 = X-Z This feels like something we should be configuring at runtime rather that DT, or is it driven by board design or similar? > + $ref: /schemas/types.yaml#/definitions/uint32 > + minimum: 0 > + maximum: 3 > + > + vcc-supply: > + description: > + A regulator providing 1.7 V to 3.6 V supply voltage on the VCC pin, > + typically 3.3 V. > + The dt binding should attempt to describe the hardware, not what we happen to support in the driver so far. So I'd expect to also see an interrupt. That way if someone ships a dts file today, and we enable it sometime in the future they will be ready for it. > +required: > + - compatible > + - reg > + - vcc-supply Ah. This is presumably as side effect of having the driver set the voltage. Normally we only need to 'require' a supply if we need to read it's voltage (for scaling on ADCs and similar). That's not the case here so I wouldn't expect to see it. > + > +additionalProperties: false > + > +examples: > + - | > + i2c-0 { > + #address-cells = <1>; > + #size-cells = <0>; > + > + magnetometer@35 { > + compatible = "ti,tmag5273"; > + reg = <0x35>; > + #io-channel-cells = <1>; > + ti,angle-enable = <3>; > + vcc-supply = <&vcc3v3>; > + }; > + }; > +...
Am 15.11.2022 um 18:43 schrieb Jonathan Cameron: > On Tue, 15 Nov 2022 08:37:17 +0100 > Gerald Loacker <gerald.loacker@wolfvision.net> wrote: > >> Add bindings documentation file for TI TMAG5273. >> >> Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net> >> --- >> .../iio/magnetometer/ti,tmag5273.yaml | 72 +++++++++++++++++++ >> MAINTAINERS | 6 ++ >> 2 files changed, 78 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml >> >> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml b/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml >> new file mode 100644 >> index 000000000000..2f5b0a4d2f40 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml >> @@ -0,0 +1,72 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fiio%2Fmagnetometer%2Fti%2Ctmag5273.yaml%23&data=05%7C01%7Cgerald.loacker%40wolfvision.net%7C9788e9788f344fcff9b808dac730f926%7Ce94ec9da9183471e83b351baa8eb804f%7C1%7C0%7C638041310400330990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nczO1QC74gD6eGXAkm%2B6LRrc7fyEsr62r%2B3aoW%2Bcfu4%3D&reserved=0 >> +$schema: https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23&data=05%7C01%7Cgerald.loacker%40wolfvision.net%7C9788e9788f344fcff9b808dac730f926%7Ce94ec9da9183471e83b351baa8eb804f%7C1%7C0%7C638041310400330990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=raKUiSntfhvdSSnqiR1Wm%2Fqr9cI3XEu5HCprqvISlLE%3D&reserved=0 >> + >> +title: TI TMAG5273 Low-Power Linear 3D Hall-Effect Sensor >> + >> +maintainers: >> + - Gerald Loacker <gerald.loacker@wolfvision.net> >> + >> +description: >> + The TI TMAG5273 is a low-power linear 3D Hall-effect sensor. This device >> + integrates three independent Hall-effect sensors in the X, Y, and Z axes. >> + The device has an integrated temperature sensor available. The TMAG5273 >> + can be configured through the I2C interface to enable any combination of >> + magnetic axes and temperature measurements. An integrated angle calculation >> + engine (CORDIC) provides full 360° angular position information for both >> + on-axis and off-axis angle measurement topologies. The angle calculation is >> + performed using two user-selected magnetic axes. >> + >> +properties: >> + $nodename: >> + pattern: '^magnetometer@[0-9a-f]+$' > > What Krzysztof said on this ;) > >> + >> + compatible: >> + const: ti,tmag5273 >> + >> + reg: >> + maxItems: 1 >> + >> + "#io-channel-cells": >> + const: 1 >> + >> + ti,angle-enable: >> + description: >> + Enables angle measurement in the selected plane. >> + 0 = OFF >> + 1 = X-Y (default) >> + 2 = Y-Z >> + 3 = X-Z > > This feels like something we should be configuring at runtime rather that > DT, or is it driven by board design or similar? > We use this sensor for a zoom wheel application, there is an EVM from TI for this as well. So this is for setting the mounting position of the wheel. >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + minimum: 0 >> + maximum: 3 >> + >> + vcc-supply: >> + description: >> + A regulator providing 1.7 V to 3.6 V supply voltage on the VCC pin, >> + typically 3.3 V. >> + > > The dt binding should attempt to describe the hardware, not what we happen > to support in the driver so far. So I'd expect to also see an interrupt. > That way if someone ships a dts file today, and we enable it sometime in the > future they will be ready for it. > Is it fine to add just the description without example then? The interrupt has many options such as low active or low pulse. >> +required: >> + - compatible >> + - reg >> + - vcc-supply > > Ah. This is presumably as side effect of having the driver set the voltage. > Normally we only need to 'require' a supply if we need to read it's voltage > (for scaling on ADCs and similar). That's not the case here so I wouldn't > expect to see it. > >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + i2c-0 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + magnetometer@35 { >> + compatible = "ti,tmag5273"; >> + reg = <0x35>; >> + #io-channel-cells = <1>; >> + ti,angle-enable = <3>; >> + vcc-supply = <&vcc3v3>; >> + }; >> + }; >> +... > > Thanks for the review, Gerald
On 17/11/2022 17:12, Gerald Loacker wrote: >> >>> + >>> + compatible: >>> + const: ti,tmag5273 >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + "#io-channel-cells": >>> + const: 1 >>> + >>> + ti,angle-enable: >>> + description: >>> + Enables angle measurement in the selected plane. >>> + 0 = OFF >>> + 1 = X-Y (default) >>> + 2 = Y-Z >>> + 3 = X-Z >> >> This feels like something we should be configuring at runtime rather that >> DT, or is it driven by board design or similar? >> > > We use this sensor for a zoom wheel application, there is an EVM from TI > for this as well. So this is for setting the mounting position of the wheel. That's ok, but does not explain why choice of angle measurement should be a property of the hardware. I could imagine configuring device to measure sometimes X-Y and sometimes X-Z, depending on the use case. Use case can change runtime. Best regards, Krzysztof
On Thu, 17 Nov 2022 17:12:33 +0100 Gerald Loacker <gerald.loacker@wolfvision.net> wrote: > Am 15.11.2022 um 18:43 schrieb Jonathan Cameron: > > On Tue, 15 Nov 2022 08:37:17 +0100 > > Gerald Loacker <gerald.loacker@wolfvision.net> wrote: > > > >> Add bindings documentation file for TI TMAG5273. > >> > >> Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net> > >> --- > >> .../iio/magnetometer/ti,tmag5273.yaml | 72 +++++++++++++++++++ > >> MAINTAINERS | 6 ++ > >> 2 files changed, 78 insertions(+) > >> create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml > >> > >> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml b/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml > >> new file mode 100644 > >> index 000000000000..2f5b0a4d2f40 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml > >> @@ -0,0 +1,72 @@ > >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > >> +%YAML 1.2 > >> +--- > >> +$id: https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fiio%2Fmagnetometer%2Fti%2Ctmag5273.yaml%23&data=05%7C01%7Cgerald.loacker%40wolfvision.net%7C9788e9788f344fcff9b808dac730f926%7Ce94ec9da9183471e83b351baa8eb804f%7C1%7C0%7C638041310400330990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nczO1QC74gD6eGXAkm%2B6LRrc7fyEsr62r%2B3aoW%2Bcfu4%3D&reserved=0 > >> +$schema: https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23&data=05%7C01%7Cgerald.loacker%40wolfvision.net%7C9788e9788f344fcff9b808dac730f926%7Ce94ec9da9183471e83b351baa8eb804f%7C1%7C0%7C638041310400330990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=raKUiSntfhvdSSnqiR1Wm%2Fqr9cI3XEu5HCprqvISlLE%3D&reserved=0 > >> + > >> +title: TI TMAG5273 Low-Power Linear 3D Hall-Effect Sensor > >> + > >> +maintainers: > >> + - Gerald Loacker <gerald.loacker@wolfvision.net> > >> + > >> +description: > >> + The TI TMAG5273 is a low-power linear 3D Hall-effect sensor. This device > >> + integrates three independent Hall-effect sensors in the X, Y, and Z axes. > >> + The device has an integrated temperature sensor available. The TMAG5273 > >> + can be configured through the I2C interface to enable any combination of > >> + magnetic axes and temperature measurements. An integrated angle calculation > >> + engine (CORDIC) provides full 360° angular position information for both > >> + on-axis and off-axis angle measurement topologies. The angle calculation is > >> + performed using two user-selected magnetic axes. > >> + > >> +properties: > >> + $nodename: > >> + pattern: '^magnetometer@[0-9a-f]+$' > > > > What Krzysztof said on this ;) > > > >> + > >> + compatible: > >> + const: ti,tmag5273 > >> + > >> + reg: > >> + maxItems: 1 > >> + > >> + "#io-channel-cells": > >> + const: 1 > >> + > >> + ti,angle-enable: > >> + description: > >> + Enables angle measurement in the selected plane. > >> + 0 = OFF > >> + 1 = X-Y (default) > >> + 2 = Y-Z > >> + 3 = X-Z > > > > This feels like something we should be configuring at runtime rather that > > DT, or is it driven by board design or similar? > > > > We use this sensor for a zoom wheel application, there is an EVM from TI > for this as well. So this is for setting the mounting position of the wheel. Ok. Thanks for explanation. Makes sense. > > >> + $ref: /schemas/types.yaml#/definitions/uint32 > >> + minimum: 0 > >> + maximum: 3 > >> + > >> + vcc-supply: > >> + description: > >> + A regulator providing 1.7 V to 3.6 V supply voltage on the VCC pin, > >> + typically 3.3 V. > >> + > > > > The dt binding should attempt to describe the hardware, not what we happen > > to support in the driver so far. So I'd expect to also see an interrupt. > > That way if someone ships a dts file today, and we enable it sometime in the > > future they will be ready for it. > > > > Is it fine to add just the description without example then? The > interrupt has many options such as low active or low pulse. Yes. Just add description. The details of type etc depend on wiring to some degree (inverters in the path etc). Nice to add an example later but for now we can assume anyone who is providing the interrupt set it up correctly. Jonathan
On Thu, 17 Nov 2022 17:17:24 +0100 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > On 17/11/2022 17:12, Gerald Loacker wrote: > >> > >>> + > >>> + compatible: > >>> + const: ti,tmag5273 > >>> + > >>> + reg: > >>> + maxItems: 1 > >>> + > >>> + "#io-channel-cells": > >>> + const: 1 > >>> + > >>> + ti,angle-enable: > >>> + description: > >>> + Enables angle measurement in the selected plane. > >>> + 0 = OFF > >>> + 1 = X-Y (default) > >>> + 2 = Y-Z > >>> + 3 = X-Z > >> > >> This feels like something we should be configuring at runtime rather that > >> DT, or is it driven by board design or similar? > >> > > > > We use this sensor for a zoom wheel application, there is an EVM from TI > > for this as well. So this is for setting the mounting position of the wheel. > > That's ok, but does not explain why choice of angle measurement should > be a property of the hardware. I could imagine configuring device to > measure sometimes X-Y and sometimes X-Z, depending on the use case. Use > case can change runtime. If it's part of a physical device mounting, may well not be changeable at runtime (at least not with out a screw driver / hacksaw etc. Not really different form arguing someone might rewire a sensor at runtime. In theory possible but if they do they are on their own - mostly we don't bother supporting them doing that. So I think this is probably valid as a DT property. > > > Best regards, > Krzysztof >
Hi Krzysztof, On 11/17/22 17:17, Krzysztof Kozlowski wrote: > On 17/11/2022 17:12, Gerald Loacker wrote: >>> >>>> + >>>> + compatible: >>>> + const: ti,tmag5273 >>>> + >>>> + reg: >>>> + maxItems: 1 >>>> + >>>> + "#io-channel-cells": >>>> + const: 1 >>>> + >>>> + ti,angle-enable: >>>> + description: >>>> + Enables angle measurement in the selected plane. >>>> + 0 = OFF >>>> + 1 = X-Y (default) >>>> + 2 = Y-Z >>>> + 3 = X-Z >>> >>> This feels like something we should be configuring at runtime rather that >>> DT, or is it driven by board design or similar? >>> >> >> We use this sensor for a zoom wheel application, there is an EVM from TI >> for this as well. So this is for setting the mounting position of the wheel. > > That's ok, but does not explain why choice of angle measurement should > be a property of the hardware. I could imagine configuring device to > measure sometimes X-Y and sometimes X-Z, depending on the use case. Use > case can change runtime. If I may chime in here: in our use case the angle channel is used directly as an input to adc-joystick, so that the combination of the two is an input device. We feel that in this scenario this angle measurement setting *has* to be a hardware property because the correct function of the input device depends on the correct choice of the angle property (which does not change during runtime, of course). If we were to create a different input device in which the magnetometer was tilted by 90° (for example), then the angle property could be easily changed in the device tree. The user space, on the other hand, couldn't possibly know the correct angle property. That said, I agree that there may be use cases in which the angle property should be changed during runtime. Would it be acceptable to create an IIO property that is initialized by the device tree property? (Please note that the implementation of the IIO property may not be in our scope, though) Best regards, Michael
On 17/11/2022 18:01, Michael Riesch wrote: > Hi Krzysztof, > > On 11/17/22 17:17, Krzysztof Kozlowski wrote: >> On 17/11/2022 17:12, Gerald Loacker wrote: >>>> >>>>> + >>>>> + compatible: >>>>> + const: ti,tmag5273 >>>>> + >>>>> + reg: >>>>> + maxItems: 1 >>>>> + >>>>> + "#io-channel-cells": >>>>> + const: 1 >>>>> + >>>>> + ti,angle-enable: >>>>> + description: >>>>> + Enables angle measurement in the selected plane. >>>>> + 0 = OFF >>>>> + 1 = X-Y (default) >>>>> + 2 = Y-Z >>>>> + 3 = X-Z >>>> >>>> This feels like something we should be configuring at runtime rather that >>>> DT, or is it driven by board design or similar? >>>> >>> >>> We use this sensor for a zoom wheel application, there is an EVM from TI >>> for this as well. So this is for setting the mounting position of the wheel. >> >> That's ok, but does not explain why choice of angle measurement should >> be a property of the hardware. I could imagine configuring device to >> measure sometimes X-Y and sometimes X-Z, depending on the use case. Use >> case can change runtime. > > If I may chime in here: in our use case the angle channel is used > directly as an input to adc-joystick, so that the combination of the two > is an input device. We feel that in this scenario this angle measurement > setting *has* to be a hardware property because the correct function of > the input device depends on the correct choice of the angle property > (which does not change during runtime, of course). > > If we were to create a different input device in which the magnetometer > was tilted by 90° (for example), then the angle property could be easily > changed in the device tree. The user space, on the other hand, couldn't > possibly know the correct angle property. > > That said, I agree that there may be use cases in which the angle > property should be changed during runtime. Would it be acceptable to > create an IIO property that is initialized by the device tree property? > (Please note that the implementation of the IIO property may not be in > our scope, though) It's fine. Thanks for the explanations. For runtime-configurable setups this still can be changed via some other interface. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml b/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml new file mode 100644 index 000000000000..2f5b0a4d2f40 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/magnetometer/ti,tmag5273.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI TMAG5273 Low-Power Linear 3D Hall-Effect Sensor + +maintainers: + - Gerald Loacker <gerald.loacker@wolfvision.net> + +description: + The TI TMAG5273 is a low-power linear 3D Hall-effect sensor. This device + integrates three independent Hall-effect sensors in the X, Y, and Z axes. + The device has an integrated temperature sensor available. The TMAG5273 + can be configured through the I2C interface to enable any combination of + magnetic axes and temperature measurements. An integrated angle calculation + engine (CORDIC) provides full 360° angular position information for both + on-axis and off-axis angle measurement topologies. The angle calculation is + performed using two user-selected magnetic axes. + +properties: + $nodename: + pattern: '^magnetometer@[0-9a-f]+$' + + compatible: + const: ti,tmag5273 + + reg: + maxItems: 1 + + "#io-channel-cells": + const: 1 + + ti,angle-enable: + description: + Enables angle measurement in the selected plane. + 0 = OFF + 1 = X-Y (default) + 2 = Y-Z + 3 = X-Z + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 3 + + vcc-supply: + description: + A regulator providing 1.7 V to 3.6 V supply voltage on the VCC pin, + typically 3.3 V. + +required: + - compatible + - reg + - vcc-supply + +additionalProperties: false + +examples: + - | + i2c-0 { + #address-cells = <1>; + #size-cells = <0>; + + magnetometer@35 { + compatible = "ti,tmag5273"; + reg = <0x35>; + #io-channel-cells = <1>; + ti,angle-enable = <3>; + vcc-supply = <&vcc3v3>; + }; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index cf0f18502372..ea7acec52f8b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20613,6 +20613,12 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers) S: Odd Fixes F: sound/soc/codecs/tas571x* +TI TMAG5273 MAGNETOMETER DRIVER +M: Gerald Loacker <gerald.loacker@wolfvision.net> +L: linux-iio@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/iio/magnetometer/ti,tmag5273.yaml + TI TRF7970A NFC DRIVER M: Mark Greer <mgreer@animalcreek.com> L: linux-wireless@vger.kernel.org