Received: by 10.223.164.221 with SMTP id h29csp1493997wrb; Wed, 25 Oct 2017 01:07:06 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Rfk0d4oEgpk2w9vn7C21pdNRyGTdw6U4m2tYwW/YqOQClvn5fIyvYV4xWwGiLqDZeIqe7l X-Received: by 10.99.104.6 with SMTP id d6mr1261897pgc.319.1508918826084; Wed, 25 Oct 2017 01:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508918826; cv=none; d=google.com; s=arc-20160816; b=NYcSQjFJS0fYcrOQfe+5whk4+W/ULFM8UCEAUB09Ic9YLt40SPEkiNTw4RTlm/iNg5 Lyayvi4hW02tY92d9yj8DFgVqJ+qu82FUsbPcNH+cF32ESGy/dbTK8BW1cIDgANwyhBu 3kCVJNYZyX0e7RoMpEoSzJ5sBssa3GyErezA4BRO9l2hSx7ZsqTyAgaJU6/06EiiQUHR Prk5qjiBl5+LlDX47DCdNZjaeAipeh1SbMkbG309MxwjeJ7XON5ZL7KaqsCikDnsyt8u AYjQdbyX8A9GMCICh90Xv2vqnEnxF92yC+y5LStNz3XkG1k9/pYYnoLkspEjMDNQrDVS I2Fw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=8bSuNdosb55Aafin2i8uSmV5iuPelzY2a1SP41UmDlo=; b=Cm20ldCSS+WPNmTHZ6KC6jmkhfX7eEKv49sn2UA0uLx936NrPVI/1Rvyi1H8c3tYXY VTmiE5BapdgH5C1Jp7ko8Qvl28dvCdGGql7Pn4F+HcFrDuMIBTzOvApB9dgT37Ja0Q8C Nsutnrt4v110yFbX2q061d5kPHma6MJeJaOGsqugeWq4NxdAJD03ncxbuQZrAKUu5Gvq sz1cRZqnjmg+/LJbLFJOImNW8w/qCQd8uAZVu6DnCIouEl6mpMXYU7m3lqGEqd0Q+ATC PkYh0DD9nYhPX1yxvIpuK5kMsKNh5AedyyCsVPnJ/teekwmVXQkBKrwClBS+lYVVy1Ts Dr6Q== 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 k33si1307861pld.29.2017.10.25.01.06.52; Wed, 25 Oct 2017 01:07:06 -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 S932246AbdJYIGZ (ORCPT + 99 others); Wed, 25 Oct 2017 04:06:25 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:39807 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751529AbdJYIGV (ORCPT ); Wed, 25 Oct 2017 04:06:21 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9P84HvX022967; Wed, 25 Oct 2017 10:05:16 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2dtg3dj62a-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 25 Oct 2017 10:05:16 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3B30B48; Wed, 25 Oct 2017 08:05:14 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E4ACF1462; Wed, 25 Oct 2017 08:05:13 +0000 (GMT) Received: from [10.48.0.167] (10.75.127.50) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 25 Oct 2017 10:05:12 +0200 Subject: Re: [PATCH 1/3] dt-bindings: iio: adc: stm32: add support for diff channels To: Jonathan Cameron , Rob Herring CC: , , , , , , , , , , , , , References: <1508246145-19417-1-git-send-email-fabrice.gasnier@st.com> <1508246145-19417-2-git-send-email-fabrice.gasnier@st.com> <20171024164138.arnjrlw4pmk5xaqy@rob-hp-laptop> From: Fabrice Gasnier Message-ID: Date: Wed, 25 Oct 2017 10:05:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG6NODE1.st.com (10.75.127.16) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-25_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/24/2017 08:42 PM, Jonathan Cameron wrote: > > > On 24 October 2017 17:41:38 BST, Rob Herring wrote: >> On Tue, Oct 17, 2017 at 03:15:43PM +0200, Fabrice Gasnier wrote: >>> STM32H7 ADC channels may be configured either as single-ended or >>> differential. >>> Add 'st,adc-diff-channels' property to support differential channels. >>> Differential channels are defined as a pair of positive and negative >>> inputs: vinp & vinn. >>> >>> Signed-off-by: Fabrice Gasnier >>> --- >>> Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt | 6 >> ++++++ >>> 1 file changed, 6 insertions(+) >>> >>> diff --git >> a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt >> b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt >>> index 48bfcaa3..c3c8de1 100644 >>> --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt >>> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt >>> @@ -62,6 +62,12 @@ Required properties: >>> - st,adc-channels: List of single-ended channels muxed for this ADC. >>> It can have up to 16 channels on stm32f4 or 20 channels on >> stm32h7, numbered >>> from 0 to 15 or 19 (resp. for in0..in15 or in0..in19). >>> +- st,adc-diff-channels: List of differential channels muxed for this >> ADC. >>> + Depending on part used, some channels can be configured as >> differential >>> + instead of single-ended (e.g. stm32h7). List here positive and >> negative >>> + inputs pairs as , ,... vinp and vinn are >> numbered >>> + from 0 to 19 on stm32h7) >>> + Note: At least one of "st,adc-channels" or "st,adc-diff-channels" >> is required. >> >> Wouldn't both present be invalid? >> > Hi Rob, Jonathan, > Probably invalid to have a number in both but some channels in each would be fine. Yes, both properties can be used together. Some channels can be used as single-ended and some other ones as differential (mixed). But channels can't be configured both as single-ended and differential (invalid). I'll mention this in the note, and also update differential channels example: Example to setup: - channel 1 as single-ended - channels 2 & 3 as differential (with resp. 6 & 7 negative inputs) adc: adc@40022000 { compatible = "st,stm32h7-adc-core"; ... adc1: adc@0 { compatible = "st,stm32h7-adc"; ... st,adc-channels = <1>; st,adc-diff-channels = <2 6>, <3 7>; }; }; I will send V2 with these updates. Thanks, Best Regards, Fabrice > >>> - #io-channel-cells = <1>: See the IIO bindings section "IIO >> consumers" in >>> Documentation/devicetree/bindings/iio/iio-bindings.txt >>> >>> -- >>> 1.9.1 >>> > From 1582165633191128181@xxx Tue Oct 24 18:45:28 +0000 2017 X-GM-THRID: 1581553715797412419 X-Gmail-Labels: Inbox,Category Forums