Received: by 10.192.165.148 with SMTP id m20csp3621458imm; Mon, 30 Apr 2018 03:36:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpM6g9eaxm0rgtzlqCkPAExC/Vm8emtmS5BSNUTVDzRQKwC+UVvJ3H+rW0y1pVtoonni6li X-Received: by 2002:a17:902:4301:: with SMTP id i1-v6mr11964748pld.280.1525084572143; Mon, 30 Apr 2018 03:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525084572; cv=none; d=google.com; s=arc-20160816; b=VjK3AvkLopBLB0Jl765qmNeJkVqADOgSJYD4YARmHuyCxBVeaHL6gtD0rtJ9qpqq1q aaxAxta/IHjRULyhypIeyB+885pJ901VWklmcYyT60/wsiIOC0sV4zICO0dq9mM1GY3y YLO3D4xvfdV1gAbzLA3osQwsx5qJewpPr7DgBu6V6u5RReIXGSfQg90Y6zHU5pbj7V3D LCR3q4tvbeZnsnPO5bdC7dLZlka3xw3yJLccJ3+xyayryh1hrIa2UM1YPRrt9Yfc4RwL CxS2q3oyoKw3Os+mZAr+gazDZtRBrWuKtOlJBt/Ilhi/vvoZh72Ji6UFkk2K0ttpJ9o8 cpZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=5tAgUYXBIz2WHLQKSZwiHHbjr2QlXEcKx7bf96O7Sus=; b=k7BDWW18TzJ34UjBvrOooWtaT6piQrPe9jOg4oe0mDZeWNHjVykwF1FqnWM28zjHqH zgfjSbi2dUYUN6gmVgn7TuxS+SAMiQzdcoiF3/R7lmXRCwG9HMWlrmSfKAwkuNSbFFim WummuSYPBfSZr3x1rRwummzwXnm34F6+Jjt8O2QlijZ7RJNQnKhNowCT0dlrue6EslSX R56KPxiyKKyjzfTH5tKpUsUmlL2p6i29mnxOt1xSw9EDALedTKGb700f0GTYT43UTb8X KYY3KqsV27CXWV2jKiUhPeGx9dnQKAf0PZ66Zf6u/t8CoBJwce5uDuxwKjFHypmt8Ozu YU/g== 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 w23-v6si7240003plq.214.2018.04.30.03.35.57; Mon, 30 Apr 2018 03:36:12 -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 S1753608AbeD3KfZ (ORCPT + 99 others); Mon, 30 Apr 2018 06:35:25 -0400 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:28089 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751064AbeD3KfS (ORCPT ); Mon, 30 Apr 2018 06:35:18 -0400 X-IronPort-AV: E=Sophos;i="5.49,346,1520924400"; d="scan'208";a="11021809" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Apr 2018 03:35:17 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch05.mchp-main.com (10.10.76.106) with Microsoft SMTP Server id 14.3.352.0; Mon, 30 Apr 2018 03:35:17 -0700 From: Eugen Hristev To: , , , , , , , , , , CC: Eugen Hristev Subject: [PATCH v4 7/9] dt-bindings: iio: adc: at91-sama5d2_adc: add channel specific consumer info Date: Mon, 30 Apr 2018 13:32:13 +0300 Message-ID: <1525084335-11276-8-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525084335-11276-1-git-send-email-eugen.hristev@microchip.com> References: <1525084335-11276-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Added defines for channel consumer device-tree binding Signed-off-by: Eugen Hristev Reviewed-by: Rob Herring --- .../devicetree/bindings/iio/adc/at91-sama5d2_adc.txt | 9 +++++++++ include/dt-bindings/iio/adc/at91-sama5d2_adc.h | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 include/dt-bindings/iio/adc/at91-sama5d2_adc.h diff --git a/Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt b/Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt index 6469a4c..4a3c1d4 100644 --- a/Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt +++ b/Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt @@ -21,6 +21,14 @@ Optional properties: - dmas: Phandle to dma channel for the ADC. - dma-names: Must be "rx" when dmas property is being used. See ../../dma/dma.txt for details. + - #io-channel-cells: in case consumer drivers are attached, this must be 1. + See for details. + +Properties for consumer drivers: + - Consumer drivers can be connected to this producer device, as specified + in + - Channels exposed are specified in: + Example: @@ -38,4 +46,5 @@ adc: adc@fc030000 { atmel,trigger-edge-type = ; dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(25))>; dma-names = "rx"; + #io-channel-cells = <1>; } diff --git a/include/dt-bindings/iio/adc/at91-sama5d2_adc.h b/include/dt-bindings/iio/adc/at91-sama5d2_adc.h new file mode 100644 index 0000000..70f99db --- /dev/null +++ b/include/dt-bindings/iio/adc/at91-sama5d2_adc.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * This header provides constants for configuring the AT91 SAMA5D2 ADC + */ + +#ifndef _DT_BINDINGS_IIO_ADC_AT91_SAMA5D2_ADC_H +#define _DT_BINDINGS_IIO_ADC_AT91_SAMA5D2_ADC_H + +/* X relative position channel index */ +#define AT91_SAMA5D2_ADC_X_CHANNEL 24 +/* Y relative position channel index */ +#define AT91_SAMA5D2_ADC_Y_CHANNEL 25 +/* pressure channel index */ +#define AT91_SAMA5D2_ADC_P_CHANNEL 26 + +#endif -- 2.7.4