Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2354511rwb; Thu, 17 Nov 2022 09:38:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf4QdAaP2uIU3rj3Dl7MoXloGzWghfMbN7mI0YOtwnrARz587nvUsP4opyRRXlqKxskns02D X-Received: by 2002:a17:902:eb88:b0:186:c56d:4950 with SMTP id q8-20020a170902eb8800b00186c56d4950mr3804739plg.69.1668706720898; Thu, 17 Nov 2022 09:38:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668706720; cv=none; d=google.com; s=arc-20160816; b=OEMtc4SPxXKOca6LdJDO/7kfDzLOan+NUOZmshfFPY/4QezSpjClDr/VNRdEzji72f Zj+0Ju0DQlSwIOiwA8ing41wRzUSN66AVJZuwXXuSuHK5Wu0HVP05BuGah8EL7AxhjXs ZSCSXCP5RCPTGQmNQGey8o+WdhZBqSYQcnOSemwUIdtt5hKiJC+DwtwQkVyakrPWQvPK zpQtA4MRNKBhGmw1UGYRrJMXSUWuiR94+UzpnxcPGPWEUd5dJvMRXa9yeAnd5GEOW+c0 LTrO3fW8w8jYhPhhi3yGGay/gaQhzVc0VlXJtSfLcZbLbdzADjP4FV0O3vKe82+msf0g +Vwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/rcfJXOF5ifBFUjd2geW98xewo/95sxmBMcJPBTeN2Y=; b=IklhcJ6AUxpKiTe22ZJXoGE0Q1OnEP4Q2/QgE8VzUFIn9Ftv1r4FrYO4A7kMPIDo2H 5WAC/9ZMAN+3lZZAtSsZu3IprP1XPJAyp1MGMo4SHjAB3ci0nTqp9YeG6ddoz7N+FP5R t9khKXqGeRDGGyD7u+jjNmhKvDtq5Cm+udVnUQpZVL0BP7/d8ISQmYK7gB/36nSduii3 HzZCgExJVz77sEnIz/rr9FZQk04/iRI3aVvm+EXTK8oA8k0L8RHaXAFPXKK06x+rdo3W pExLm8uljIa/7Cbs9h5jYr1d6Bn0MgE5+7jO/2QrhgOxaChu33jbyM7P1LUUdhMRlPxF Lvyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VHbJini2; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y193-20020a638aca000000b0046b043d221csi1566969pgd.55.2022.11.17.09.38.28; Thu, 17 Nov 2022 09:38:40 -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=@linaro.org header.s=google header.b=VHbJini2; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240140AbiKQREI (ORCPT + 92 others); Thu, 17 Nov 2022 12:04:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239414AbiKQREG (ORCPT ); Thu, 17 Nov 2022 12:04:06 -0500 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06D7273407 for ; Thu, 17 Nov 2022 09:04:05 -0800 (PST) Received: by mail-lj1-x230.google.com with SMTP id k19so3539982lji.2 for ; Thu, 17 Nov 2022 09:04:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=/rcfJXOF5ifBFUjd2geW98xewo/95sxmBMcJPBTeN2Y=; b=VHbJini2+mabpf93vJs6ceDoWQ9oZdhQzuBKllPncG0HrweB0yXX/Q0i7Mth7o6rg1 /7FYjIThxy5+ww57eEbDdaZYMxz8839DIkd5x1uOL9W93OJk3dh7WYikICXO3ATkggif gFCZmVzy9UT3RtgaEYxqnzdkWKpzhvALkafGb6V2TkxI6HbnpUjYqPfDStPvczGj6Y07 lIcf/6OD/9MKe8wzSVwjJ6lkaGCCD4YCZ7w26HUO0CGJH8YjUZ2iWZqRg1FUQRV5b+B6 /RmjoIDgbo4095B/xd3ZWMLV4yyEi49wgwGnnhFD0jkvSdZNI+izUCfIcZhDICGPy536 BrkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/rcfJXOF5ifBFUjd2geW98xewo/95sxmBMcJPBTeN2Y=; b=w6DlAZ/p0D2eHctmn/0Uz3dhRvRIKdKfzruTW33WXhMh3W+dKoKnVgA0i9sMTyNZ8s EjX2bSeaPBi8WHM4GLl9GB7577jJcPCxnKZ/Ka3FA5aEGABwVfAQOM9Ye6Yn4XXG7LtM keDfrvv/qpJE0qHSjeBL3Pa+8lwWhFFy4z8SBZBCAKQyu1bW5u9c2bt5yQz6DehR+3MZ 4wkZwDxypeImTD4AOHBgr/KU3YhTbXO+orZRN9weS0XIvvkRVJCTh2u5FWQBNLUVYEpn +Xyl+FsVn5eScWsS1s0s37Si5o7zvRsNL8w4BB84udupUfXWLohjwXO3WGhXiPBRtDkN 1Q7g== X-Gm-Message-State: ANoB5pmbSgzPD5xnP6bclfgu6wiysxPj2/U5MO9kTM7J6Q3QQvwTQFCE A1ytduxoYeFrkM+mRUxjfeKG8w== X-Received: by 2002:a2e:a911:0:b0:277:44b2:6b9c with SMTP id j17-20020a2ea911000000b0027744b26b9cmr1291565ljq.26.1668704643204; Thu, 17 Nov 2022 09:04:03 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id b17-20020a2ebc11000000b002775d0ae776sm292258ljf.14.2022.11.17.09.04.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Nov 2022 09:04:02 -0800 (PST) Message-ID: Date: Thu, 17 Nov 2022 18:04:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 1/2] dt-bindings: iio: magnetometer: add ti tmag5273 documentation file Content-Language: en-US To: Michael Riesch , Gerald Loacker , Jonathan Cameron Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Andy Shevchenko , Nikita Yushchenko , Jakob Hauser References: <20221115073718.2377311-1-gerald.loacker@wolfvision.net> <20221115073718.2377311-2-gerald.loacker@wolfvision.net> <20221115174355.00004a01@Huawei.com> <8c2da24c-ae10-40c9-bb3e-b300975a86d7@linaro.org> <467929c1-b405-507b-033d-bdc7abce703f@wolfvision.net> From: Krzysztof Kozlowski In-Reply-To: <467929c1-b405-507b-033d-bdc7abce703f@wolfvision.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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