Received: by 10.223.185.116 with SMTP id b49csp177973wrg; Tue, 13 Feb 2018 19:16:13 -0800 (PST) X-Google-Smtp-Source: AH8x227VxORGmf0F3NIqiHh08atpM7hJqF1mcYDxtN2bAmf4ep4WeNwN+HUv99za3oA5ZhXrUHyG X-Received: by 10.101.92.196 with SMTP id b4mr2674623pgt.27.1518578173703; Tue, 13 Feb 2018 19:16:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518578173; cv=none; d=google.com; s=arc-20160816; b=WCEK7Zr/C/a+yIVlAKGYFp/rR/uIhLK2w6qt9n0+qMsicjvG3xK+a7giIb+zjgixIj AcCjOpUacABwpWv9HRL2Cj8oBtoDtb2mO4gwm6VlK9FOYby55H0+zL5LTL+OZ0InlSei Las6ncQh03efS5Fv+/Aw3Zok1uOV4xqZY4QY3MHlKP02PAXPrd9ymJK9ahvCllcYKvFe dDVA9upBXeviue8qP2c0/HfsbGoCbKpkZzMoIewzri3lzX/isf5I9qKBQXNdiP58tRin HVdJSxjkGy0tAXPuVbbPf7Y8EXwRHgLIuTKmVF17+/GDnbMhTcAgApgy0sU62RU+yG9e X5lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=vbfVoMJOwfINDV1X+7ptodN/9hOruz09G/hYIroQsX8=; b=KEl0/7GBjV5rDDg6RBSojFR4vMlr0Po5BDX0Sa9og11+p5zjCyEWY/cRtcATYT5iHR G3e9LLE5xEh4QpVW8sH7399ofiIESo7dY+m7htmsYrYrm3VaoO72SsBibs5CS1/ptVw1 letG4F6BvRQ5PJGC9bFYAPm+dJfaRNiP3LFguwTYPu+YEGrsMM8jymgtJM59/2/CnwT8 GK2Azbj6RC6/jZFR03gQ+BRI3CHgHTI3RsO7kXf3IwN6FKn7krBjAQ7O3PzbgrSVNqsu vz9PDVPOiyZrzpDA5i87Z0FL7rlnUI6bc3A9IlL8N/1iW3xiGFGCg/ZNLB0S/mRY9rO7 SiTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hcKLa3M1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q188si692337pga.444.2018.02.13.19.15.58; Tue, 13 Feb 2018 19:16:13 -0800 (PST) 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=@linaro.org header.s=google header.b=hcKLa3M1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966684AbeBNDPS (ORCPT + 99 others); Tue, 13 Feb 2018 22:15:18 -0500 Received: from mail-ot0-f196.google.com ([74.125.82.196]:39733 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966600AbeBNDPQ (ORCPT ); Tue, 13 Feb 2018 22:15:16 -0500 Received: by mail-ot0-f196.google.com with SMTP id f18so19208783otf.6 for ; Tue, 13 Feb 2018 19:15:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vbfVoMJOwfINDV1X+7ptodN/9hOruz09G/hYIroQsX8=; b=hcKLa3M1UWwuoUcullTD7k/jfOQmVklUFQgfWtBKUi6Oe+UkSItO9vGIbBvDKBcnV9 WhhdzL6TueGhSku1hzaWjJxYPjv13bGhVFb4i0RhWfNo4i9mHDboe8tNi9iKe3JiJIvA 8VL5xTxqHycXgmvf+BHKEkjb0ACy+rAhzpn8A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vbfVoMJOwfINDV1X+7ptodN/9hOruz09G/hYIroQsX8=; b=LWhSzftUHSQbZHlm402Z4gvaNyWskEIEVYornLNdIdPyTzva39CdR2+DIOYJebvcvt d0N5PTJr3ze8uicLrPhXJwDF2enX0W5EfCuNLyXr44go583dZYmIDOF/aQX0AMZn9kj5 dz2uMuSujA7eXIYb5Y0F7DY0PKFidYL82zvog3PBjY95rD2k56eoA4rxHDKH5Tvozw6E jcP6az8dJQCf9iJx9wu1Rse8X5a7rYzh4cAn/gKqi2kyD6VOFskFDGEYrC0+06Ccf+Mi HDfOuJiqbZJqGks7Chi0GYvNjibSKLMKAYffL2wgGJ/Y4zBH4Zy+z/50LZMat8LFclb2 uKRQ== X-Gm-Message-State: APf1xPCJEV+l6mErjRSItArCzVmkCaCfWYgBB7hTciW2Jbros5A+gPRS 3NXcvaHFH1DYL+9aN3nTmqkEDaZRSW1PZuAHGfWfSA== X-Received: by 10.157.97.5 with SMTP id i5mr2483235otj.64.1518578116054; Tue, 13 Feb 2018 19:15:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.28.174 with HTTP; Tue, 13 Feb 2018 19:15:15 -0800 (PST) In-Reply-To: <20180213233945.55mfqpydfxmimak2@rob-hp-laptop> References: <20180213233945.55mfqpydfxmimak2@rob-hp-laptop> From: Baolin Wang Date: Wed, 14 Feb 2018 11:15:15 +0800 Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: gpio: Add Spreadtrum EIC controller documentation To: Rob Herring Cc: Linus Walleij , Mark Rutland , DTML , LKML , "open list:GPIO SUBSYSTEM" , Mark Brown , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 14 February 2018 at 07:39, Rob Herring wrote: > On Thu, Feb 08, 2018 at 04:01:42PM +0800, Baolin Wang wrote: >> This patch adds the device tree bindings for the Spreadtrum EIC >> controller. The EIC can be recognized as one special type of GPIO, >> which can only be used as input. >> >> Signed-off-by: Baolin Wang >> --- >> .../devicetree/bindings/gpio/gpio-eic-sprd.txt | 51 ++++++++++++++++++++ >> 1 file changed, 51 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-eic-sprd.txt >> >> diff --git a/Documentation/devicetree/bindings/gpio/gpio-eic-sprd.txt b/Documentation/devicetree/bindings/gpio/gpio-eic-sprd.txt >> new file mode 100644 >> index 0000000..34f194f >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/gpio/gpio-eic-sprd.txt >> @@ -0,0 +1,51 @@ >> +Spreadtrum EIC controller bindings >> + >> +The EIC is the abbreviation of external interrupt controller, which >> +is only can be used as input mode. The EIC controller includes 4 >> +sub-modules: EIC-Debounce, EIC-Latch, EIC-Async, EIC-Sync. >> + >> +The EIC-debounce sub-module provides up to 8 source input signal >> +connection. A debounce machanism is used to capture input signal's >> +stable status (ms grade) and a single-trigger mechanism is introduced >> +into this sub-module to enhance the input event detection reliability. >> +In addition, this sub-module's clock can be shut-off automatically to >> +reduce power dissipation. The debounce range is from 1ms to 4s with >> +the step of 1ms. If the input signal is shorter than 1ms, it will be >> +omitted as this sub-module. >> + >> +The EIC-latch sub-module is used to latch some special input signal >> +and send interrupts to MCU core, and it can provide up to 8 latch >> +source input signal connection. >> + >> +The EIC-async sub-module uses 32k clock to capture short signal (us >> +grade) to generate interrupt to MCU by level or edge trigger. >> + >> +The EIC-sync is similar with GPIO's input function. >> + >> +Required properties: >> +- compatible: Should be one of the following: >> + "sprd,sc9860-eic-debounce", >> + "sprd,sc9860-eic-latch", >> + "sprd,sc9860-eic-async", >> + "sprd,sc9860-eic-sync", >> + "sprd,sc27xx-eic-debounce". >> +- reg: Define the base and range of the I/O address space containing >> + the GPIO controller registers. >> +- gpio-controller: Marks the device node as a GPIO controller. > > Why a gpio controller? Do you read the input pin state? We always regard it as GPIO except it only can be used as input mode. Like debounce eic, we still need request it before using it. > >> +- #gpio-cells: Should be <2>. The first cell is the gpio number and >> + the second cell is used to specify optional parameters. >> +- interrupt-controller: Marks the device node as an interrupt controller. >> +- #interrupt-cells: Should be <2>. Specifies the number of cells needed >> + to encode interrupt source. >> +- interrupts: Should be the port interrupt shared by all the gpios. >> + >> +Example: >> + eic_debounce: eic@40210000 { > > interrupt-controller@... > > Or (if this remains a gpio controller) > > gpio@... OK. > >> + compatible = "sprd,sc9860-eic-debounce"; >> + reg = <0 0x40210000 0 0x80>; >> + gpio-controller; >> + #gpio-cells = <2>; >> + interrupt-controller; >> + #interrupt-cells = <2>; >> + interrupts = ; > > The example doesn't seem to match your description of the block or > blocks. You talk about a bunch of sub modules and then there's just this > one node? I just list one as one example, and I will list all of them in next version. Thanks. -- Baolin.wang Best Regards