Received: by 10.223.176.46 with SMTP id f43csp1253033wra; Wed, 24 Jan 2018 13:16:23 -0800 (PST) X-Google-Smtp-Source: AH8x227hVTtCr6wMzntAxkLjWP5nMCrYrRDCoPmBOFta1ulrk2Qg7CwXtY1AwVssTgGuLPfnedE8 X-Received: by 2002:a17:902:4181:: with SMTP id f1-v6mr9304977pld.59.1516828583400; Wed, 24 Jan 2018 13:16:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516828583; cv=none; d=google.com; s=arc-20160816; b=ZT9eL0ul3uEbWaeclmntTU2DaQ1iDjlGJKGqAtYdCbDdotLKR5SJ8fomJk0trqwqCn i3pH+DmT7sDOLwYwlCumrJbf4cvVzo49OJtnURQva4FAc+yERyPUQRq/2yXxKEhBVZx7 M+aXgq8/37AlYyYrpESSDwheuLJ2X69ECUqRcHnzUCiunNJf5jCnD40Z/hfn+WUih/j/ ID0AjcyHaUrUdli1MGlKx6egL0MoZ+Q/YDpr3PLSl1W4F2DERXYKorVXW3kmvzdQE0al uNvJVL5VKb9x3Bkw5WqqNvu0WuemdmCYpEJi48xusQuiW5XpjDKzFNxxIvVFxqg5cvaw OKOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=8p7z9n2esrsITLMrlz6Km6d3G/Yr0nWNOmgXXqnISH8=; b=QPipO2/rMO+hOHL0sEFk5qUDqaWOzq4SN0Cw7u+BBdZip9XktPt5U81jeCHQ/RZ8GR 0Tfv/VAGiKsHo1KQ+VHmEYm/rzoGSSKkoODGmlawLiZ/vnaN4zv4AjBEQ6pvzAyyJkh6 dVjBrc/Cs3/hiFs/kw1LUxrBKwHcFFLh2/pEtw1+u9RMQc8CXLODLVxTLXa00FOV2Gvm yScyNskl3R7JEhR6okdP7F9XYdDB2l3IW5+R7JyDgVRGGkJ8aKIbpdMwICDclF6M/sf9 YUDt5+mgdCcQKsjUtRCM6sh1NC/kexDKjarEFoLwezCbw4qqJM3vb3Gl0akJqO2H77UO iBbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dk+jAV6W; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si772628pll.411.2018.01.24.13.16.09; Wed, 24 Jan 2018 13:16:23 -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=dk+jAV6W; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932629AbeAXVPk (ORCPT + 99 others); Wed, 24 Jan 2018 16:15:40 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35352 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932238AbeAXVPh (ORCPT ); Wed, 24 Jan 2018 16:15:37 -0500 Received: by mail-wr0-f193.google.com with SMTP id w50so6677wrc.2; Wed, 24 Jan 2018 13:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=8p7z9n2esrsITLMrlz6Km6d3G/Yr0nWNOmgXXqnISH8=; b=dk+jAV6WMjAyLCzVWiAD2GGKMQyBmp5TMbQTUOFDDNu8FSmuI+ulhk1LnnqGS/jr5V fcnQ7Y6hmLL9ZHEtTf47Byaz3wJ7ubs3Ks1fc6g52hFgHSbgY+Y/a9Jyirb3t18XUnpG BZNjKs0YkOkNuanH0qRY4nrJb2ATLE03ZIB55pEFFGdx20ckCAvdjeHSwU66WxHgvucS xFWYxaLWcU6vRYnjzMddkaiarhU2nsJauRkoOrhLSbwDXpa3wT5L14fPy0x2o7p2Ju2N pwH34iM9jKUiTGyTqQvKzy0c6g3kFAJ/8PSJJ0VOQwj4CByDl7RuNmQGcDa7jMgw3F96 0JyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=8p7z9n2esrsITLMrlz6Km6d3G/Yr0nWNOmgXXqnISH8=; b=SQhBGlwbttXFDaV4ybSN9OcRWH9IGRCHi1cH2yfz2PpstvPx2TdAPWX3IGOpm6Lbib tukYlZiLI4gPX0Ogf9TRvDTEUsFBGco2QYzRzClaJqS984ZzFPzW7erXmon5usjKNT81 WvXCJPawwSjIkCv7sN3aarfFot6cQXhnnmVd46G5FYTimQz/N3iP4PNYvLjCZurVgeal DE5GBJbCGsYCDfgbJsNec3o3rtzM26N+FmFqE6Z42CMjeA3YR7kfuB8d0Yyr8D8ghsfa S+MFnOyvwcQHpTR/FuJMJQ5SxRO+I+rKAOVJ7w/ra0PpeCchp8svLNN9jHkKI7Dqzp7e Do4A== X-Gm-Message-State: AKwxytc5aVTElk3Rx4EZYKIINrqbvpIunVXszggIy+Avj5eU5RrssAK4 EVKho5Ougb2p9+JAAOU6NVk= X-Received: by 10.223.179.69 with SMTP id k5mr7249667wrd.15.1516828535941; Wed, 24 Jan 2018 13:15:35 -0800 (PST) Received: from [192.168.102.129] (LFbn-1-8169-84.w90-112.abo.wanadoo.fr. [90.112.78.84]) by smtp.gmail.com with ESMTPSA id o98sm4476129wrb.19.2018.01.24.13.15.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 13:15:35 -0800 (PST) Subject: Re: [PATCH v3 1/2] iio: adc: driver for ti adc081s/adc101s/adc121s To: Jonathan Cameron 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 References: <1515961960-35157-1-git-send-email-milan.o.stevanovic@gmail.com> <20180121123926.429b7de5@archlinux> From: Milan Stevanovic Message-ID: <506c94b8-6b09-d029-e709-6f60de4cfb5d@gmail.com> Date: Wed, 24 Jan 2018 22:15:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180121123926.429b7de5@archlinux> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/21/2018 01:39 PM, Jonathan Cameron wrote: > 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 > Ok.. Thanks a lot.. I will add devicetree later Best regards Milan >> --- >> 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);