Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp635831imc; Sat, 16 Mar 2019 11:03:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqySXHM2+7T6OiyIFNQr+SagjZ18d3ttQU7M43KQNPPrXIko9v4ASBTZY+L9vY4AZIUps0KJ X-Received: by 2002:a63:eb56:: with SMTP id b22mr9527945pgk.287.1552759381783; Sat, 16 Mar 2019 11:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552759381; cv=none; d=google.com; s=arc-20160816; b=AcZVm339rawY3ZT8ceT73FSYFN3P6xJuHYDdM3lxlNBfS1eT/prRy4xPg6F80gNDT6 NaG/TAq0JBcDCudlzFOfvydJMSTgZD9U10kO4+4oGCecepoDlmZsyYgR+oBFvLFXB6P7 K7IrjzF+ys3g9UQNv2HY27p/BZ/U7gHuf37sosZyAeUf2IV5ok/qTPwIGQwD1X7WuZ5i e+iptq6pbvvylU+qoL9eJWsUdRzY+5FhujoM221rasuWuRZzPw8/Te3Mjx+NI64ZpC5+ HFgh8IonFLJ1aal/nyuL7rkBtSOs7/Ej8p6d8Q81XeKHT4qLQQwcVq5YqKOWwYZo/kar 0SmQ== 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=h+gUKhwKCFOZFX7/srcmRC5p/T5xePEafxCnynXEsaM=; b=znSq6biWCUaef/wHrPviQZf4OIDq05Fpda6/HKiax3gTlTrajAoTW1/3hM4oljA3a3 jUX+60KPYeCiOQsbTPeX+KQUPLecgAcb64viF2uQpMMSZnmJpgTOuVlfAXkXURfh93xN LhOoATm4oY5VucY5OpznWHrecYmOGPBtnJ0r3StVv2dY8SHeOHKbWHu2EkJclIVtUxus dEtqEpnh6jRYUcD1jZ73nq+LiWKggTKTxhcO5iwHoIrYyQBWD7hWr0BC3E9OaF7LcvH0 5cjMELAo9pDjah/sZjAOFrLLYoXcq8w9wHFq7pdfLKUrcN7afpXjSHNLUw9I6tVC+O0y +mxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nVhc5Txv; 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 u21si4801363pgk.295.2019.03.16.11.02.46; Sat, 16 Mar 2019 11:03:01 -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=nVhc5Txv; 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 S1727230AbfCPSAu (ORCPT + 99 others); Sat, 16 Mar 2019 14:00:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:35892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbfCPSAu (ORCPT ); Sat, 16 Mar 2019 14:00:50 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (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 1A7C4218D0; Sat, 16 Mar 2019 18:00:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552759249; bh=EIRRMJOSKE2TTGtwsZWi5d00hSsrcDSmfBo9LBUbjrM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nVhc5TxviBhM/XmfDhRR3jhgF+xtHAQQqCT5VvwFzZM+IIDmPYMvpBAXk0HHdHhK2 0S553AnHjQxeveZcs8B4BeLMAHOdkVSM42Vrm9xKddfPfCv4g1zsKWQoY0/+LGcEU/ JoSUQwaOueyeY77pW6b3Pns0gHojCwHnQIcNZrB0= Date: Sat, 16 Mar 2019 18:00:42 +0000 From: Jonathan Cameron To: Renato Lui Geh Cc: lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, stefan.popa@analog.com, alexandru.Ardelean@analog.com, giuliano.belinassi@usp.br, robh+dt@kernel.org, mark.rutland@arm.com, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com, devicetree@vger.kernel.org Subject: Re: [PATCH v5 06/11] staging:iio:ad7780: add chip ID values and mask Message-ID: <20190316180042.369d55e6@archlinux> In-Reply-To: <8154410f6c1b6cdde21cfb781dbc2088f5c91d21.1552700652.git.renatogeh@gmail.com> References: <8154410f6c1b6cdde21cfb781dbc2088f5c91d21.1552700652.git.renatogeh@gmail.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 Fri, 15 Mar 2019 23:14:27 -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 I'll admit I find it hard to summon an enthusiasm for this patch, but it does no harm and I don't want to delay the following ones. Hence applied anyway. Jonathan > --- > Changes in v5: > - Put AD7780_ID{0,1} back > > drivers/staging/iio/adc/ad7780.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c > index 94cb60c327d0..977b381c1260 100644 > --- a/drivers/staging/iio/adc/ad7780.c > +++ b/drivers/staging/iio/adc/ad7780.c > @@ -30,6 +30,12 @@ > #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 (AD7780_ID0 | AD7780_ID1) > > #define AD7780_PATTERN_GOOD 1 > #define AD7780_PATTERN_MASK GENMASK(1, 0)