Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1187061ybd; Wed, 26 Jun 2019 12:50:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwv2H2V9bACUQVsgRHIfQaRK6TrAun+JIX2b9W7kBmVzYG7LR2xogRWrFO4+gNt4MTy5fpV X-Received: by 2002:a17:90a:1c17:: with SMTP id s23mr1005745pjs.108.1561578608037; Wed, 26 Jun 2019 12:50:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561578608; cv=none; d=google.com; s=arc-20160816; b=vq5/kQ4O0PtPGztfAXLrjliFoztg29EphWqCAfVPwN9BMfjUUOQCMBoNE7R0FKw5BX +xddw2N8KWfCjAtuIUPbcS30krwUvjuzXpDM7tssBIo5p2hLVIlEJ8WqvAnkYYCDUw3u BZ3On278WHFJvj7N8hCQ+0LbaHjdDY3oILNbyeZhgtdc4Qq2AWNHjv0ViXIHI6ZBPlWW TEblSneqgdzkt3t+X3LPQQghaLfTbA2WQhkCVQm0VOkvciUi/fCUuEB9J4ILWPW0mBrU t2j/3P5O7u1jbSLYmCw4WTG71xZi7Fe3AuRwZmflixlGOkcKPnj1M9YBB1eHkAMP4wAs JjbA== 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=vEiVO9sgIals/9jXeRUt8M4h/Ziy4ePvHKmk4YGRQAA=; b=VkkOKq3rYXovhvSZLdc8qd2z/2zh58n7PZ+OqtdmwFfCDko6IkfbnNq6tE5JAoKvAh PKv40P1S4rljQuEidr5UDdEry/HxpE1wjriHsfWnA2usUVcoMOISf0Gqak9HKU7KN/Zd I5iIp4o/zkoSBKVvc+GF45aWfkwX/ptR0Y7bJihrgc7I1ml2ikQnANt5u25B5QWfbcyM mVqZrhSYWmArag65LGtvDgRZ3f5NbLcI9TLooX94+heM1gIQrmroA8lKqxpRJ/YiMfdJ f8g+iS9xiWWGpyFNPLZoKXdNCpJvS4dqbx9EF+qBZCzNW/by6HaQmokftbEMNrxOOPAU wbUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dFQ+8XKY; 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 a144si11658pfd.72.2019.06.26.12.49.51; Wed, 26 Jun 2019 12:50:08 -0700 (PDT) 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=dFQ+8XKY; 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 S1726486AbfFZTs1 (ORCPT + 99 others); Wed, 26 Jun 2019 15:48:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:60918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbfFZTs0 (ORCPT ); Wed, 26 Jun 2019 15:48:26 -0400 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 5EEBA2085A; Wed, 26 Jun 2019 19:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561578505; bh=w+6pkAvq2MECwkcGMuTt03y9vRjBjnv+uuBkInPNv9k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dFQ+8XKYILwRUeSDTfglUcfiQo5XEByMopzlINQFXZy70QpAAKyJMJDGu2ysj+cp+ BouA/+h4SeKAGs1KwhqF4ePJAz40rAAqEz/naX2YXdYN9M0c2/+apv8L8UtBzIxvWo JS6hUaw8kR8Pkx56xEPOGIoOM4YO5dj1AUvXcLQo= Date: Wed, 26 Jun 2019 20:48:20 +0100 From: Jonathan Cameron To: Stefan Popa Cc: , , , , , , , , , Subject: Re: [PATCH 4/4] iio: frequency: adf4371: Add support for output stage mute Message-ID: <20190626204820.513fb866@archlinux> In-Reply-To: <1561389236-26464-1-git-send-email-stefan.popa@analog.com> References: <1561389236-26464-1-git-send-email-stefan.popa@analog.com> X-Mailer: Claws Mail 3.17.3 (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, 24 Jun 2019 18:13:56 +0300 Stefan Popa wrote: > Another feature of the ADF4371/ADF4372 is that the supply current to the > RF8P and RF8N output stage can shut down until the ADF4371 achieves lock > as measured by the digital lock detect circuitry. The mute to lock > detect bit (MUTE_LD) in REG25 enables this function. > > Signed-off-by: Stefan Popa Bit of fuzz on this due to me ignoring patch 1 for now. Rob probably missed the binding as it was buried inside a patch that wasn't clearly labelled and it is unlike him to review part of the bindings in a series. I'll take the view it isn't complex enough to bother him and apply it. (of course, should any DT people want to comment it would be welcome!) Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > .../devicetree/bindings/iio/frequency/adf4371.yaml | 6 ++++++ > drivers/iio/frequency/adf4371.c | 13 +++++++++++++ > 2 files changed, 19 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml b/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml > index a268a9d..6db8742 100644 > --- a/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml > +++ b/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml > @@ -32,6 +32,12 @@ properties: > items: > - clkin > > + adi,mute-till-lock-en: > + description: > + If this property is present, then the supply current to RF8P and RF8N > + output stage will shut down until the ADF4371/ADF4372 achieves lock as > + measured by the digital lock detect circuitry. > + > required: > - compatible > - reg > diff --git a/drivers/iio/frequency/adf4371.c b/drivers/iio/frequency/adf4371.c > index f874219..e48f15c 100644 > --- a/drivers/iio/frequency/adf4371.c > +++ b/drivers/iio/frequency/adf4371.c > @@ -45,6 +45,10 @@ > #define ADF4371_RF_DIV_SEL_MSK GENMASK(6, 4) > #define ADF4371_RF_DIV_SEL(x) FIELD_PREP(ADF4371_RF_DIV_SEL_MSK, x) > > +/* ADF4371_REG25 */ > +#define ADF4371_MUTE_LD_MSK BIT(7) > +#define ADF4371_MUTE_LD(x) FIELD_PREP(ADF4371_MUTE_LD_MSK, x) > + > /* ADF4371_REG32 */ > #define ADF4371_TIMEOUT_MSK GENMASK(1, 0) > #define ADF4371_TIMEOUT(x) FIELD_PREP(ADF4371_TIMEOUT_MSK, x) > @@ -484,6 +488,15 @@ static int adf4371_setup(struct adf4371_state *st) > if (ret < 0) > return ret; > > + /* Mute to Lock Detect */ > + if (device_property_read_bool(&st->spi->dev, "adi,mute-till-lock-en")) { > + ret = regmap_update_bits(st->regmap, ADF4371_REG(0x25), > + ADF4371_MUTE_LD_MSK, > + ADF4371_MUTE_LD(1)); > + if (ret < 0) > + return ret; > + } > + > /* Set address in ascending order, so the bulk_write() will work */ > ret = regmap_update_bits(st->regmap, ADF4371_REG(0x0), > ADF4371_ADDR_ASC_MSK | ADF4371_ADDR_ASC_R_MSK,