Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1208072pxb; Sat, 30 Oct 2021 08:13:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiqly+UpfJxgt16793ET7WclgaTBBzVyaKehvf23+17JCz3uibUF5h1nCyY+KXIES5xQf2 X-Received: by 2002:a05:6402:270e:: with SMTP id y14mr24075592edd.3.1635606782045; Sat, 30 Oct 2021 08:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635606782; cv=none; d=google.com; s=arc-20160816; b=Ga01n4P8SDqGTi+wVxeh0GQZvsVCYKtssFy96Fz+XWFKyXYJpjxJUWWjVmmEqu//2F Or4jlRzSBLItGl9OoX8DcTW0Xsrhkwt1zZQl2bOQzg5LcIbqact9CZMjYczNr6YIvCSa cjkskUBI9Qmsm2eHMBsGYKZEF5Htw297nig3mLsELGaMe1CxO10m1Gc1r411kC2u7Ykv ozzAtsRn/pEGCAGpfyzYRB01hzP4GuwdOhg8PwnWrIxIKifwnZ4V1KabIB39scPiEpYx 4YWNZEkVka0NvNZwR25YJ+uPI8RfbD/DqT9BcUXfNmJXCZrTEEAo2ItnyPIvfqkQD8T1 mYBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=6TxBqpdcZDgtKwaQ0gfawpQvg9M9AoHtD6AJ2Lvz2yg=; b=n4WTu7ksOf8wFg3qb3batCNpVOSDh4Rx5e4D9WWyEpCwwebUMvSe3t2qfpzoJv0YTJ /+8eKhxk4e10nOzLgZzA5c1KG9mOuS84rdJTCEb5LriGVkcbTEKfLCGctxVfQV8PW0OX WhL5rEgI4I0CRyi0ir0KCNo9CReewDcdos2mPDOHH4NjXa2FgPU+/HBkMU/6AZofgkYO R01HMAv1se8jvfp4Y3EKPTZgC/MT9MYsBOUnuiLPNvVizVbHAK3vc/333aeZT4J5nQU4 Htuj6BDTlcEvgBuQ5LTWVDzxOwN543VOufG8g2Itddl4VL780bSeTYkcpfx/VvtWh4Mr 2XAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt9si16168996ejc.726.2021.10.30.08.12.36; Sat, 30 Oct 2021 08:13:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231766AbhJ3PMk convert rfc822-to-8bit (ORCPT + 99 others); Sat, 30 Oct 2021 11:12:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbhJ3PMj (ORCPT ); Sat, 30 Oct 2021 11:12:39 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EB0BE60F93; Sat, 30 Oct 2021 15:10:06 +0000 (UTC) Date: Sat, 30 Oct 2021 16:14:35 +0100 From: Jonathan Cameron To: "Sa, Nuno" Cc: "Miclaus, Antoniu" , "robh+dt@kernel.org" , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Lars-Peter Clausen Subject: Re: [PATCH v2 1/2] iio: frequency: admv1013: add support for ADMV1013 Message-ID: <20211030161435.6ceaab21@jic23-huawei> In-Reply-To: References: <20211027092333.5270-1-antoniu.miclaus@analog.com> <20211027184324.51811ef1@jic23-huawei> <20211028113101.0587a658@jic23-huawei> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Oct 2021 07:49:41 +0000 "Sa, Nuno" wrote: > Hi Jonathan, > > > -----Original Message----- > > From: Jonathan Cameron > > Sent: Thursday, October 28, 2021 12:31 PM > > To: Miclaus, Antoniu > > Cc: robh+dt@kernel.org; linux-iio@vger.kernel.org; > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Sa, Nuno > > ; Lars-Peter Clausen > > Subject: Re: [PATCH v2 1/2] iio: frequency: admv1013: add support for > > ADMV1013 > > > > On Thu, 28 Oct 2021 10:08:08 +0000 > > "Miclaus, Antoniu" wrote: > > > > > Hello Jonathan, > > > > > > Thanks for the review! > > > > > > Regarding the interface for the Mixer Offset adjustments: > > > ADMV1013_MIXER_OFF_ADJ_P > > > ADMV1013_MIXER_OFF_ADJ_N > > > > > > These parameters are related to the LO feedthrough offset > > calibration. > > > (LO and sideband suppression) > > > > > > On this matter, my suggestion would be to add IIO calibration types, > > something like: > > > IIO_CHAN_INFO_CALIBFEEDTROUGH_POS > > > IIO_CHAN_INFO_CALIBFEEDTROUGH_NEG > > > > These sound too specific to me - we want an interface that is > > potentially useful > > in other places. They are affecting the 'channel' which here is > > simply an alt voltage channel, but I'm assuming it's something like > > separate analog tweaks to the positive and negative of the differential > > pair? > > That's also my understanding. This kind of calibration seems to be very > specific for TX local oscillators... > > > Current channel is represented as a single index, but one route to this > > would be > > to have it as a differential pair. > > > > out_altvoltage0-1_phase > > for the attribute that applies at the level of the differential pair and > > > > out_altvoltage0_calibbias > > out_altvoltage1_calibbias > > For the P and N signal specific attributes. > > Honestly, I'm not very enthusiastic with having out_altvoltage{0|1} as the > this applies to a single channel... Having this with separate indexes feels > odd to me. Even though we have the phase with "0-1", this can be a place > for misuse and confusion... > > I was thinking about modifiers (to kind of represent differential channels) > but I don't think it would work out here... What about IIO_CHAN_INFO_CALIBBIAS_P > and IIO_CHAN_INFO_CALIBBIAS_N? Or maybe just something like > IIO_CHAN_INFO_CALIBBIAS_DIFF and internally in IIO we would automatically > create both P and N sysfs files since I don't think it makes senses in any case to > just define one of the calibrations... Anyways, these are my 5 cents :) Definitely not a modifier. It's almost arguable that these are different characteristics of the channel so I can live with the ABI perhaps, but unless this is a very common thing I'm not sure I want to burn 2 chan info bits for them. Note we are running very low on those anyway without changing how those are handled. We will need to tackle that anyway, but let's not tie that to this driver. I don't like the idea of adding core magic to spin multiple files from one without more usecases. So for now use extended attributes for these if we go this way. I think I still prefer the separate channels approach. Note this is how we deal with devices that are capable of either single ended or differential operation. The channel numbering is reflecting the wire in both cases. However, I'm not sure we've ever made it clear the ABI would apply like this. We may have devices that use this interface but expect it to not apply to the differential case.... Jonathan > > - Nuno Sá