Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp748004ima; Fri, 1 Feb 2019 10:20:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Qgaps7WB2DMvzt2mVbdeEVqm3CgM+r7blYDxuNvOm6G4AemB+TuNs3Qz3/hAi8QA1hf/5 X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11mr41425944plb.332.1549045204542; Fri, 01 Feb 2019 10:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549045204; cv=none; d=google.com; s=arc-20160816; b=CZWGKt1ht/c7DvQuFa+ybB1m/hwLNlPfIu7aEyxq4FWNDucvczTnP2arKGboJizkNb F4d7UI1Qg9xFHS+3WZuG86undjRU0+RW9Xtzd8ki30s/d8FhOSJtqZHHiFzkSBMAiylQ E0qDM635QHpgstm5flT1HTlTVx+IKupufkhTPFBF/sIrJOymohjkCmHrMlrQwhLevhSM rmPCmmVVN8w7w1l/IIKjLLPyNi7uJmQbbVr38AGm8EMFA+O06mz7xqg7MqhT+RBu5oRo ZUjFlNUL/bZZp4ODzzunKlCCiVbY8K/0KVAUgwgrSjRsCt5trtZcMmpAcyzCz/O0CTEQ oVtg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=mJ7jNsfeOz0MY1JlVhpOEDzDLyvdTgVqAvz5ywe12Ok=; b=rPUriNE20GQFhVQ+OhBCDt0y5m8hJ8FPhflnA6u3NMdIwTlH4pkeKjjqzLA/d6OMc7 pwrcsik949YABvPbiZh8p3BIPDAfAvnJLphGoz8p9CajXb23H+7eHoWs8vOs7Ux+Y7wE x2hI0nrpfrOtE9as7xBYwcugNrUt9usbSZwE7rWDg1VeEzQNnqeDBifbzOauN1v+YPQg 2bSGTtRudE17BTvenCdVB1VrbykC4MkR8nYJyVs81i0RSnciO7QeuKb3FR0ySDzzdnDF lJchiVo7La+RY+0alkbthZbwBzOZ9n7SgAv7GRVNNGcCGR+nvHpikZA69VUDcv7LtnLF IFoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W96qr3HU; 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 j195si8689289pfd.165.2019.02.01.10.19.49; Fri, 01 Feb 2019 10:20:04 -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=W96qr3HU; 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 S1730356AbfBARzX (ORCPT + 99 others); Fri, 1 Feb 2019 12:55:23 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:41629 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726639AbfBARzX (ORCPT ); Fri, 1 Feb 2019 12:55:23 -0500 Received: by mail-qk1-f194.google.com with SMTP id m66so1191836qke.8; Fri, 01 Feb 2019 09:55:22 -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:content-transfer-encoding:in-reply-to :user-agent; bh=mJ7jNsfeOz0MY1JlVhpOEDzDLyvdTgVqAvz5ywe12Ok=; b=W96qr3HU5wW7Gw0J5ArhtS6msR9h5pTpwtfiZH5exkuHqLZusdeI68H84nUlwzCF76 XQO7Ib8p3RTGxOfTqzvJFKkt9d/tiPmoQLkkC24s7XD18CasxH6Az6TOLMTwv7VRBFg3 8GQamZZL+mV7AGr3GbLypiD0Q76R/lIJCqvu4VZTbU2Lf4zgdTzI0cY82ZuGqtZal5PR 1Ckkps1mIt5C3FC12dALcT4OmkjPdm85GiSiar1ztt94tj9I2eYcu3jPDbpYr3Pb+Vvh TrbFclFzeTEB49tDjjHIuon5mN25HYjV4jgse7aXU6r4KSkfoMlHOgUD9t/m+UKXLbMk 8v/Q== 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:content-transfer-encoding :in-reply-to:user-agent; bh=mJ7jNsfeOz0MY1JlVhpOEDzDLyvdTgVqAvz5ywe12Ok=; b=hUgRQMC3K/GsFdslNZpPGh2afjK7t16Gl/rqO+yQdm/PxVdmbdRO5PNfnfdUgfnx6u oRL9JU635omjGbVn9pkSbuUPPgKklJmsZll5U536BzukO2nbTJ2Exf9xg9Vay0Rke+OX 6O28uecLnTWtGzk7orZCbDKsHgd/3LM9KsvD0mBcZgT5pyPtE6MD1WtBjZKv2eY2fPDS gKxX9qfN63Uj4Dn0n1A0LrUICqhiUQ1kwrtYtBYPy4AP5YCEXK3agVlWMG/FiJx8rUdx Vkt9WTlwMu3TUfq1MebPIS/q84JhR+T34+I3knEd3fECJyWoiAUVWFnLnYtlkggW8VtK 3JDw== X-Gm-Message-State: AHQUAuZvooVdRoh5W7q9t+sgmb0oCjvhVpxDGqTBhqycgttIONxS7Xr2 w9+bKGnaLLxrOI3EGYbq19c= X-Received: by 2002:ae9:e90e:: with SMTP id x14mr3740603qkf.242.1549043721829; Fri, 01 Feb 2019 09:55:21 -0800 (PST) Received: from renatolg ([191.180.131.98]) by smtp.gmail.com with ESMTPSA id k62sm6133035qte.86.2019.02.01.09.55.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Feb 2019 09:55:21 -0800 (PST) From: Renato Lui Geh X-Google-Original-From: Renato Lui Geh Date: Fri, 1 Feb 2019 15:55:16 -0200 To: "Popa, Stefan Serban" Cc: "renatogeh@gmail.com" , "kernel-usp@googlegroups.com" , "lars@metafoo.de" , "Ardelean, Alexandru" , "knaack.h@gmx.de" , "linux-kernel@vger.kernel.org" , "jic23@kernel.org" , "Hennerich, Michael" , "linux-iio@vger.kernel.org" , "devel@driverdev.osuosl.org" , "giuliano.belinassi@usp.br" , "pmeerw@pmeerw.net" , "gregkh@linuxfoundation.org" Subject: Re: [PATCH v2 1/2] staging: iio: ad7780: add gain & filter gpio support Message-ID: <20190201175514.7kerqvuln4mrhinp@renatolg> References: <20190127203044.yytctplecwey4an4@renatolg> <1548850985.9460.23.camel@analog.com> <20190201145459.ukfzo6s4rvg4c5ri@renatolg> <1549036667.9460.41.camel@analog.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1549036667.9460.41.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 02/01, Popa, Stefan Serban wrote: > >Adding support for gpios, normally doesn't have anything to do with >the information stored in the iio_chan_spec struct. >Also, we need to try to work with the already defined attributes. In your >case, setting the gain GPIO is equivalent to modifying the scale, while >setting the filter GPIO results in a change in sampling frequency. >Therefore, we need use a macro which has the IIO_CHAN_INFO_SCALE and >IIO_CHAN_INFO_FREQUENCY flags set. I think AD_SD_CHANNEL should do just >fine. >I hope this answers your question. >-Stefan It does. Thank you. :)