Received: by 10.213.65.68 with SMTP id h4csp359208imn; Fri, 23 Mar 2018 06:15:43 -0700 (PDT) X-Google-Smtp-Source: AG47ELvmg5XUtI+B/ljCtQMwf9VORwf76+KTBQrdL2MIhsWl4tWBu9iaais6LOHfL+UUt9XF9JE9 X-Received: by 10.101.76.207 with SMTP id n15mr21462368pgt.313.1521810943884; Fri, 23 Mar 2018 06:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521810943; cv=none; d=google.com; s=arc-20160816; b=WpQ99NdypSlBgwSreVNPoGxdbZpznyBqp1+zi6sLpPff8cLhPbHz7X+SzKzMunLKtW E56j3SlaCfK56Y3SwgVeSuSa1iqW9x0ocsQpIo8xUKOR5ZW3uq44uctzwRVPrDKQgcMN t1O19EylwDBFGyAextrhaZL0VZ9+lY/vxoupGn49cSq7Q6pdRmrzQToa7udViisuYRbx iCco7Dt9GGfp3/QSbfAvt/74NLMGSNYWR+ubVotIwoKC/7iUDvn5PkF4VVv4rcJTJkZ5 FZ8FYZer7Is0YwfPhKVfhh6UeVHC93DJj8m00f6QTwfD08gOI/vQSWW9dof+RGWOUTEC cnkQ== 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 :arc-authentication-results; bh=JWnYb/IAG1A/Lm89QhcTVFnPTumQmtwZbRmWWEaGN/s=; b=SAs6c3MpfQytNp+0EL2sYgl9nB4+aS3bQP6bY7fjsNWtHUTJo5DR7hB4g1TYQJn+Mn PEnnoukRpyR+2ug/FIwjhnf+LEgGkY4P1Q91J+wG82MPpviGin01x+gbArFfTnR4DtmT l32o7e80YZ6NAAqxdI7vIObI8x3ik9IKJN3Ot0W9iPVRdCoCOvNn0w4q1PodqlApW7Do jqxf2SoVqf3f8NEwtcRfyf7vnXi2odzC0vdS32VC3sGfSB8p1wzQ/MYecE3Mo9xrF9ks 6CXcLxalYZjrrBnHpwYSR0IGCxNiLXk2WyM+ikA8GviYeQDf0NpXu7Wx4Iq8H8iSXW9g IX4w== 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 p20si3421999pfi.345.2018.03.23.06.15.28; Fri, 23 Mar 2018 06:15:43 -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; 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 S1752331AbeCWNOc (ORCPT + 99 others); Fri, 23 Mar 2018 09:14:32 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6263 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751595AbeCWNOa (ORCPT ); Fri, 23 Mar 2018 09:14:30 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 1386FED3A18B8; Fri, 23 Mar 2018 21:14:14 +0800 (CST) Received: from localhost (10.202.226.45) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 23 Mar 2018 21:14:11 +0800 Date: Fri, 23 Mar 2018 13:14:01 +0000 From: Jonathan Cameron To: Peter Rosin CC: , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , "Peter Meerwald-Stadler" , Rob Herring , "Mark Rutland" , "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Linus Walleij , "Randy Dunlap" , , Subject: Re: [PATCH 0/3] iio: add unit converter Message-ID: <20180323141401.000031cc@huawei.com> In-Reply-To: <20180319170246.26830-1-peda@axentia.se> References: <20180319170246.26830-1-peda@axentia.se> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.45] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 Mar 2018 18:02:43 +0100 Peter Rosin wrote: > Hi! > > This moves the iio-mux driver to a new category, since I think > it will be the single driver in that category forever, and now > I'm adding a new driver that is somewhat similar in nature... > > But that rename is not very interesting, it's just reshuffling. > It's the new driver that I need. Specifically, I need to allow > linear scaling and modification of the type of an io-channel. > I don't know exactly how that is accomplished in the best way, > but this is what I came up with. > > The use cases are an ADC hooked up to measure a "big" voltage by > looking at the midpoint of a voltage divider, and an ADC used > to measure the current by looking at the voltage over a resistor. > > Comments? It is pretty much how I would have implemented it as well. Will probably do a detailed review over the weekend. Not convinced entirely on the 'wrapper' naming though. Will think about it... Jonathan > > Cheers, > Peter > > Peter Rosin (3): > iio: rename the multiplexer category to wrapper > dt-bindings: iio: wrapper: add io-channel-unit-converter > iio: wrapper: unit-converter: new driver > > .../{multiplexer => wrapper}/io-channel-mux.txt | 0 > .../iio/wrapper/io-channel-unit-converter.txt | 84 +++++++ > MAINTAINERS | 11 +- > drivers/iio/Kconfig | 2 +- > drivers/iio/Makefile | 2 +- > drivers/iio/multiplexer/Makefile | 6 - > drivers/iio/{multiplexer => wrapper}/Kconfig | 13 +- > drivers/iio/wrapper/Makefile | 7 + > drivers/iio/{multiplexer => wrapper}/iio-mux.c | 0 > drivers/iio/wrapper/iio-unit-converter.c | 268 +++++++++++++++++++++ > 10 files changed, 381 insertions(+), 12 deletions(-) > rename Documentation/devicetree/bindings/iio/{multiplexer => wrapper}/io-channel-mux.txt (100%) > create mode 100644 Documentation/devicetree/bindings/iio/wrapper/io-channel-unit-converter.txt > delete mode 100644 drivers/iio/multiplexer/Makefile > rename drivers/iio/{multiplexer => wrapper}/Kconfig (53%) > create mode 100644 drivers/iio/wrapper/Makefile > rename drivers/iio/{multiplexer => wrapper}/iio-mux.c (100%) > create mode 100644 drivers/iio/wrapper/iio-unit-converter.c >