Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6130175rdb; Thu, 14 Dec 2023 09:04:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJoAG9dZOypJ5TAsE0hfqf0HWBkXhITCCJ7U9zPtuCsSelVmP1UEHKq++ZcMJcpuZMPY4V X-Received: by 2002:a05:6871:a003:b0:1fb:75b:999d with SMTP id vp3-20020a056871a00300b001fb075b999dmr10891826oab.76.1702573450463; Thu, 14 Dec 2023 09:04:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702573450; cv=none; d=google.com; s=arc-20160816; b=h0EFzlWdGEgrUi6FEZMaQy/sYEl8O6aQwwQpWJhvGavt7B6XvUCQ8thMGKP1P2ZIxt XjPO3Zf0MeVupPcbQHq8h7cihApWSs1ypBj1zpJE7HojtnAkUdu/QGgqZdbWF0EKmDt8 0lPIXb/n2y8OooaZ6m7dJVcSH63H/MJliExHFSUHA/WCX4yU+s/L9/W9aeDSpRjbHVpH 4fFFVjfuvqijhef9oOiF4H+2wlNxySlTGMZQNkLwTwFgdjWpgSxECXUN64PtDdTkr3kn tS0mLU7KCi37taRjfcg/0PUTmxjwJfHBeVZB8d14Np23lAUQoPBexEV5wq1AaokpJYq1 rv1Q== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=m+lglxETz+fWuFm30gl8riT+YXHxcre+z450cDyvkZs=; fh=YjyM5Q9l8VlOdl4Y9mmJrA0j+K5yVNPCLP4H4GPsXbY=; b=YOOHRCsOIK7lA1xZRjleOSCcQQ4FsgAH6AfOqEhAK8ntR/FD5cQjcKYNQ5fCK2IQcV KnvSUvGMJGIvxyrz4meeaZOgcv3rs/d4LAWqrPgEBp/IMdyet4zcNSteucl4WJQ/c4zB ET0YzF4q7TkopKt0NLqPa4bDu9fq30D3w7ggyoaFUSF2mXv+o31rgeBD10oR2Bt1uPPO +xKovB355BPK/Ex9LRMfC601m9TgO5T12QWl6bPxwWwr5PoSLZ3HRJS6tXUnSH89JkCR Z7MvfFofoj2IB0nFvxRr3aM2WwGmqe/MGhEXoSjMiSVZyQruJgpnElrVV3J15/18IRBl yHnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=l25U2BUz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id z11-20020a056870514b00b001fae6181764si4791305oak.193.2023.12.14.09.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 09:04:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=l25U2BUz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 12187818450D; Thu, 14 Dec 2023 09:03:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443630AbjLNRD1 (ORCPT + 99 others); Thu, 14 Dec 2023 12:03:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjLNRD0 (ORCPT ); Thu, 14 Dec 2023 12:03:26 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 064DE9A; Thu, 14 Dec 2023 09:03:33 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5527ee1b5c3so1210679a12.1; Thu, 14 Dec 2023 09:03:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702573411; x=1703178211; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=m+lglxETz+fWuFm30gl8riT+YXHxcre+z450cDyvkZs=; b=l25U2BUz7/AJXxKejqiQedLOZM3UNYP6j8fpXIcqavb5EqXTKB/Z1+OV10aqJW/MgA kyN/D1YqbPNoIT4QjK8qL9HLY+QeerPPrwRawew9Q5c4RBCJOC3HFmY06IbeqSKTcT7r QCZPg5c4Hft/GRUGXuyK/y1tCNwX9oB4jMwBOcbUkUyZGwRSwzdAsUXrtEx2vwLlz9cd zYwHnfF0fJttJx1cVpNIpPviC1zmLuBI8eGWwT1a5GezhFnCzZigcL3id9orf8jWuDUT lHhnfc4f3OTorjfypNRORTyGMqJgQV8+/UjHeusUlQ7rBU27ifC9Sl23XBXv1fFHnZ8s cz3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702573411; x=1703178211; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=m+lglxETz+fWuFm30gl8riT+YXHxcre+z450cDyvkZs=; b=LpPEbv6BqM9LS03fOKyHScgnGL6uDQbk2qGJqG/kJ1qpdNmTSx5v/sxBl35CP1GDVL Dwl8zrkYZEJbnvg0Jsvi4DMOEzR50QOKDIIHTMmu2GhI0lGtwFJ50FeVjzP1m7zol88t pHQSR/qj97CTrCJSPpur3qVrZUn/z2hwqI4VoxaG+aSuapphhauzxPBrbmTC5GdJhsRD phRN+MHVyc64u1ENzb/GaJv0IMkuX+cDau8EJgkUXALiDRdO5JqI7RYqfW0uJ/3+3gR0 G0166Lbsu+gdN8b8EuzVAfMuumUVfkhB+EF1BqkXTADfblccN0mTxIKKJDi7umps+4jg ATpw== X-Gm-Message-State: AOJu0Yx/lhCv8AtUUhFep57nxo372timslSpC2YPyde6ZjbQ+RSxOjs6 Q5Q9PQ4RWUPkG9QZy1niIZk= X-Received: by 2002:a17:906:48d:b0:9a5:dc2b:6a5 with SMTP id f13-20020a170906048d00b009a5dc2b06a5mr11055203eja.35.1702573411184; Thu, 14 Dec 2023 09:03:31 -0800 (PST) Received: from [172.25.98.130] ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id mm20-20020a1709077a9400b00a1a53e9f401sm9666879ejc.132.2023.12.14.09.03.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Dec 2023 09:03:30 -0800 (PST) Message-ID: Date: Thu, 14 Dec 2023 19:03:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 1/2] dt-bindings: adc: add AD7173 To: David Lechner Cc: linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org, linux-gpio@vger.kernel.org, Lars-Peter Clausen , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Walle , Andy Shevchenko , Arnd Bergmann , ChiaEn Wu , Niklas Schnelle , =?UTF-8?Q?Leonard_G=C3=B6hrs?= , Mike Looijmans , Haibo Chen , Hugo Villeneuve , Ceclan Dumitru , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231212104451.22522-1-mitrutzceclan@gmail.com> Content-Language: en-US From: Ceclan Dumitru In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Thu, 14 Dec 2023 09:03:53 -0800 (PST) On 12/14/23 18:12, David Lechner wrote: > On Thu, Dec 14, 2023 at 1:43 PM Ceclan Dumitru wrote: >> On 12/12/23 17:09, David Lechner wrote: >>> On Tue, Dec 12, 2023 at 11:45 AM Dumitru Ceclan wrote: >> ... >> >>>> + interrupts: >>>> + maxItems: 1 >>> >>> Shouldn't this be 2? The datasheet says there is a "Data Output Ready" >>> signal on the DOUT/RDY pin and an "Error Output" on the SYNC/ERROR >>> pin. Although I could see how RDY could be considered part of the SPI >>> bus. In any case, a description explaining what the interrupt is would >>> be useful. >>> >> >> I do not see how there could be 2 interrupts. DOUT/RDY is used as an >> interrupt when waiting for a conversion to finalize. >> >> Sync and Error are sepparate pins, Sync(if enabled) works only as an >> input that resets the modulator and the digital filter. > > I only looked at the AD7172-2 datasheet and pin 15 is labeled > SYNC/ERROR. Maybe they are separate pins on other chips? Yep, sorry, missed that. All other supported models have them separate. > >> >> Error can be configured as input, output or ERROR output (OR between all >> internal error sources). >> >> Would this be alright >> interrupts: >> >> description: Conversion completion interrupt. >> Pin is shared with SPI DOUT. >> maxItems: 1 > > Since ERROR is an output, I would expect it to be an interrupt. The > RDY output, on the other hand, would be wired to a SPI controller with > the SPI_READY feature (I use the Linux flag name here because I'm not > aware of a corresponding devicetree flag). So I don't think the RDY > signal would be an interrupt. > Error does not have the purpose to be an interrupt. The only interrupt used from this chip is the one from the DOUT/~RDY pin. Sure, it is wired to the SPI controller, but when you can't also receive interrupts on that very same CPU pin an issue arises. So that pin is also wired to another GPIO with interrupt support. This is the same way that ad4130.yaml is written for example (with the exception that ad4130 supports configuring where the interrupt is routed). In regards to SPI_READY _BITUL(7) /* slave pulls low to pause */: the ad_sigma_delta framework (if it can be called that) is written to expect a pin interrupt, not to use SPI_READY controller feature.