Received: by 10.223.176.46 with SMTP id f43csp1792739wra; Sun, 21 Jan 2018 04:40:14 -0800 (PST) X-Google-Smtp-Source: AH8x2270ZAJgkS/t1pBdmvhSkuuYhRNu4no0KYJESOGaNZeGJiBDePB6bKYAeWq3LZWpSBEwi0NX X-Received: by 10.98.135.76 with SMTP id i73mr5105098pfe.183.1516538414258; Sun, 21 Jan 2018 04:40:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516538414; cv=none; d=google.com; s=arc-20160816; b=wcCycirHVFXoNApBZD+vgEI43aEWyfegTOfLFbwMGWsxEy3VCE5QKWlxQ9pcf5kSZc TqFs+7dqsDqy6hjnIysbcOPgvxHlRFJ/Blhmj1iu1WrxgPpaYdJ1GMUQzFyjYCbNgBAd 2EBG8awKvGQLAry1kGYpV7u6ZFsS4lEDmWhfvvMuZYXI7/camv1TfIxv+lYiDhzyUZSi spZLeb+w4K/x9glJaaYds8H4ADH1ovehXNxpGovp7sOvcepDoYESWN9S9+TcpY7/YbJ5 nPiOrKVpNMmHt83Q9OiYWAjt+cjx0o5NIFID+QYS1WF8mbZPUTjLgajaZoLzaicZujyF ucnQ== 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 :dmarc-filter:arc-authentication-results; bh=153W/wVx1wQQn13sut4baWEnrgXx0ud5dztB5cNKitE=; b=TVWIrHhIekWNx4M4r/xYPRbbZxbBj2zIOCe771dxkczgB73SwPKCme2fBJHI1zuDEN WKUvA4mdgxlDtJmm7PW2S4NjkVWgRY/yaPchBSdsavYNmgiO3Z3SSv23nLCbrzydhVBX ulTTgt5+tDf9EAhlOu/BRSb5/y1FNaVUeHn+V2zU9wnChn7Np0S9kuUc6zZXiTr5F/ND utAnCLwHG5RwJdG7zgm3V2UW5Lea1uJ6LcHJWvuT1Szc7K1FWj2qVsYNRu/PQexwOx2e 7iRT3zhV+Vz6wLbVJKXNCGzbQqGvDf0YdtfQWZVhyqV6QJlv9aSQ97OSw3VPkgrQVznD Eapg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l21si10785145pff.308.2018.01.21.04.40.00; Sun, 21 Jan 2018 04:40:14 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751281AbeAUMje (ORCPT + 99 others); Sun, 21 Jan 2018 07:39:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:48250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751019AbeAUMjb (ORCPT ); Sun, 21 Jan 2018 07:39:31 -0500 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 A236221778; Sun, 21 Jan 2018 12:39:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A236221778 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jic23@kernel.org Date: Sun, 21 Jan 2018 12:39:26 +0000 From: Jonathan Cameron To: Milan Stevanovic Cc: lars@metafoo.de, Michael.Hennerich@analog.com, linux-kernel@vger.kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, pombredanne@nexb.com Subject: Re: [PATCH v3 1/2] iio: adc: driver for ti adc081s/adc101s/adc121s Message-ID: <20180121123926.429b7de5@archlinux> In-Reply-To: <1515961960-35157-1-git-send-email-milan.o.stevanovic@gmail.com> References: <1515961960-35157-1-git-send-email-milan.o.stevanovic@gmail.com> X-Mailer: Claws Mail 3.16.0 (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 Sun, 14 Jan 2018 21:32:39 +0100 Milan Stevanovic wrote: > Add Linux device driver for TI single-channel CMOS > 8/10/12-bit analog-to-digital converter with a > high-speed serial interface. > > Signed-off-by: Milan Stevanovic > Great, applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. A useful follow up for this at some point would be to put in a proper devicetree table and document the bindings but not real rush on that. Thanks, Jonathan > --- > Changes in v2: > - Fix typo error > - Keep Copyright comment > Changes in v3: > - Split patch in two patches. > - Second patch is license description > --- > drivers/iio/adc/ad7476.c | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ad7476.c b/drivers/iio/adc/ad7476.c > index b7706bf..0ea0f90 100644 > --- a/drivers/iio/adc/ad7476.c > +++ b/drivers/iio/adc/ad7476.c > @@ -1,5 +1,6 @@ > /* > - * AD7466/7/8 AD7476/5/7/8 (A) SPI ADC driver > + * Analog Devices AD7466/7/8 AD7476/5/7/8 (A) SPI ADC driver > + * TI ADC081S/ADC101S/ADC121S 8/10/12-bit SPI ADC driver > * > * Copyright 2010 Analog Devices Inc. > * > @@ -56,6 +57,9 @@ enum ad7476_supported_device_ids { > ID_AD7468, > ID_AD7495, > ID_AD7940, > + ID_ADC081S, > + ID_ADC101S, > + ID_ADC121S, > }; > > static irqreturn_t ad7476_trigger_handler(int irq, void *p) > @@ -147,6 +151,8 @@ static int ad7476_read_raw(struct iio_dev *indio_dev, > }, \ > } > > +#define ADC081S_CHAN(bits) _AD7476_CHAN((bits), 12 - (bits), \ > + BIT(IIO_CHAN_INFO_RAW)) > #define AD7476_CHAN(bits) _AD7476_CHAN((bits), 13 - (bits), \ > BIT(IIO_CHAN_INFO_RAW)) > #define AD7940_CHAN(bits) _AD7476_CHAN((bits), 15 - (bits), \ > @@ -192,6 +198,18 @@ static const struct ad7476_chip_info ad7476_chip_info_tbl[] = { > .channel[0] = AD7940_CHAN(14), > .channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1), > }, > + [ID_ADC081S] = { > + .channel[0] = ADC081S_CHAN(8), > + .channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1), > + }, > + [ID_ADC101S] = { > + .channel[0] = ADC081S_CHAN(10), > + .channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1), > + }, > + [ID_ADC121S] = { > + .channel[0] = ADC081S_CHAN(12), > + .channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1), > + }, > }; > > static const struct iio_info ad7476_info = { > @@ -294,6 +312,9 @@ static const struct spi_device_id ad7476_id[] = { > {"ad7910", ID_AD7467}, > {"ad7920", ID_AD7466}, > {"ad7940", ID_AD7940}, > + {"adc081s", ID_ADC081S}, > + {"adc101s", ID_ADC101S}, > + {"adc121s", ID_ADC121S}, > {} > }; > MODULE_DEVICE_TABLE(spi, ad7476_id);