Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2698127rdb; Fri, 22 Sep 2023 06:15:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrvwSirTYoUSJrdxDAoZx/1Tmln6OlZ5UYEK7G4/SUh2M+AImXh+NI4MHlsB8IHu9A//qb X-Received: by 2002:a05:6358:79f:b0:143:6813:bffa with SMTP id n31-20020a056358079f00b001436813bffamr8423527rwj.0.1695388541314; Fri, 22 Sep 2023 06:15:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695388541; cv=none; d=google.com; s=arc-20160816; b=J8EOq4j3aSPfn1HxGbAjpl+n5bEhr6FxHwvbgJVJppY5hLu1jt9VWNQQs4XNuMipLf uV8TdnkyRkz8RMk+iDQ45BrTiS+CfI2UblAk1xNRThH6SgPHkgskaoU6WRmn5w1ZydH0 dTmZvSUhBlluhtbl2jMmgwwuqk7NiyC7aZYs0uaT4Rt9heQ78rc3Gq1E69U1EpTqwruX TTi6RWxh+Qr6ydB0xa6fF33+9uIUtVhikrq+zkqNP3+qV61mUFJlpNTLNATS9KGzhft8 gwOM0Y3O7vOnj5TjxEJX5CeAGxac/l3HGOzoTGMJN3gQqB/sKbKo/zn3R0KOw2rD/q6x iqEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xo0lap6Lgs4aUClULX8HNoJkpzCnX/7Jsbfgdxnl/pY=; fh=as3tJPEBe5rg+FetMBPKejIs9Ulc7uhJN7f0XS9SjcM=; b=Oi+p8BLss+6t/8EotA/ZxNlgVQ4xBVjoUFca7LKJ+skPiFToFWaEPKOCggj0QJ41ik Wzpp+KYwYs2b455+RPtuRZaQIdmOIRRUnhQkfH+vD2+x68OjrPEQ0Dai4Z6dLx9AQ6UD 26F0VrQn3aPO0zS/nLNdgNUIhk2LezGm855lZAYwAFv+cj/4A5Ju4pZPoAzsLYmyFY2v KlvqTibsR403+4VwwMUaKyBknK8ZaE3k9ZWs0Y7jq5uNnI3Ry5G3BwmMoOxqvt/DYE2z gRT3J1aedSB5E2UpGurnado8Rbs66fh+wx+4pj/CYvMpf3W3Us9XoCVhuaB/XVBIR42F iBGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=U40KPtjD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z19-20020a63e113000000b0057cbd803b30si1546228pgh.654.2023.09.22.06.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 06:15:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=U40KPtjD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 34C58838B3D5; Fri, 22 Sep 2023 00:55:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231937AbjIVHzZ (ORCPT + 99 others); Fri, 22 Sep 2023 03:55:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231880AbjIVHzR (ORCPT ); Fri, 22 Sep 2023 03:55:17 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23FEACC2 for ; Fri, 22 Sep 2023 00:55:10 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9ae75ece209so41485966b.3 for ; Fri, 22 Sep 2023 00:55:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1695369308; x=1695974108; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xo0lap6Lgs4aUClULX8HNoJkpzCnX/7Jsbfgdxnl/pY=; b=U40KPtjDZ5oaO5BjIETV5ge09nMGO25IctNP7IsHQ1RRdgr+d5AWtS/eOxi9zPPo9P pSaNJFh4AXorjtnS6ssNF8FgMJisx0AD5s/ZgRdBXjgsDAa2rQ4zUmM73IRTnk8e05v9 QoZFjnHJGlsfI2+Sg8EU/WiDfJ7znOgNPgg4msTJV2SUU99KxQEl3EtVMnJqfDzQ1sn4 SEdQYPehpYYUpnWyxBZSsYAUaXp5W7flb+1GDokdD84vpx+t2/1IhI1WOCuhFZ1z2rTm u4EMBp1npo35emO8jl2kkmb6X/H1FiXtRNcH1obDEPaU0S9lmPQf2anXE6fI5+nfXc9V w9tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695369308; x=1695974108; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xo0lap6Lgs4aUClULX8HNoJkpzCnX/7Jsbfgdxnl/pY=; b=KUYwgDTsiQy8ci/Igxs68AE6W3qda7LxvIAbsGkS9fi57rsuCriJsLBWeN28PySOr6 1b4v2zbn8HoOEGK4m7YblS3utjIZOSH2Us5tMrKgjHJ5jlKeugxqhl2H1Pyuu8fQlUP5 FM8Wcu8f6faRQ9pQnVpk/T1pXDQoMKlFAcSfC6e3vtK9yIcPDfo2Mv+liOFTTy0oYJ92 7EHMeAuuRBg7MNPwsPYFv9pfftC8pIrDlVUsz9VKZMyCtfTcSq5tvVnyd5pOPBF37jxu bpKLnXHvVB+AXm6HXsamTAmQvY1JLnwo7uLIJTfL5YPI1QDjUKRSWxdHuUVApVTaAiS6 OZiw== X-Gm-Message-State: AOJu0YxTwgHjjx4C9pn4qw4VgBMt6spGyBcmSTC+exyKV0ekNrX4Lx0P JQLzhz2S89d/0UaH69J7KIoN9sbPCcjh4DPC+Ji1gQ== X-Received: by 2002:a17:906:2009:b0:9a5:c49e:7145 with SMTP id 9-20020a170906200900b009a5c49e7145mr6718209ejo.69.1695369308485; Fri, 22 Sep 2023 00:55:08 -0700 (PDT) MIME-Version: 1.0 References: <20230920170253.203395-1-dlechner@baylibre.com> <20230920170253.203395-5-dlechner@baylibre.com> <20230921154514.GA383967-robh@kernel.org> In-Reply-To: <20230921154514.GA383967-robh@kernel.org> From: David Lechner Date: Fri, 22 Sep 2023 09:54:57 +0200 Message-ID: Subject: Re: [PATCH 4/4] iio: resolver: add new driver for AD2S1210 To: Rob Herring Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Jonathan Cameron , Krzysztof Kozlowski , Conor Dooley , Michael Hennerich , =?UTF-8?B?TnVubyBTw6E=?= , Axel Haslam , Philip Molloy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 22 Sep 2023 00:55:25 -0700 (PDT) On Thu, Sep 21, 2023 at 5:45=E2=80=AFPM Rob Herring wrote= : > > On Wed, Sep 20, 2023 at 12:02:53PM -0500, David Lechner wrote: > > This adds a new driver for Analog Devices, Inc. AD2S1210 resolver to > > digital converter. The driver is based on the staging driver with the > > following improvements: > > ... > > - Use devicetree to specify resolution instead of sysfs attribute. > > Why? sysfs allows a user to change at run-time. DT is a firmware > change. What/who determines the resolution? Unless it's the hardware > design/designer, it probably doesn't belong in DT. > This one is a bit of a gray area since it could be either way. The chip has two input pins for selecting the resolution. If the hardware designer decides to connect these to gpios, then they could be changed at runtime. But if the hardware designer decides to hard-wire these pins then we need to supply this information via the devicetree. The choice of the resolution is determined by the physical requirements of the full system. This device measures rotational position and velocity. So the main reason to pick something less than the full 16-bit resolution i= s if the max rotational speed of whatever is connected is going to be greater than 125 revolutions per second (assuming 8.192 MHz clock).