Received: by 10.213.65.68 with SMTP id h4csp397731imn; Tue, 27 Mar 2018 01:02:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELuq719VNUILISrX1oYAGT4Iyv72+bLjunueQRGaK74i/pG8LBjxZ8y9EWzb08YLAitVygUp X-Received: by 10.99.127.27 with SMTP id a27mr30135757pgd.18.1522137778600; Tue, 27 Mar 2018 01:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522137778; cv=none; d=google.com; s=arc-20160816; b=Js6r+6Vqmf0WEO3ByxICHpu/hswWiput59s2PuzZ8kNeHthcLVsbenL5qDZ+BynW3f Z6THj9Fisi6HaAKFm3vbz/ZD8kz4YVTKu27/s+ZVppQ5JqO01hcaGBD1T6z6D/eRxK84 RIpB6ODD0MAIH8M3L+pv/pVnDviZG3yj4hfFtr42/Ysd/3bRPq7PdEXNezP7gJ0YdVND jqZLv8qFN7fubA4YhwxfJhv+oKa/VZAWu9RHYm9S+nlIezwkeq4qsKmCXZRzbazLIEhn cZTBNNtuXh1dTlmze3J0Sc/x/g1hnIRgWXEwK1OOXcCdIyNaihzKhNuGO0c5Wa1Afkfe /VYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=sXLM6BKDi5OV4K2omXRvxob0MsxUQ50sjE9//LeCiHI=; b=i6t5CnjPLni3Sw1jQlS2EXqnpz+9LUd1ZfEqRUt5EvLyJYvJ4oJHk4wZAMsyodAJIv W4lPzHgjdxo6xwII2dpwWZe6rFgJAFec8PqjvbcIzlgziyv/lyDKdyf7B2xt1MaYhHfb QmbU0/KcD5/HVVl4HalZi0e6QDifdyTnS72cQ74nPEKzvVGRbTJCl6S0hSmbWLrA17l0 2eaQh37wtKFWmBd+kVxUrenJprhmBGecAgZ6bQJHHiXnkFwoeILzpTkX3tNTTnINbvgD R6Xt+RV5izTR2w4hClHaD6T+5a0m5ihwaaEXyKo0wVV1A4t8+2qvD8uTJDsYmWJymlkF ntmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axentia.se header.s=selector1 header.b=cbKEHhz0; 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 v10si382296pgf.833.2018.03.27.01.02.43; Tue, 27 Mar 2018 01:02:58 -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=@axentia.se header.s=selector1 header.b=cbKEHhz0; 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 S1751072AbeC0IBl (ORCPT + 99 others); Tue, 27 Mar 2018 04:01:41 -0400 Received: from mail-eopbgr40138.outbound.protection.outlook.com ([40.107.4.138]:9456 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750917AbeC0IBi (ORCPT ); Tue, 27 Mar 2018 04:01:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sXLM6BKDi5OV4K2omXRvxob0MsxUQ50sjE9//LeCiHI=; b=cbKEHhz0coIsVvtaBdKwKUnt+VtaKQnfbwuENNScKrJfzwHeZbgeE5WRULB3S3nr4E/7JWDOcKbs9uIOdLz5UgKI3ZWQT6zY70bgAu2sBzYMUxLQrVqLRDqDvHbhefYRgv9FgYSBy9ELmjhu6J4Ek8gcnKQAvCSRNcbX+dizhcA= Received: from [192.168.13.3] (85.226.244.23) by DB6PR0202MB2776.eurprd02.prod.outlook.com (2603:10a6:4:a8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Tue, 27 Mar 2018 08:01:31 +0000 Subject: Re: [PATCH 2/3] dt-bindings: iio: wrapper: add io-channel-unit-converter To: Rob Herring Cc: linux-kernel@vger.kernel.org, Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Mark Rutland , "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Linus Walleij , Randy Dunlap , linux-iio@vger.kernel.org, devicetree@vger.kernel.org References: <20180319170246.26830-1-peda@axentia.se> <20180319170246.26830-3-peda@axentia.se> <20180326222326.sxdeawy5x5bjkla4@rob-hp-laptop> From: Peter Rosin Organization: Axentia Technologies AB Message-ID: <986a7404-e157-6a1b-0610-07d1e127465f@axentia.se> Date: Tue, 27 Mar 2018 10:01:28 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180326222326.sxdeawy5x5bjkla4@rob-hp-laptop> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR0402CA0011.eurprd04.prod.outlook.com (2603:10a6:3:d0::21) To DB6PR0202MB2776.eurprd02.prod.outlook.com (2603:10a6:4:a8::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ddd3af20-2f6c-446f-6c65-08d593b8f49f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(7021125)(5600026)(4604075)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020);SRVR:DB6PR0202MB2776; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0202MB2776;3:+zT63om5JeW7ie0IR/gkUxv5xIjGhOztRfWuU9YiDmxjHkLHo7/1EkL0ZK9pJbCG7Bv8k25PlXL+IUuBCy2JTJTIxVeyv5JAxzgAaUtdD72YqxMy+vOBL7Yl9tFGAfaXQLXsO6BnlAUkn/T3gh+usdJa4yWEw9vjKTf5HImDMiqKaPr4wj1h30wqXZ2xqg9rX3ai9QoJqbmd2LvfzQcLfdyH+5SgUAA6+3Q+ZJeFMPOKTkfbGTFLOHEuI1SW81Fr;25:xHfGxTRyopUhJRnrrfJ6Nor9bPngsNgtXeJzZfQ8233vox9Q9OhMB3Mp5uu4rifICPUFwrXljfGwKgf03m4Ilz95BvRXN15X5fBcRbd4ydttKilOPRKfKPNMiriMqO7XMLroQ5jCs+zwCdLvlEwyLqs0KRKdmzrUDsfDAK551hinH4TmMJZZvKHH6wRD21qOvpZUiKL0vwig2JZpeFDNqVjucylgkcnbfTvWPMePOGO0PvCpxY8EhV8jBMM6Qe7o1VNKQDGJkMBSLSc59XkZL9oJ7zctUyE76OI4Om7NQ6hUWTwEhMOTm13pVfcvp0J5gXzbvKrPVsuZUxly8I3tdA==;31:x54wbchsHI1zA/4vEpYTudP+AJKTjNtU02MEaBgCxPB4EosmO51MZHQJYxHLHf8MAD1NGZvYTbxsZtke8tvwg9xeE6HLtoinT9gjfTHnro3DdrVCp7ET120VSxhbZgJJtlsCXdCYmAWD26YoG/Cz4SutjyK1fuw0ogh+8onno1rzefZCiw7PIcX6kr2K+EtXB0yLmmvbckAxJAtjCV2GeCUNVK9FBsqhM12+DtJMbek= X-MS-TrafficTypeDiagnostic: DB6PR0202MB2776: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(191636701735510)(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(3002001)(6041310)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(20161123562045)(6043046)(6072148)(201708071742011);SRVR:DB6PR0202MB2776;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0202MB2776; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0202MB2776;4:WD735xceBxMM3paZnI8IRZG9InrzyzL1qxx2NvDsjF1//RvSCki3Kpwm//hs39WKhJeOlG7wX/1atRSCvpuKnfXKAJbepXES4cgIm9FMQTmz0PqRAv9PUdotglvNMPVkChPp6lGkiJsV4NrSXlSDITnAHX6O5Hq3WqlmKDwxAoNp9rZAc7eHJDAYnc3uuteOIUIKH0vynaE/9dsSZ57/bJCN7qp9An8sxGFKxyPxM2/wIR5Eis7hqG5Iv8Uaz+zYPef1h+ww4zbC+fm4cxPWO0ExJ4yy7d5CmxyKRFBeFM7hh04stZG/QXb5Pr42aFAyxTrUWF3WZnaDflhZVUkYejsQlLTCxUP75+rzgdgoAUk= X-Forefront-PRVS: 0624A2429E X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(39840400004)(346002)(376002)(39380400002)(396003)(366004)(377424004)(199004)(189003)(85664002)(6246003)(77096007)(230700001)(52116002)(23676004)(6666003)(36916002)(31686004)(3846002)(50466002)(2486003)(4326008)(52146003)(26005)(478600001)(6116002)(3260700006)(2906002)(5660300001)(65826007)(25786009)(31696002)(6486002)(486005)(486005)(76176011)(7416002)(956004)(2616005)(316002)(74482002)(53546011)(117156002)(6916009)(16576012)(386003)(11346002)(64126003)(8666007)(53936002)(6306002)(7736002)(5890100001)(68736007)(446003)(65806001)(97736004)(66066001)(47776003)(36756003)(8936002)(86362001)(54906003)(105586002)(65956001)(81166006)(8676002)(58126008)(186003)(966005)(81156014)(229853002)(16526019)(106356001)(476003)(305945005)(15866825006)(42262002)(422495003);DIR:OUT;SFP:1102;SCL:1;SRVR:DB6PR0202MB2776;H:[192.168.13.3];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjAyMDJNQjI3NzY7MjM6RG55NlYyeWVRQUc0UlB3dGNUUnoyZUlL?= =?utf-8?B?NDU2N05PczdzeCtVangzNTJOQUhaRU1MVmRXdTFoS2p0OEh1YUsvQk5qRit6?= =?utf-8?B?NFRNM2k3ZXhPSHh1VllxRWp4akJ0bWZ4Y0MramQxaW5UVE5TeTBWM05TbzY0?= =?utf-8?B?c0FHVkJ4bWdVTGR1VG5CbDJhNm9SSkFaSnNHcjQ0V3JlUEQyeWJJNmgxNFZ3?= =?utf-8?B?ZDIwOXNRZ0ZuYk5kMDk2RmF4N3lJSEo0MkUxTVNTZVgybWMrWHcrcTlEQXZC?= =?utf-8?B?N0hkNk04bVpyejBPblNrUFFqSFhhVDQxVjVFTEFycno0bUIwSDFuemFLVks2?= =?utf-8?B?amJ0VE12dDhuVVRLbkcycGpZa3M1MHZYTTNoc2Q3UkFhU0pGRG01RkYyc2E3?= =?utf-8?B?Y2RBK0VDSGNMQk5zbng2d1BFZ0xCeWZzVE0zQXdEVzZLUGpBUlpEdU5VWFJZ?= =?utf-8?B?WlkvdUxHLzFYKzFlZ1VpN0lXajVuR3FTbEM4ZTRZNG1PYkJOeENwZFMxeFFK?= =?utf-8?B?N3U4L04xU0NyaFh6OGFHczNmN0szTW1McmlpMmQvQXZNNjhZRXlZcWN6amlJ?= =?utf-8?B?WUhlSE9jYUZuT00zcHBSelYrYTY2UnBpUUxJWWlZaDBRajZrRklNMmEwaHM2?= =?utf-8?B?MTJlclJYTHdMS0RWSnp4RGF3U0VJQkJTUEhjL1N3T2dzYU5FdlFlMUxhSXpv?= =?utf-8?B?NkhPWHBHc0VFRWt3ZzYxWmQ4RGM3S1RvQjJCeUJIY1cvM2R3T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rQdEAHOWtW0iQHoA8xbbhtnqD X-Microsoft-Exchange-Diagnostics: 1;DB6PR0202MB2776;6:eBePYfiAItrgmVgKL8PYjmpoQpyDRyy+84kxyHqj722E8RJ1gx339lrgxQE5r+kykNGmR6iwdByy4BMfoXwIwF1SaWB1PSPPcqHOe0jqC9PqiFvJieqLi9IQlX6dH8w2B8LWZ/yUUihQk1g6bvw/9X1ZaN53kN6Eo40y3EEnbEpMW47FOyb94l6v5Zv+Q3bZE/D+XJbWau7FpTlUdOfc7bnOpGltYPIefviyW58KHTO/uqM98ww2kTPSEGSoogWkRLzeWI51yB28mNDdVLiYFdXjgpAILIRv1UiAij3V3Dr7EHc1UZwCyqR1g3dKyn7EFnQjVux3ak0QALkNABluc5ds7q4jMuSBKt6fKawryKSaBQhSD+Rv8uZPyh8dkACgWCTnCcgepEQqyLk+190JAukRkpKm7jaT4LoV+6/EESUdeysUeHSOkNEVk02tl3E4tXt3t6rV3lYS6LeB5s+lFQ==;5:pehvCslEdbz0h+F+M4ETA+uS88q/X7pRUKL5shbMsGHMQXzukmyBOGlJ5uQae595W4QXg+sTD/H6csv4qIQ8WKZvVrhdDMrFdWJgJCGL5r6yxcQ7hBBjjVh4T0ceVp89NeULvkRVg6x3jDpjIonh9JdctnPkHDtGI7sxQ6AhdwY=;24:RiA9p2u5EXx1gi0q5lBQrs8Y/1PFmLaIauIJUAqwFBpgIA+O8xkhCKqLaENt/7OIc6+uSUUfoFAOY5uYi625olXaWV96wwrlXctkzKxtBXg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB6PR0202MB2776;7:k8/gxTXGGlbObHsNf1MubXDrruGI3N6Ce4sZ8AtiJp5lzNruhLHYz7pjwKfgb8zZPucnI3fkIRvFC7+QbIPa2se3q9v/czpcrIOM66Wsd9vtTV1aEfHLpgpEGkz7sW4JzzApbTl/6ZmxTfo9cKnnCt7sHGMjZs4pUgbxSneU8FkfIhLWZtf41uxKvMIewzpy8JJJm5ew8lQT5dRBtZPk1pRyDTtxoYGUXxtOSDNV25SfxlX1aJHiwtRLwga+Qu5Y X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2018 08:01:31.8741 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ddd3af20-2f6c-446f-6c65-08d593b8f49f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0202MB2776 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-03-27 00:23, Rob Herring wrote: > On Mon, Mar 19, 2018 at 06:02:45PM +0100, Peter Rosin wrote: >> Allow linear scaling and modification of the type of an io-channel. >> >> When an ADC channel measures the midpoint of a voltage divider, the >> interesting voltage is often the voltage over the full resistance >> of the divider. Likewise, measuring the voltage over a resistor is >> often a way to get to the current through it. >> >> This binding allows description of such hardware which is external >> to the ADC. >> >> Signed-off-by: Peter Rosin >> --- >> .../iio/wrapper/io-channel-unit-converter.txt | 84 ++++++++++++++++++++++ >> MAINTAINERS | 6 ++ >> 2 files changed, 90 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/iio/wrapper/io-channel-unit-converter.txt >> >> diff --git a/Documentation/devicetree/bindings/iio/wrapper/io-channel-unit-converter.txt b/Documentation/devicetree/bindings/iio/wrapper/io-channel-unit-converter.txt >> new file mode 100644 >> index 000000000000..23af661abe32 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/iio/wrapper/io-channel-unit-converter.txt >> @@ -0,0 +1,84 @@ >> +I/O channel unit converter bindings >> + >> +Allow linear scaling and modification of the type of an io-channel. >> + >> +When an ADC channel measures the midpoint of a voltage divider, the >> +interesting voltage is often the voltage over the full resistance >> +of the divider. Likewise, measuring the voltage over a resistor is >> +often a way to get to the current through it. >> + >> +Required properties: >> +- compatible : "io-channel-unit-converter" > > Would this apply to something besides ADCs? Not that I can think of. At the moment. >> +- io-channels : Channel node of the parent channel. >> +- io-channel-names : Should be "parent". >> + >> +Optional properties: >> +- numerator : The parent channel scale is multiplied by this value (default 1). >> +- denominator : The parent channel scale is divided by this value (default 1). >> +- type : The type of the wrapped channel is modified to this type. The default >> + is to use the same type as the parent channel. Recognized types are: >> + "voltage" >> + "current" > > This seems overly complicated for just describing a couple of resistors > on an ADC. OTOH, keeping the ADC node and what's attached to the ADC > separate > > Perhaps the type should be part of the compatible. For example, if you > have a current measurement resistor/circuit, then the compatible should > be based on that. Is a compatible like "current-sense-circuit" too long(ish)? Is a vendor prefix absolutely required? Sure, I can use "axentia," because we "implemented" the circuit this time, but it seems like the list can grow very long if we should add every vendor that may use something like this? Something more generic would be good for something as simple as this IMHO. I propose the compatible "voltage-divider" for the other example, but I have the same issue with the vendor prefix. Even more so in this case. Then the above type can be inferred from the compatible. I suppose I should write the above two bindings as two separate files? >> + >> +Example 1: >> +The system voltage is circa 12V, but divided down with a 22/200 >> +voltage divider to adjust it to the ADC range. >> + >> +SYSV ADC GND >> + + + + >> + | .-----. | .----. | >> + '--| 200 |-+-| 22 |--' >> + '-----' '----' >> + >> +sysv { >> + compatible = "io-channel-unit-converter"; >> + io-channles = <&maxadc 1>; >> + io-channel-names = "parent"; > > parent doesn't seem to describe something about the h/w. Extrapolating from your first question, you are thinking "adc", right? Cheers, Peter >> + >> + /* multiply the ADC voltage by 222/22 to get the system voltage */ >> + numerator = <222>; /* 200 + 22 */ >> + denominator = <22>; >> +} >> + >> +&spi { >> + maxadc: adc@0 { >> + compatible = "maxim,max1027"; >> + reg = <0>; >> + #io-channel-cells = <1>; >> + interrupt-parent = <&gpio5>; >> + interrupts = <15 IRQ_TYPE_EDGE_RISING>; >> + spi-max-frequency = <1000000>; >> + }; >> +}; >> + >> +Example 2: >> +The system current is measured by measuring the voltage over a >> +3.3 ohm resistor. >> + >> +sysi { >> + compatible = "io-channel-unit-converter"; >> + io-channles = <&tiadc 0>; >> + io-channel-names = "parent"; >> + >> + /* divide the ADC voltage by 33/10 (i.e. 3.3) to get current */ >> + numerator = <10>; >> + denominator = <33>; >> + type = "current"; >> +} >> + >> +&i2c { >> + tiadc: adc@48 { >> + compatible = "ti,ads1015"; >> + reg = <0x48>; >> + #io-channel-cells = <1>; >> + >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + channel@0 { /* IN0,IN1 differential */ >> + reg = <0>; >> + ti,gain = <1>; >> + ti,datarate = <4>; >> + }; >> + }; >> +}; >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 96e5503bfb60..5dd555c7b1b0 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -6884,6 +6884,12 @@ F: drivers/staging/iio/ >> F: include/linux/iio/ >> F: tools/iio/ >> >> +IIO UNIT CONVERTER >> +M: Peter Rosin >> +L: linux-iio@vger.kernel.org >> +S: Maintained >> +F: Documentation/devicetree/bindings/iio/wrapper/io-channel-unit-converter.txt >> + >> IKANOS/ADI EAGLE ADSL USB DRIVER >> M: Matthieu Castet >> M: Stanislaw Gruszka >> -- >> 2.11.0 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe devicetree" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html