Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755547AbcJTUuH (ORCPT ); Thu, 20 Oct 2016 16:50:07 -0400 Received: from mail-he1eur01on0099.outbound.protection.outlook.com ([104.47.0.99]:46336 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752658AbcJTUuE (ORCPT ); Thu, 20 Oct 2016 16:50:04 -0400 X-Greylist: delayed 5042 seconds by postgrey-1.27 at vger.kernel.org; Thu, 20 Oct 2016 16:50:03 EDT Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Subject: Re: [PATCH 0/4] IIO wrapper drivers, dpot-dac and envelope-detector To: Jonathan Cameron , Lars-Peter Clausen , References: <1476955562-13673-1-git-send-email-peda@axentia.se> <9b8c0789-566d-67a3-b4f5-dbe4c69f6932@metafoo.de> <8B9238AE-D53C-4A22-84CF-EC42FDA2DFB2@jic23.retrosnub.co.uk> CC: Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , , From: Peter Rosin Organization: Axentia Technologies AB Message-ID: Date: Thu, 20 Oct 2016 20:17:03 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [217.210.101.82] X-ClientProxiedBy: AM4PR0101CA0019.eurprd01.prod.exchangelabs.com (10.167.254.29) To AM5PR0201MB2308.eurprd02.prod.outlook.com (10.169.243.7) X-MS-Office365-Filtering-Correlation-Id: 92c795e4-eb9a-4ee3-9a78-08d3f9154d8c X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2308;2:nGeGh2p9Zs7rSgvgyfviWXaSpQKQnRl2qzNdWRSWzn/wOucVWw81C9QB2IMouYEulCQozs8UG/LqxMbyjjko12lavqOgzElXSdbiANm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ozrtZkbolPk4vVjYsOLTjXAIPS4P7wEHAEm9oW3Mj0sNt82Aj24ibf5HQHUkZvF4zvQ50DKMYKGLA6yIKxvwKqNVcz0QVDgI2/0= X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2308;31:+TDGXghKJlU5ikqN85iEnHUdmK+BD+tt82ZspVPM/QiRaVPkHALJAWtLDB5zicKVJm6Qc1FIvYdI9lUsAQRiHQxMO+MArMna7/RFyWCfnYCYABKn1wc0StD9HahL5KvlMCxNPwfrnOqP9CSbSFLpGkFBioJSOaC+odYyXgwrUjKYrjMAQJcXaNuQ0kCCh0BMqEtchwz6665oZ1x5kUxQeIf3S+xtFBuSX1F3jxCbZt5H/d2hMxG0JbGpElj1HxVyPCcsdb6HjSzhqHN3oZ5NMQ==;4:SIBitRPv4VO5kgBhOfUFB7kkPuTnV2sZF9j13+LtzgGhVZt3KPF1UV3NIB6XzyeRCo24VqD8pcfE9Os9+82WxNOdiE4DU13MWTZVWcfzUIxei8q+yrD7hWbEubYQ1I2XpeZryvbSWlg28HH9R/9CdeDgsOmgEBmYLLZjGaWx7McwDmH8ZP2qHkDjPbO7TL3OI84+8LWHVtPKbdMIXe98Hh0+iKyLLPvioytJKD79KYYA+tdaTkh41PGqjsWr7dOv1GDr0le6Gg56wGgYEZ+49ge985Ln1QburkqlhJxnlMe3dNwPgfuZ93gEDsFN9001yFfPh94JdHXuA+Ao2Z6HsLUaSFUfg2IIvBBt6Kne/LiWTMfI79FU1h5kQP3Uyw/cfXLIMnsd3LLvr0Chi8iLrR0m89h85pWQy27wwfqB+nNu8qPAHPGwuR4D7jnK/a3y X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6043046)(6042046);SRVR:AM5PR0201MB2308;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0201MB2308; X-Forefront-PRVS: 01018CB5B3 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(7916002)(209900001)(24454002)(377454003)(189002)(199003)(377424004)(54094003)(6116002)(189998001)(65826007)(8666005)(77096005)(97736004)(117156001)(19580395003)(19580405001)(230700001)(8676002)(68736007)(36756003)(93886004)(5001770100001)(66066001)(101416001)(47776003)(92566002)(65956001)(81156014)(81166006)(76176999)(15395725005)(54356999)(50986999)(7846002)(65806001)(7416002)(586003)(2906002)(105586002)(23676002)(4001150100001)(3846002)(15975445007)(7736002)(6666003)(64126003)(4326007)(305945005)(50466002)(5660300001)(74482002)(31686004)(33646002)(86362001)(106356001)(31696002)(2950100002)(4001350100001)(42186005)(83506001)(7059030)(42262002)(2101003)(6606295002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0201MB2308;H:[192.168.0.125];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjAyMDFNQjIzMDg7MjM6OGUrM1VlYll5OHdYeURMU3FCako1QWtv?= =?utf-8?B?M3Q5bENCTUxNK0NvdkJjbk9od1FuNnFoWGEwclhrNnNmRFppelJuZXZuVmRl?= =?utf-8?B?ZisrSEI1bzFkR21uYUhsV0tRZnY3U3NYWWkxY3k0QlVvVjVDdXZ4b3krWm5C?= =?utf-8?B?a1drN3lFY1liNlhVVndLZ0htSFZEQURGOEZIQ3Uzd2ZoTmdwcnY0NyswdkN5?= =?utf-8?B?dmlTQmZud3MwaG4rSkt4bzJzQjUzcDcvdUVQMDkzd3JlWEd1U1RWQXZyWVpU?= =?utf-8?B?ZWlkbWRmU2ExMFJSRElpR2lFSmswbmt5T2g0aUlzMm5XZ1poYXRNN05mdkIz?= =?utf-8?B?QytjaTVmZ2dUb0V2WTVwejFKbXZFRm5JZm5oMElpSFUxblkrNVdjN3FBbEx2?= =?utf-8?B?WE5kYzhoL0lVaGVZaG84cE1LS3V6ZGlFR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orOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2016 18:17:07.1554 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0201MB2308 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1773 Lines: 38 On 2016-10-20 19:37, Jonathan Cameron wrote: > On 20 October 2016 18:30:19 BST, Jonathan Cameron wrote: >> On 20 October 2016 13:55:12 BST, Lars-Peter Clausen wrote: >>> On 10/20/2016 11:25 AM, Peter Rosin wrote: >>>> Also, is there some agreed-upon way to dig out the maximum value from >>>> an iio channel? If so, "dpot-dac,max-ohms" can be eliminated from the >>>> dt bindings, which would have been nice... >>> >>> Yes, this is something we could really use. In a sense it exists for >>> the >>> devices with buffer-capable channels where there is the real_bits field >>> which tells us the data width of the channel. But a dedicated mechanism >>> for >>> querying the maximum (and minimum) valid code seems like a useful >>> feature. >>> Not only for in-kernel clients, but also for userspace. >> >> This was something that was addressed by the rather ancient patch >> series i posted that added >> an available call back which provided info on range and values for all >> info mask elements. >> Series got buried by there being a lot of precursors but quite a few of >> those have merged since. >> >> Hmm Google won't let me find it on my phone. Was a while back now. Will >> try to get on pc with >> decent email archive later and dig out a reference. > http://marc.info/?l=linux-iio&m=138469765309868&w=2 I think... Interesting, one issue with that is that it is all in real world units, while I'd rather have the raw value. So, I would need to convert back to the raw value using the scale, which sounds boring but doable. However, I wonder if calibration may also be involved with that conversion back to raw for some channels? That sounds a bit more driver specific and potentially troublesome... Cheers, Peter