Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2168172rdb; Thu, 21 Sep 2023 10:17:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzpSxwDmeSUi+r7eAF2uHlPnBiFZbh37uuptDjKyliOMiJJSJE/2EjTOIVjKOfje8kUcqc X-Received: by 2002:a17:902:d4d0:b0:1c4:636:51ef with SMTP id o16-20020a170902d4d000b001c4063651efmr6588922plg.30.1695316656518; Thu, 21 Sep 2023 10:17:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695316656; cv=none; d=google.com; s=arc-20160816; b=OJdilETwY5kq1BOtJ5uxpxvWF78eE5hJQYAbOA+p9ZGyhm8gAEaQpw5wvIFeD/faqQ nDYldA5r+Sbk9T+i66+rPvqJiraLeGR9o8UNeVNzFoo4cLsh37MMNS36qRaBO1TB459t acDhgiNehEmdkOQOKlRCf9PVOOVtS7vvpu+AT4l5qNwT1Qwnm8uZKJvhu0wSfP0DP/4A SGFesLw+2RdkPy14NcocKmD9kebkVK9luu4o7XR2xL0GC07xn/+vdFXlu5YZ7GNryWCe 2A37qMvco2D/xDvxTABhXU0O1gVwX3gWIPEuDvEKNTQDWcIu1Kr5T0d8iFla7Fe8RP8d 4yiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xDcej9ppmT2fURukF9CEhwN9rvhUgG8ZH4+okH4EiDw=; fh=zz4C33k7mh+30p4H/N4T6IEfsuUX3SoImLZa4dKVUs8=; b=qpmzSApCmiQuHrw2f8u7H0Y1OByjQqZF12lkwZNxE+rOOgrmnaNNk9AbfyGdepCOt8 U3FAAs+pndwHaLcL5BSdGK9mqi2GPB2UYf0CBKy4ottGcsnQ69lRYwruRHBhVIHXYyfH vCbWv3p9ZS+WQxieWtI2CxYn5F7X0r3G/2jlF5wAlpjlQ9Hpro0k02SClrI67AtI7IwQ +k9Tzy3odk0aQA1rlEJzdDNVsovPJzHQjupshXx1LVwF8WH84pBJBF0zBIxoGRUTJW+M EFYtQpkSlK0uY0wTeRbA9OKZ35AP9Sz2H0t6o3fhIdNE3PdQNy7LmN5gOQE6hGRK3CiT usDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hnb53gE9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id lb14-20020a170902fa4e00b001c4743e4a60si1771397plb.197.2023.09.21.10.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 10:17:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hnb53gE9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A5A978275E53; Thu, 21 Sep 2023 10:07:33 -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 S229640AbjIURHa (ORCPT + 99 others); Thu, 21 Sep 2023 13:07:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230190AbjIURHK (ORCPT ); Thu, 21 Sep 2023 13:07:10 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F37D359D; Thu, 21 Sep 2023 10:03:15 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E38C5C4E770; Thu, 21 Sep 2023 15:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695311117; bh=E1dhxis8ZumBm0hKaOMOgVxtcqW/DF2vSRD3c8E34to=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hnb53gE9VP9wyiDUEYS9uM+cYkAMgpeaQr7Zkpf0rCGGzVG+CalXEkvwN+Nvrlgwn SShkMPiln06WcGb3i3GYwdQqgmB2SkXTR+yQd2iHhdeBhlJkwWBWw9tE5WFfRbjNV+ PywkpmRf30b8hWmQupUhSJghVx8L2s7Qnkv2eTdEQB2MzfqZgXK1HOGUCm5HDSSm0s X4NhbhVqZsl1pL04z4TTwAyUI946pLdhf9ycusxuBkbXLz3BK0F9iD9tupyAdb4kgN DfUx88OB9vJBn9cWIN9QjnMbPme61mEW7+BOHGCmSyw9SRc7OhW1JafPQoDNsUsWV5 Uh/US7cqytnug== Received: (nullmailer pid 396045 invoked by uid 1000); Thu, 21 Sep 2023 15:45:14 -0000 Date: Thu, 21 Sep 2023 10:45:14 -0500 From: Rob Herring To: David Lechner 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 , Nuno =?iso-8859-1?Q?S=E1?= , Axel Haslam , Philip Molloy Subject: Re: [PATCH 4/4] iio: resolver: add new driver for AD2S1210 Message-ID: <20230921154514.GA383967-robh@kernel.org> References: <20230920170253.203395-1-dlechner@baylibre.com> <20230920170253.203395-5-dlechner@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230920170253.203395-5-dlechner@baylibre.com> 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]); Thu, 21 Sep 2023 10:07:33 -0700 (PDT) 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: > > Fixes: > - Fix use before initialization bug in probe. > - Fix not checking error returns in probe. > - Remove spi_setup() and spi_set_drvdata() from probe. > - Fix ordering of devm_iio_device_register() > - Remove incorrect hysteresis logic > > Changes: > - Use BIT/GENMASK macros. > - Use devicetree to get CLKIN frequency (was sysfs attribute). > - No longer bit-shift the raw value for IIO_CHAN_INFO_RAW. > - Use regmap for register access. > - Remove config sysfs attribute. > - Use gpio array for mode and resolution gpios. > - Invert sample gpio logic and use GPIO_ACTIVE_LOW in devicetree. > - Change hysteresis to use IIO_CHAN_INFO_HYSTERESIS instead of custom > device attribute. > - Rename fexcit attribute to excitation_frequency. > - 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. Rob