Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp1764487imb; Sun, 3 Mar 2019 06:01:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyQPzv4RLT5XACi92woKeJj4ihsZ3ushmTxYZzeTqKtSo54RMiuBd4zzGDuvmNiO1kybaT5 X-Received: by 2002:a65:614a:: with SMTP id o10mr13955297pgv.51.1551621717249; Sun, 03 Mar 2019 06:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551621717; cv=none; d=google.com; s=arc-20160816; b=biD25aafI+fJ51PTreZDxU9jRqAevw+BY+P31VcJC41trePuAiy8lmUD/6LUnREDro OHr/SChRDR2IeVbr2Ny+PxXLazYKDcF+82yqHbvHpFnn8az69Vk8cgzUDIIYqkzJ1zP9 O9Uf2FMLEMU+BYsWB71puK8ZqT9AhCzgxBiN/b76J7GjOKswhdneJOt9fLziRT4QzonE YMH93fENNP4FFXHQ4JmUa2rGWojS8sYzPQSW0YrGUX8fyWixg3M43oA+N8J04v2zGcn5 Hgcod6KIt1/q158n2WALHNyk9ZTuIROzzp57YwCvypZALdWVQs+O986kt3LRpm38XzGl AWmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=XzcbIbIjJxWYB1FT7VpeLNoZ8jMBhFFxl9MPY5fbVW0=; b=OkADVjxo5ud8i6+CdW3reJlCg5Fu5SfpT4GwQx3gvh/HSHH4MBFYq/idXrNBa7ahFe r3Dn5wThas6J+3gJ0wLYTjNWVpEGGZH9CpfGCOcuXQ6E7tstvD2rlKnn3081EZlFDPKJ cmx/x09PVyQDf1Oo+6XCRKFBExHuQuCrZvClmNlldi/RpXEL1FJFiLEe0wZhsoFVXvyR P8P+kc9Ji6JZhAWuVEsg5NqOzp/frWNBvNS78KifB8pf7gKULZN5MirgdMdkMXbPY4rZ KzzlUNy3LLu7yaXUWid8o04vBiJcabt2bKk3sb2GWndVDrjgjzX4efzcZ6Feiou+NHLL 9ODw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IcNwWM6Z; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d25si2810198pgv.468.2019.03.03.06.01.41; Sun, 03 Mar 2019 06:01:57 -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=@gmail.com header.s=20161025 header.b=IcNwWM6Z; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726346AbfCCOBR (ORCPT + 99 others); Sun, 3 Mar 2019 09:01:17 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:44674 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbfCCOBQ (ORCPT ); Sun, 3 Mar 2019 09:01:16 -0500 Received: by mail-qt1-f196.google.com with SMTP id d2so2507038qti.11; Sun, 03 Mar 2019 06:01:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XzcbIbIjJxWYB1FT7VpeLNoZ8jMBhFFxl9MPY5fbVW0=; b=IcNwWM6Z+798YB4TvVkCZcaWBgf+I6mZ/BupHRlPaZxAF+UZ/ok4zJjnYeXZe541GU 5Fe0zoM7rE4zAKbS60kY3WYZuObafuHI1ahYA14N8Cq+vdzTTJ3PDdWrHYXd77xXWpX8 CFs9IVD9zRtWC++no/ensNLj1JUuTWSXsav9PVsYmrLf1nR8E3cvv1UR12OH8LZyOREK 5+hB7/bPN1ZtGzspiKQr4NCM88tTK/YFwfjL1MznmSabV7DKvhnqCX6/AXOV5Bvnd67g Nj9Bp5gFsVo/r1FzABhz7/Yt+iJtQ4NWlxcFQ0yGMgnLfbjFZrQ5rirEWdRGGz4+W7l8 wnSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XzcbIbIjJxWYB1FT7VpeLNoZ8jMBhFFxl9MPY5fbVW0=; b=UR0ciYimNGx9sQisLvfnt3oS4lHvjbCKn5hYIkm4YggcWy1uDiebZqxGOSehwfx37D /GiEdFJHErKO8V2Tt/87uOFIQe3V6KjTv35ijfixRLQq8Okw8Q78PhV6fgvCVqxtlwPn 03hin2ixX04WJR3t51oHd52jOB61PtZ2Kxoiq33jiEkq0/HoRGZl86uPhWXI0YSKX83p U0Ean61USE6uxWgOxAM4u8x/h3g2I77PoN7oAOSY4nXHGjZX9Hfgjw3VabmPl9LebxKO j+gRLrb5Y5SsIz7wua9wIghbnThB6Oo4rHTCh7KBaALSjKPVebRsO1aTDAkJPGyumd4H EheA== X-Gm-Message-State: APjAAAW2msgHI/QGDplDSnmPFyEhvDZZv7zcniGodGtKH5rRUalGeUBc iLxLqq7V6bH4WLGqzEWZ6Tk= X-Received: by 2002:ac8:1735:: with SMTP id w50mr11343081qtj.361.1551621675023; Sun, 03 Mar 2019 06:01:15 -0800 (PST) Received: from renatolg ([186.220.23.48]) by smtp.gmail.com with ESMTPSA id j139sm2067799qke.26.2019.03.03.06.01.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Mar 2019 06:01:14 -0800 (PST) From: Renato Lui Geh X-Google-Original-From: Renato Lui Geh Date: Sun, 3 Mar 2019 11:01:09 -0300 To: "Ardelean, Alexandru" Cc: "lars@metafoo.de" , "robh+dt@kernel.org" , "Popa, Stefan Serban" , "knaack.h@gmx.de" , "jic23@kernel.org" , "Hennerich, Michael" , "renatogeh@gmail.com" , "mark.rutland@arm.com" , "giuliano.belinassi@usp.br" , "pmeerw@pmeerw.net" , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "linux-iio@vger.kernel.org" , "devel@driverdev.osuosl.org" , "kernel-usp@googlegroups.com" , "devicetree@vger.kernel.org" Subject: Re: [PATCH v4 4/9] staging:iio:ad7780: add chip ID values and mask Message-ID: <20190303140107.ljjo3flatwmd44ya@renatolg> References: <90c573cd53bb54d49de6ac270bcff66880ccfeb5.1551358569.git.renatogeh@gmail.com> <190e26b19b8ed6559b92d3a000d852bbb0099a52.camel@analog.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <190e26b19b8ed6559b92d3a000d852bbb0099a52.camel@analog.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/01, Ardelean, Alexandru wrote: >On Thu, 2019-02-28 at 11:24 -0300, Renato Lui Geh wrote: >> >> >> The ad7780 supports both the ad778x and ad717x families. Each chip has >> a corresponding ID. This patch provides a mask for extracting ID values >> from the status bits and also macros for the correct values for the >> ad7170, ad7171, ad7780 and ad7781. >> >> Signed-off-by: Renato Lui Geh >> --- >> drivers/staging/iio/adc/ad7780.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/staging/iio/adc/ad7780.c >> b/drivers/staging/iio/adc/ad7780.c >> index 56c49e28f432..ad7617a3a141 100644 >> --- a/drivers/staging/iio/adc/ad7780.c >> +++ b/drivers/staging/iio/adc/ad7780.c >> @@ -26,10 +26,14 @@ >> #define AD7780_RDY BIT(7) >> #define AD7780_FILTER BIT(6) >> #define AD7780_ERR BIT(5) >> -#define AD7780_ID1 BIT(4) >> -#define AD7780_ID0 BIT(3) >> #define AD7780_GAIN BIT(2) >> >> +#define AD7170_ID 0 >> +#define AD7171_ID 1 >> +#define AD7780_ID 1 >> +#define AD7781_ID 0 >> + >> +#define AD7780_ID_MASK (BIT(3) | BIT(4)) > >This also doesn't have any functionality change. >The AD7170_ID, AD7171_ID, AD7780_ID & AD7781_ID IDs are also unused (maybe >in a later patch they are ?). They aren't. I added them following a previous review suggestion. Should I remove them? > >I would also leave the AD7780_ID1 & AD7780_ID0 definitions in place, since >they're easier matched with the datasheet. > >> >> #define AD7780_PATTERN_GOOD 1 >> #define AD7780_PATTERN_MASK GENMASK(1, 0) >> -- >> 2.21.0 >>