From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752779AbcCGObp (ORCPT ); Mon, 7 Mar 2016 09:31:45 -0500 Received: from eusmtp01.atmel.com ([212.144.249.242]:34506 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752634AbcCGObh (ORCPT ); Mon, 7 Mar 2016 09:31:37 -0500 Subject: Re: [PATCH v3 1/2] ARM: at91/dt: shdwc binding: add new shutdown controller documentation To: Alexandre Belloni , , , , Pawel Moll References: <1443630121-13912-1-git-send-email-nicolas.ferre@atmel.com> <1443630121-13912-2-git-send-email-nicolas.ferre@atmel.com> <20151003170220.GG2694@piout.net> CC: , , , Maxime Ripard , , "Jean-Christophe PLAGNIOL-VILLARD" From: Nicolas Ferre X-Enigmail-Draft-Status: N1110 Organization: atmel Message-ID: <56DD90D3.1000102@atmel.com> Date: Mon, 7 Mar 2016 15:31:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20151003170220.GG2694@piout.net> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.161.30.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 03/10/2015 19:02, Alexandre Belloni a écrit : > On 30/09/2015 at 18:22:00 +0200, Nicolas Ferre wrote : >> +SHDWC Shutdown Controller (Alternative) >> + >> +1) shdwc node >> + >> +required properties: >> +- compatible: should be "atmel,sama5d2-shdwc". >> +- reg: should contain registers location and length >> +- clocks: phandle to input clock. >> +- #address-cells: should be one. The cell is the wake-up input index. >> +- #size-cells: should be zero. >> + >> +optional properties: >> + >> +- atmel,wakeup-debouncer: minimum wake-up inputs debouncer period in > > Shouldn't that property be called atmel,wakeup-debouncer-ms ? Well, as it's microseconds, it should be "-us", according to the file: Documentation/devicetree/bindings/property-units.txt. Reworking on this I realised that a kind "generic" property exists for this type: "debounce-delay-ms", without a vendor prefix. So, for the DT people, what do you think if I change my private property to this one that seems to be used in a bunch of bindings already in its milliseconds variant: gpio-matrix-keypad.txt, tc3589x.txt, extcon-palmas.txt or with a vendor prefix in nvidia,tegra20-kbc.txt or lpc32xx-key.txt and if I diversify it to a "debounce-delay-us" variant and use it in this driver? >> + >> +2) input nodes >> + >> +Wake-up input nodes are usually described in the "board" part of the Device >> +Tree. Note also that input 0 is linked to the wake-up pin and is frequently >> +used. >> + >> +Required properties: >> +- reg: should contain the wake-up input index [0 - 15]. >> + >> +Optional properties: >> +- atmel,wakeup-type: string, operation mode of the input described by the child >> + node. Supported values are: "high" or "low". >> + > > Maybe we could avoid parsing string and use an integer with a few defines Yes, even a boolean should do the trick. What about: - atmel,wakeup-active-high: boolean, the corresponding wake-up input described by the child, forces the wake-up of the core power supply on a high level. The default is to be active low. Thanks for your insights. Best regards, -- Nicolas Ferre