Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1345741ybv; Thu, 6 Feb 2020 02:27:27 -0800 (PST) X-Google-Smtp-Source: APXvYqx0dYM5UAcEz0ttLl4wWD/QSbW4nnH0gEsoV+GFP2f6dL71L6/hA74PbcFq7hhNOT+gkI3H X-Received: by 2002:a9d:7f16:: with SMTP id j22mr29506217otq.256.1580984847858; Thu, 06 Feb 2020 02:27:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580984847; cv=none; d=google.com; s=arc-20160816; b=ckA5wApT4QK0WiuDVtjCpjm7pKnnPJAmTPuoGo3VjywUVDi65R4gGllwJ8vYO0D+ax 2stvWjSPsNowA57szMaYk07phelTPK1/vuHp8i24VJ7uCbmL84YKO8M9xUomA66o4PHb yqjKz46g8Tvle2ID5Ngip82y72wZnRCfISPYh0yEfPhdpC9rpKax3KjAgdh8Xy+AhD9m XfGf3jqkB4goAENXqqWGGNm8tLGMYsvFzS6u2SNAKCQyxANZ4402NMXJLBNyqWEki9r2 Bb3WDV9xJwhJif13XyBl9v6RphulgaHXPC16SnNgDjFU1Y0p7jThPgefqagCALiHg69F gTaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=70GFwCBCC2sbbPa5owwQZCGv6x5+2i1L6dKOWUV3PLo=; b=hrFmlXGBXTlJwWZEhTdbV20su1mfsM/aTjTu5IqOEoVFYnl8kownjCFF/33L4LqrGB uLS/e870mUXzKpr3Lcfcx5hGghGCTFLeb+uyPiD0FaL5NI/5R5ycxVz9xe5Us6rEKHLa ZWqks/ilvrYbEmb6vf5b6SNyyzV8x3BFes5HuAZ1aU29qCnwtFuQdfJjVpZzngU418xl ZBP1Eopz7k4amak31mmyGkXxOPHxzDfzwqvh4q7wy+x1yuG9T8Ur1xjZG3sPceyM5CD0 9AW6YIjU7sGkSiGR02dHnZujD/ksWVDGmCnczLYg5R+OrkeDkIDymZnEJhxR5JT0VSyb Hsgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MYc2c6ZZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id v14si1476874oto.127.2020.02.06.02.27.14; Thu, 06 Feb 2020 02:27:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MYc2c6ZZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728464AbgBFK0U (ORCPT + 99 others); Thu, 6 Feb 2020 05:26:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:42738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728394AbgBFK0U (ORCPT ); Thu, 6 Feb 2020 05:26:20 -0500 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (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 1A94D206CC; Thu, 6 Feb 2020 10:26:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580984779; bh=0JgSe6SPXxtiGzuqSpPoTEMWToGrknUcN1/s8u6Vf+M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MYc2c6ZZyJ8vOUJLwASgkPxI64n+PKHyG9kUruxfxfOcaXwKN20gVAa1F11rD/1xy G1lY/SCl3pbS7xjd6cl5kCtzFLQlYb3Gnci0FlILhLL5dCrwmJ2ac/BY+pS2YCxybZ zmLza8wlOPi9pRe8vIoNSVZmTvbr+VabbcbR7fR8= Date: Thu, 6 Feb 2020 10:26:14 +0000 From: Jonathan Cameron To: "Ardelean, Alexandru" Cc: "Bia, Beniamin" , "pmeerw@pmeerw.net" , "linux-iio@vger.kernel.org" , "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , "lars@metafoo.de" , "knaack.h@gmx.de" , "Hennerich, Michael" , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "biabeniamin@outlook.com" Subject: Re: [PATCH v4 4/5] dt-bindings: iio: amplifiers: Add docs for HMC425A Step Attenuator Message-ID: <20200206102614.64593f10@archlinux> In-Reply-To: <17fefa85f2c441549bc07e08fb13994b10854fbf.camel@analog.com> References: <20200129142301.13918-1-beniamin.bia@analog.com> <20200129142301.13918-5-beniamin.bia@analog.com> <20200202105358.27b6b8a6@archlinux> <17fefa85f2c441549bc07e08fb13994b10854fbf.camel@analog.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 3 Feb 2020 11:25:48 +0000 "Ardelean, Alexandru" wrote: > On Sun, 2020-02-02 at 10:53 +0000, Jonathan Cameron wrote: > > On Wed, 29 Jan 2020 16:23:00 +0200 > > Beniamin Bia wrote: > > > > > From: Michael Hennerich > > > > > > Document support for Analog Devices MC425A Step Attenuator. > > > > > > Signed-off-by: Michael Hennerich > > > Signed-off-by: Beniamin Bia > > > --- > > > .../bindings/iio/amplifiers/adi,hmc425a.yaml | 48 +++++++++++++++++++ > > > 1 file changed, 48 insertions(+) > > > create mode 100644 > > > Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml > > > > > > diff --git > > > a/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml > > > b/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml > > > new file mode 100644 > > > index 000000000000..d800639c14a5 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml > > > @@ -0,0 +1,48 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/iio/amplifiers/adi,hmc425a.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: HMC425A 6-bit Digital Step Attenuator > > > + > > > +maintainers: > > > +- Michael Hennerich > > > +- Beniamin Bia > > > + > > > +description: | > > > + Digital Step Attenuator IIO device with gpio interface. > > > + HMC425A 0.5 dB LSB GaAs MMIC 6-BIT DIGITAL POSITIVE CONTROL ATTENUATOR, > > > 2.2 - 8.0 GHz > > > + > > > https://www.analog.com/media/en/technical-documentation/data-sheets/hmc425A.pdf > > > + > > > +properties: > > > + compatible: > > > + enum: > > > + - adi,hmc425a > > > + > > > + vcc-supply: true > > > + > > > + ctrl-gpios: > > > + description: > > > + Must contain an array of 6 GPIO specifiers, referring to the GPIO > > > pins > > > + connected to the control pins V1-V6. > > > + maxItems: 6 > > > > Does this force exactly 6? > > I'm [also] a bit unsure whether to force this number in DT. > One idea [with this driver] would be to maybe have it support multiple of these > GPIO-controlled attenuators/amplifiers. And those could have a higher/lower > number of GPIOs. > > In any case, we could enforce this as-is [for now], and see later when/if adding > new parts. > No strong opinion from my side about this though. It should be enforced for each of the devices supported. So for devices with less, it would only allow precisely that lesser number. One slight quirk is someone crazy might wire certain pins to high or low because they don't need the precision. Not sure how we handle that one but can deal with it when it happens. Jonathan > > > > > > + > > > +required: > > > + - compatible > > > + - ctrl-gpios > > > + > > > +examples: > > > + - | > > > + #include > > > + gpio_hmc425a: hmc425a { > > > + compatible = "adi,hmc425a"; > > > + ctrl-gpios = <&gpio 40 GPIO_ACTIVE_HIGH>, > > > + <&gpio 39 GPIO_ACTIVE_HIGH>, > > > + <&gpio 38 GPIO_ACTIVE_HIGH>, > > > + <&gpio 37 GPIO_ACTIVE_HIGH>, > > > + <&gpio 36 GPIO_ACTIVE_HIGH>, > > > + <&gpio 35 GPIO_ACTIVE_HIGH>; > > > + vcc-supply = <&foo>; > > > + }; > > > +...