Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp856215rdb; Fri, 19 Jan 2024 00:26:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGn7j4zlpGVFJi5a/YVFFJ+dVAnYvhVIpezmmt6ANSbzeHLAAKw2lR1IftmhylLDJZ7uPSU X-Received: by 2002:a17:90b:1808:b0:28e:79ea:924d with SMTP id lw8-20020a17090b180800b0028e79ea924dmr1655865pjb.92.1705652813645; Fri, 19 Jan 2024 00:26:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705652813; cv=pass; d=google.com; s=arc-20160816; b=IJLP11uxUYiXyezrEmFnJwA841KtGY0ISm084SXSx6kXn7XtxlrrN4tjOG8RCikNA3 I+vp890tFgC4v0o5adwRiLNxYdAfjmqbUEMKFdEOcOibcDz0xndNyXsAY0k8tRfWr99u 7al8VhK4z/AQYs94ard4XaHnZzEACuT7+E8NxVhegmJ/zdpGyOxNt2E3QxQpUK+/FWCp t3xPW1xkTPpzvLXVatQZsQc96oWkxAPweN+c5opXyKa1w7eWckFVJl8F2G9qkRBfBRaA lrFdQH+amZEmZFJLNjtBCQxaMGhjSSoZxioUwlIIKt8m7MMY4tQXbPoxnpNslvb3ocU8 hjMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=lsR+tvff2CxAiZo34B7B8Rp+iXMZjWM108KbbjhVJjU=; fh=rAUWiW8pSF/EJA/hH+bUBkWTls4kUj1IxD/oIUuhiN0=; b=obgyMrXP+bRDFQGMLcSmoVaovVChEQPCoTkQN7zWkszLTLhOh++1LcCMttWqMB1T/1 ACQT9Oj4duTNAnTnHLij0Z+3Zn8bLTNN7npzOO4n34F2qcgla2RUJYiDoaA3Ycc2fEHb k//NOqt6CfybIGxXTZSchLwjUK6W0VI9XemSEmEph4lVXSSgGPa4PDk6UD+nRMIIIMKl df3OsNoWhkSwBH9Kt+j2gN2cLjdxh1hdzPtXkfShrAomYM1DWEYmILm9xa+rQZTJLPZ6 0sKYwhrqB9vqP4aXtgdsmUDBFNgx7RGtCAWx4TmIIMie068/ZxgeGCS7K907WQQjGnvV DGtA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iEMVNWWc; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-30892-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o7-20020a17090ac08700b002900f0877dbsi2945462pjs.87.2024.01.19.00.26.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 00:26:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30892-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iEMVNWWc; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-30892-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 65C31287B87 for ; Fri, 19 Jan 2024 08:20:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9705820B04; Fri, 19 Jan 2024 08:20:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iEMVNWWc" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D69B61F5E6; Fri, 19 Jan 2024 08:20:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705652406; cv=none; b=IYJS8Lo4GEIIr8X63kHtGiV1+Zl3bSX6PRTSHAYRPV1kCl+sB6wUH5G3RDVSoWDCdkLygMnz9eInsMB+4gYBILeT8AxCUfJgm0sJ2euKHsTTcOQHehetbm90vKPVFjeZcDY7VNqZiSGNCRqh0eJmKD7GdFMptl06q2Bez8h8lqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705652406; c=relaxed/simple; bh=hFt0zTpCZQ0fcZH0knVkNJSLARQZkEOuOozfO1PQzvk=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=c8tVGf7VF3V8l1RXd5bRwsDgRdKvJerZ51Kuq3K9EaHXqB21u8TMSR8xg2XYu2UAJHRFE79y4sJevLNafzoYJhC4b/s18ceNh6xLQ0836Q7nbGIbObfg0Eg5HzEjY9aHGs4tytdKs7Vwg61mRqiIzE9FGI2yhfOqyq/12kRAQiw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iEMVNWWc; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a293f2280c7so50580066b.1; Fri, 19 Jan 2024 00:20:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705652403; x=1706257203; darn=vger.kernel.org; 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=lsR+tvff2CxAiZo34B7B8Rp+iXMZjWM108KbbjhVJjU=; b=iEMVNWWc5MMRGokrIDeFaTnIVyY+mfgvrE/Ln/BVoYrMdw/e/vV1k/V9fyIGj1btHJ kXWcgbVZLry1owsMlehN33XBJ9aHIwqib4xg8c685PGWlbgfTeTOrNWqQSERAPFv1PKo an1B4MRmuQ4ie4T3YFvI0VUcPJjvVVdc+jCD9a5qcCpQ8PF/gOsDQQtE6NbQ4F6OUuBI zP3U+qx1JjT9QLRhvAwA2xk98oiVsFLTX7obmlOyNK0MPD8BfkZrir8psJs1oit7RdVE 8AIf+U/vdtCltwpUiPIm+EodQqINknyqAKfLEc+rwEA53v9wukPb7WNhl77ZnR9AzgU/ OqVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705652403; x=1706257203; 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=lsR+tvff2CxAiZo34B7B8Rp+iXMZjWM108KbbjhVJjU=; b=anrE4Q3suReInIvThDJxGf+6UCSIGs0hqMeO8NgR1NbCUFypjdOb2UBAnwv3B8fBR0 BzbFsnVKngDhXrKtR2X6+AbKkNvbO0wH0Gpg9UIm84ZjCYze89ScRVCQkaRvR99TR2zw k0mFyn2svfgGANDMuQH0siTlR6pzdzD91qcriEppsGRNpfL1B0MxprZC5EkwJZG4fQip Dr/+RxUQ77UuzPmNRvN93gLoK5L7pNHsim6LSmX6eZLPCRILShtfQicZnLxOr8XXgTv8 L/RlIl4Npt+LrVZHzaEIWDCiBQA3XmlIm9SJrgiv2p+5tKjMwTB2k4aGnDwnxalfbINL P2hg== X-Gm-Message-State: AOJu0YymQe+tnr0bqEBk5pwlXtBXpY6+OhuiBP6vfUyjdGSOdUqHH93k Wo23iE3Si3iaY+V+Vp4HvzyoeBrxQ1KOll7P0f1uqQyZJxSfYKZw X-Received: by 2002:a17:907:d386:b0:a2f:76b8:6956 with SMTP id vh6-20020a170907d38600b00a2f76b86956mr120109ejc.25.1705652402674; Fri, 19 Jan 2024 00:20:02 -0800 (PST) Received: from ?IPv6:2001:a61:3456:4e01:6ae:b55a:bd1d:57fc? ([2001:a61:3456:4e01:6ae:b55a:bd1d:57fc]) by smtp.gmail.com with ESMTPSA id wb3-20020a170907d50300b00a2cc6398083sm8981998ejc.10.2024.01.19.00.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 00:20:02 -0800 (PST) Message-ID: <0f32caa9a11305333f1f18b97c97d775f4a5bb9a.camel@gmail.com> Subject: Re: [PATCH v6 1/2] dt-bindings: iio: frequency: add admfm2000 From: Nuno =?ISO-8859-1?Q?S=E1?= To: "Paller, Kim Seer" , Conor Dooley Cc: "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jonathan Cameron , Lars-Peter Clausen , "Hennerich, Michael" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Crt Mori , Linus Walleij , Bartosz Golaszewski Date: Fri, 19 Jan 2024 09:20:01 +0100 In-Reply-To: References: <20240118085856.70758-1-kimseer.paller@analog.com> <20240118085856.70758-2-kimseer.paller@analog.com> <20240118-steadily-coauthor-de8275118901@spud> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 (3.50.3-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi Kim, On Fri, 2024-01-19 at 00:30 +0000, Paller, Kim Seer wrote: > > -----Original Message----- > > From: Conor Dooley > > Sent: Friday, January 19, 2024 12:10 AM > > To: Paller, Kim Seer > > Cc: linux-iio@vger.kernel.org; devicetree@vger.kernel.org; linux- > > kernel@vger.kernel.org; Jonathan Cameron ; Lars-Peter > > Clausen ; Hennerich, Michael > > ; Rob Herring ; > > Krzysztof Kozlowski ; Conor Dooley > > ; Crt Mori ; Linus Walleij > > ; Bartosz Golaszewski > > Subject: Re: [PATCH v6 1/2] dt-bindings: iio: frequency: add admfm2000 > >=20 > > [External] > >=20 > > Hey, > >=20 > > On Thu, Jan 18, 2024 at 04:58:55PM +0800, Kim Seer Paller wrote: > > > Dual microwave down converter module with input RF and LO frequency > > > ranges from 0.5 to 32 GHz and an output IF frequency range from 0.1 t= o > > > 8 GHz. It consists of a LNA, mixer, IF filter, DSA, and IF amplifier > > > for each down conversion path. > > >=20 > > > Signed-off-by: Kim Seer Paller > > > --- > > > V5 -> V6: Moved array of switch and attenuation GPIOs to the channel = node. > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Changed pin co= ords with friendly names. Removed Reviewed-by tag. > > > V4 -> V5: Added Reviewed-by tag. > > > V3 -> V4: Updated the description of the properties with multiple ent= ries and > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 defined the or= der. > > > V2 -> V3: Adjusted indentation to resolve wrong indentation warning. > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Changed node n= ame to converter. Updated the descriptions to clarify > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 the properties= . > > > V1 -> V2: Removed '|' after description. Specified the pins connected= to > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 the GPIOs. Add= ed additionalProperties: false. Changed node name to > > gpio. > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Aligned < synt= ax with the previous syntax in the examples. > > >=20 > > > =C2=A0.../bindings/iio/frequency/adi,admfm2000.yaml | 129 +++++++++++= +++++++ > > > =C2=A0MAINTAINERS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 |=C2=A0=C2=A0 7 + > > > =C2=A02 files changed, 136 insertions(+) > > > =C2=A0create mode 100644 > > Documentation/devicetree/bindings/iio/frequency/adi,admfm2000.yaml > > >=20 > > > diff --git > > a/Documentation/devicetree/bindings/iio/frequency/adi,admfm2000.yaml > > b/Documentation/devicetree/bindings/iio/frequency/adi,admfm2000.yaml > > > new file mode 100644 > > > index 000000000000..6f2c91c38666 > > > --- /dev/null > > > +++ > > b/Documentation/devicetree/bindings/iio/frequency/adi,admfm2000.yaml > > > @@ -0,0 +1,129 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +# Copyright 2023 Analog Devices Inc. > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/iio/frequency/adi,admfm2000.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: ADMFM2000 Dual Microwave Down Converter > > > + > > > +maintainers: > > > +=C2=A0 - Kim Seer Paller > > > + > > > +description: > > > +=C2=A0 Dual microwave down converter module with input RF and LO fre= quency > > ranges > > > +=C2=A0 from 0.5 to 32 GHz and an output IF frequency range from 0.1 = to 8 GHz. > > > +=C2=A0 It consists of a LNA, mixer, IF filter, DSA, and IF amplifier= for each down > > > +=C2=A0 conversion path. > > > + > > > +properties: > > > +=C2=A0 compatible: > > > +=C2=A0=C2=A0=C2=A0 enum: > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - adi,admfm2000 > > > + > > > +=C2=A0 '#address-cells': > > > +=C2=A0=C2=A0=C2=A0 const: 1 > > > + > > > +=C2=A0 '#size-cells': > > > +=C2=A0=C2=A0=C2=A0 const: 0 > > > + > > > +patternProperties: > > > +=C2=A0 "^channel@[0-1]$": > > > +=C2=A0=C2=A0=C2=A0 type: object > > > +=C2=A0=C2=A0=C2=A0 description: Represents a channel of the device. > > > + > > > +=C2=A0=C2=A0=C2=A0 additionalProperties: false > > > + > > > +=C2=A0=C2=A0=C2=A0 properties: > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 reg: > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 description: > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The channel n= umber. > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 minimum: 0 > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 maximum: 1 > > > + > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 adi,mode: > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 description: > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 RF path selec= ted for the channel. > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0= - Direct IF mode > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1= - Mixer mode > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $ref: /schemas/types.yaml= #/definitions/uint32 > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 enum: [0, 1] > >=20 > > How come this is an enum, rather than a boolean property such as > > "adi,mixer-mode"? >=20 > I used an enum, perhaps because it was easier to implement. However, this > could be changed if a boolean property might be more suitable in this cas= e. > Is that the preferred option? >=20 Hmmm, How is the enum easier than a boolean property :)? I guess the device= has a default mode. So, if it is Direct IF mode you have 'adi,mixer-mode' to enab= le that mode and that's it. So the code is pretty much just: if (device_property_read_bool()) { /* enable mixer mode */ } Also remember that from a bindings point of view being easier to implement = or not in the driver does not matter much. Take for an example, properties with well = know units like 'microamp'. It would be much easier to just have an enum with the devi= ce register values but that's not how we should do it since it wouldn't be int= uitive at all for people reading devicetrees. - Nuno S=C3=A1