Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp637896rwl; Thu, 30 Mar 2023 23:32:41 -0700 (PDT) X-Google-Smtp-Source: AKy350ZpspN+8C1HF+MCijMy9lZTn1EK8p2AEIJgd4TMTPVHUgOu5oAu6z3RMQ17lqeSgLJqKw0/ X-Received: by 2002:a05:6a20:748c:b0:cd:fc47:dd74 with SMTP id p12-20020a056a20748c00b000cdfc47dd74mr5448136pzd.4.1680244361047; Thu, 30 Mar 2023 23:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680244361; cv=none; d=google.com; s=arc-20160816; b=HyhePxAArQ0C6fkrWU4rT51KWMa3isrk4mKc2Ugd1PUEMou6ih2eyAgGuESnDFkpcy T9d1v0Z0BXA6s5tbmIRLWq/9vhUJds/7AOqLVMS8WHf+jvQKNkhr10XfzrDqjddmAJ/W 4EgFZhKSO8q0sYVQn0DEBlD8IM/K5+mKNkdsk+cZTielJExFYk5joGGsZl8Cucm2wZiz p7I+azz1twE+6zOB3mKxxr+pFTI4LBabTg7fyUkLeuNIo9JrhyOEURZf5Pv09e2tdsEY ZriFCkT2ScLzs+roIR1lsbYa9K1uLHgPn4NEVPoXMnSr4vG3pch+VZKUQvoRmILmeEo/ 04FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=Mu9CebZO0eshSauLlTyKtS5NCzddpSF3sP6M8+rl2s4=; b=hC2iWQ4n1SMt6F3QIjccFzPdlmuGJKKkUHL2xSnwkVuzSP42rxh3gbx5zhyEU5ugGd QusWW1GznUvW8EOVQGbmbezKiFpzc+PVdJHDyC4Db/m8FB9u+CEhtD3EgkkBwiWKkow4 VRbIcE4ajie60+MRZbtzEaQcVHQ1D1QdeUiqBItpF9GNlnvpqUGJAdE9NS61bSK1V9aA RIkw9u1zCx2illHrvcfn2LQj30cbxT192sCdhX9cJcds7yCwMeRzXy+osqNH9KJxx+jT MwLvOT841kZMENJne8vJsKw1mDCvpc1WLjYwvbeBsooTn+zUtkarxT3wNBdGGmaZNHxk XxtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dRGX3JBT; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a63f110000000b005136f229178si1631005pgi.309.2023.03.30.23.32.29; Thu, 30 Mar 2023 23:32:41 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=dRGX3JBT; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229814AbjCaG0e (ORCPT + 99 others); Fri, 31 Mar 2023 02:26:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbjCaG0c (ORCPT ); Fri, 31 Mar 2023 02:26:32 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8D37D52B; Thu, 30 Mar 2023 23:26:15 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id n10-20020a05600c4f8a00b003ee93d2c914so14332731wmq.2; Thu, 30 Mar 2023 23:26:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680243974; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=Mu9CebZO0eshSauLlTyKtS5NCzddpSF3sP6M8+rl2s4=; b=dRGX3JBTxDGgR4gPCe5vC+difAx6W8kPn7GB1KHDSL+C6xJi9wWuUU2cygrfOX9QM5 kEWtw4k6M4ltWSjsfWUlqA7cPQeyF8l5TkhDyF26E8NqxEyeRS+uxj/3Mr67QPFMLVhD bMW9VVkwHTQQ6OA8n98CjaLMoX+cTi1Q/RKJ3C7ccLHM4HcSpdWpUNdKLQdP4aB5WvYi 4Ms5fbkDZ8fv5H4Dne0FHWgT8ENPOwK//XTglfj+dmskRi1EUo0i7MGNhRJEn+XK1VXb QZGweSoO2WFqR1ed3qIF//SgIL5d3U0mL/6ihxBEVO+AQynheqXDX4W6o4Y2YC5Xsgwi fb4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680243974; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Mu9CebZO0eshSauLlTyKtS5NCzddpSF3sP6M8+rl2s4=; b=6+Vp7STD7r3Q8I/MWCUQl+RgrrXcMH/PMvHEfWqd0c6SKXF8mOyABijytGDXk4BJOs s6BgKbk7fSs6dLTEQMmYWGObTmb//4PYTQPELxwjuBnh9znydA0uFOyxthWm0oK0TMIW EHN+WUZpbyrFcyKiFbMWljv2IdesdRQgQ4Sx6DPhO2rjB2BHV1wNqRQK2z9PCVn05S2Z 227NQ2uUa6GKG8T3At9cskc6W1sWGxDpfbMP7b3TUKkx4KLvsHx+LURjt3iZyP8iKamg V6nWaLIWdCdfqutZB7st1jnW6zJy+MXEoguuPi68Hb7ytDVMQorht2YObmW+cFveLvl1 CRIg== X-Gm-Message-State: AAQBX9cbMV5Q5H2zIXgiWWOSBeCveHLaxvzjsELwFpzeDRUyEwv6Wdvs SVtZ1mQSKq/rVkme9u+l+WXZwDsA81QrU/Xl X-Received: by 2002:a1c:f216:0:b0:3ef:5e17:1ed9 with SMTP id s22-20020a1cf216000000b003ef5e171ed9mr17061834wmc.31.1680243974054; Thu, 30 Mar 2023 23:26:14 -0700 (PDT) Received: from ?IPv6:2001:a61:2b4b:9d01:5416:2b94:da5d:3156? ([2001:a61:2b4b:9d01:5416:2b94:da5d:3156]) by smtp.gmail.com with ESMTPSA id p6-20020a05600c358600b003ef6708bc1esm8812464wmq.43.2023.03.30.23.26.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 23:26:13 -0700 (PDT) Message-ID: Subject: Re: [PATCH] iio: adc: ad7192: Change "shorted" channels to differential From: Nuno =?ISO-8859-1?Q?S=E1?= To: Paul Cercueil , Jonathan Cameron , Lars-Peter Clausen , Michael Hennerich Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Alisa Roman Date: Fri, 31 Mar 2023 08:26:12 +0200 In-Reply-To: <20230330102100.17590-1-paul@crapouillou.net> References: <20230330102100.17590-1-paul@crapouillou.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 Thu, 2023-03-30 at 12:21 +0200, Paul Cercueil wrote: > The AD7192 provides a specific channel configuration where both > negative > and positive inputs are connected to AIN2. This was represented in > the > ad7192 driver as a IIO channel with .channel =3D 2 and .extended_name > set > to "shorted". >=20 > The problem with this approach, is that the driver provided two IIO > channels with the identifier .channel =3D 2; one "shorted" and the > other > not. This goes against the IIO ABI, as a channel identifier should be > unique. >=20 > Address this issue by changing "shorted" channels to being > differential > instead, with channel 2 vs. itself, as we're actually measuring AIN2 > vs. > itself. >=20 > Note that the fix tag is for the commit that moved the driver out of > staging. The bug existed before that, but backporting would become > very > complex further down and unlikely to happen. >=20 > Fixes: b581f748cce0 ("staging: iio: adc: ad7192: move out of > staging") > Signed-off-by: Paul Cercueil > Co-developed-by: Alisa Roman > Signed-off-by: Alisa Roman > --- Reviewed-by: Nuno Sa